Skip to content

Commit

Permalink
Merge branch 'development' into Add_newFunction_moveRoom()
Browse files Browse the repository at this point in the history
  • Loading branch information
vadi2 committed Feb 18, 2024
2 parents 1fb0d87 + c755fd2 commit f0d2343
Show file tree
Hide file tree
Showing 115 changed files with 56,519 additions and 37,816 deletions.
5 changes: 1 addition & 4 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@ environment:
CCACHE_DIR: "%APPVEYOR_BUILD_FOLDER%\\.ccache"
# our appveyor cache size is 1G
CCACHE_MAXSIZE: 1G
# APP_BUILD embeds the git sha which changes on every commit, throwing the cache off
# ignore it for snapshots but not for PTBs or releases
CCACHE_IGNOREOPTIONS: "-DAPP_BUILD=-testing*"
signing_password:
secure: JJDxNdreMgNn/IOcY+UVmlaqgDT4a7vcxsY3nfcgWY4=
DEPLOY_KEY_PASS:
secure: 81sr0SJzuWG+mgH3X6fJTh4rfX5/O1qa3MsItNvFukQ=
secure: hW5QUOPCZvXJB3eA3+E3HdaoNGGl5VDpm762J5XSc6k=
DEPLOY_PATH:
secure: XQhASAJJm4Owpu74K4jgL0gszN59XJnCAS27NG7CW5G1LSRSWRh/EhKiTD36DvSr
DBLSQD_USER:
Expand Down
44 changes: 32 additions & 12 deletions .github/workflows/build-mudlet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,13 @@ jobs:
# We still need a gcc for some sub-stages - and it ain't always the same one:
gcc_compiler_version: 9
qt: '5.14.2'
- os: macos-11
buildname: 'macos / c++ tests'
- os: macos-12
buildname: 'macos / c++, lua tests'
triplet: x64-osx
compiler: clang_64
qt: '5.14.2'
deploy: 'deploy'
run_tests: 'true'
# - os: windows-2019
# buildname: 'windows'
# triplet: x64-mingw-dynamic
Expand All @@ -48,8 +49,6 @@ jobs:
env:
BOOST_ROOT: ${{github.workspace}}/3rdparty/boost
BOOST_URL: https://sourceforge.net/projects/boost/files/boost/1.83.0/boost_1_83_0.tar.bz2/download
# APP_BUILD embeds the git sha which changes on every commit, throwing the cache off - ignore it
CCACHE_IGNOREOPTIONS: "-DAPP_BUILD=*"

steps:
- name: Checkout Mudlet source code
Expand All @@ -76,7 +75,7 @@ jobs:
cache: true

- name: Restore Boost cache
uses: actions/cache@v3
uses: actions/cache@v4
id: cache-boost
with:
path: ${{env.BOOST_ROOT}}
Expand Down Expand Up @@ -159,7 +158,7 @@ jobs:
echo "LUA_CPATH=$LUA_CPATH" >> $GITHUB_ENV
# Use latest available XCode
echo "DEVELOPER_DIR=/Applications/Xcode_12.4.app/Contents/Developer" >> $GITHUB_ENV
echo "DEVELOPER_DIR=/Applications/Xcode_14.2.app/Contents/Developer" >> $GITHUB_ENV
# though we vcpkg installs Lua for us, the way it arranges directories is not compatible with Luarocks,
# so install it in a format that works
Expand Down Expand Up @@ -239,11 +238,12 @@ jobs:
echo "WITH_FONTS=no" >> $GITHUB_ENV
- name: (Linux/macOS) restore ccache
uses: pat-s/always-upload-cache@v3.0.11
uses: actions/cache@v4
with:
path: ${{runner.workspace}}/ccache
key: ccache-${{matrix.os}}-${{matrix.compiler}}-${{matrix.qt}}-${{ github.sha }}
restore-keys: ccache-${{matrix.os}}-${{matrix.compiler}}-${{matrix.qt}}
save-always: true
if: matrix.os != 'windows-latest'

- name: (Linux) Set build info
Expand Down Expand Up @@ -299,7 +299,7 @@ jobs:
run: ctest --output-on-failure

- name: (Linux/macOS) restore Luarocks for packaging
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: $HOME/.luarocks
key: ccache-${{matrix.os}}-${{matrix.compiler}}-${{hashFiles('.github/workflows/build-mudlet.yml')}}
Expand Down Expand Up @@ -352,6 +352,7 @@ jobs:
env:
BUILD_FOLDER: ${{runner.workspace}}/b/ninja
RUNNER_OS: ${{runner.os}}
X_WP_DOWNLOAD_TOKEN: ${{secrets.X_WP_DOWNLOAD_TOKEN}}
DEPLOY: ${{matrix.deploy}}
DBLSQD_USER: ${{secrets.DBLSQD_USER}}
DBLSQD_PASS: ${{secrets.DBLSQD_PASS}}
Expand All @@ -373,13 +374,22 @@ jobs:
shell: bash

# we need to be in the right place for LuaGlobals.lua to load
- name: Prep binary for running tests
if: matrix.run_tests == 'true'
- name: (Linux) Prep binary for running tests
if: matrix.run_tests == 'true' && runner.os =='Linux'
# macOS binary is in ${{runner.workspace}}/b/ninja/${{env.UPLOAD_FILENAME}}/Contents/MacOS
run: cp ${{runner.workspace}}/b/ninja/src/mudlet ${{github.workspace}}/src
shell: bash

- name: Run Lua tests
if: matrix.run_tests == 'true'
- name: (macOS) Prep binary for running tests
if: matrix.run_tests == 'true' && runner.os == 'macOS'
run: |
cp -r ${{runner.workspace}}/b/ninja/${{env.UPLOAD_FILENAME}}.app ~/Desktop
cd ~/Desktop
sudo codesign --remove-signature ${{env.UPLOAD_FILENAME}}.app
shell: bash

- name: (Linux) Run Lua tests
if: matrix.run_tests == 'true' && runner.os == 'Linux'
timeout-minutes: 5
uses: GabrielBB/[email protected]
with:
Expand All @@ -389,6 +399,16 @@ jobs:
TESTS_DIRECTORY: ${{github.workspace}}/src/mudlet-lua/tests
QUIT_MUDLET_AFTER_TESTS: 'true'

- name: (macOS) Run Lua tests
if: matrix.run_tests == 'true' && runner.os == 'macOS'
timeout-minutes: 5
shell: bash
run: ~/Desktop/${{env.UPLOAD_FILENAME}}.app/Contents/MacOS/mudlet --profile "Mudlet self-test" --mirror
env:
AUTORUN_BUSTED_TESTS: 'true'
TESTS_DIRECTORY: ${{github.workspace}}/src/mudlet-lua/tests
QUIT_MUDLET_AFTER_TESTS: 'true'

- name: Passed Lua tests
if: matrix.run_tests == 'true'
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/clangtidy-diff-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
cache: true

- name: Restore Boost cache
uses: actions/cache@v3
uses: actions/cache@v4
id: cache-boost
with:
path: ${{env.BOOST_ROOT}}
Expand Down Expand Up @@ -122,7 +122,7 @@ jobs:
--target autogen
- name: Check C++ changes against style guide
uses: ZedThree/clang-tidy-review@v0.14.0
uses: ZedThree/clang-tidy-review@v0.17.1
id: static_analysis
with:
build_dir: 'b/ninja' # path is relative to checkout directory
Expand All @@ -133,4 +133,4 @@ jobs:
split_workflow: true

- name: Upload check results
uses: ZedThree/clang-tidy-review/upload@v0.14.0
uses: ZedThree/clang-tidy-review/upload@v0.17.1
2 changes: 1 addition & 1 deletion .github/workflows/clangtidy-post-comments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: ZedThree/clang-tidy-review/post@v0.14.0
- uses: ZedThree/clang-tidy-review/post@v0.17.1
with:
# don't post any comments if the PR is fine
lgtm_comment_body: ''
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
cache: true

- name: Restore Boost cache
uses: actions/cache@v3
uses: actions/cache@v4
id: cache-boost
with:
path: ${{env.BOOST_ROOT}}
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/performance-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@ jobs:
compiler: gcc_64
os: [ self-hosted, pi4 ]


env:
# APP_BUILD embeds the git sha which changes on every commit, throwing the cache off - ignore it
CCACHE_IGNOREOPTIONS: "-DAPP_BUILD=*"


steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/qridlayout-ordering.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
yarn add xml-js --dev
node CI/fix.grid.ui.ordering.js
- name: Add & Commit
uses: EndBug/[email protected].3
uses: EndBug/[email protected].4
with:
message: "Standarize UI files"
add: "src/ui"
14 changes: 7 additions & 7 deletions .github/workflows/update-3rdparty.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
echo ::set-output name=lines_changed::$lines_changed
- name: send in a pull request
uses: peter-evans/create-pull-request@v5
uses: peter-evans/create-pull-request@v6
if: steps.getdiff.outputs.lines_changed > 0
with:
token: ${{ secrets.GH_PAT_UPDATE_3RDPARTY }}
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
echo ::set-output name=lines_changed::$lines_changed
- name: send in a pull request
uses: peter-evans/create-pull-request@v5
uses: peter-evans/create-pull-request@v6
if: steps.getdiff.outputs.lines_changed > 0
with:
token: ${{ secrets.GH_PAT_UPDATE_3RDPARTY }}
Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:
echo ::set-output name=lines_changed::$lines_changed
- name: send in a pull request
uses: peter-evans/create-pull-request@v5
uses: peter-evans/create-pull-request@v6
if: steps.getdiff.outputs.lines_changed > 0
with:
token: ${{ secrets.GH_PAT_UPDATE_3RDPARTY }}
Expand Down Expand Up @@ -157,7 +157,7 @@ jobs:
echo ::set-output name=lines_changed::$lines_changed
- name: send in a pull request
uses: peter-evans/create-pull-request@v5
uses: peter-evans/create-pull-request@v6
if: steps.getdiff.outputs.lines_changed > 0
with:
token: ${{ secrets.GH_PAT_UPDATE_3RDPARTY }}
Expand Down Expand Up @@ -197,7 +197,7 @@ jobs:
echo ::set-output name=lines_changed::$lines_changed
- name: send in a pull request
uses: peter-evans/create-pull-request@v5
uses: peter-evans/create-pull-request@v6
if: steps.getdiff.outputs.lines_changed > 0
with:
token: ${{ secrets.GH_PAT_UPDATE_3RDPARTY }}
Expand Down Expand Up @@ -237,7 +237,7 @@ jobs:
echo ::set-output name=lines_changed::$lines_changed
- name: send in a pull request
uses: peter-evans/create-pull-request@v5
uses: peter-evans/create-pull-request@v6
if: steps.getdiff.outputs.lines_changed > 0
with:
token: ${{ secrets.GH_PAT_UPDATE_3RDPARTY }}
Expand Down Expand Up @@ -277,7 +277,7 @@ jobs:
echo ::set-output name=lines_changed::$lines_changed
- name: send in a pull request
uses: peter-evans/create-pull-request@v5
uses: peter-evans/create-pull-request@v6
if: steps.getdiff.outputs.lines_changed > 0
with:
token: ${{ secrets.GH_PAT_UPDATE_3RDPARTY }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-autocompletion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
echo ::set-output name=lines_changed::$lines_changed
- name: send in a pull request
uses: peter-evans/create-pull-request@v5
uses: peter-evans/create-pull-request@v6
if: steps.getdiff.outputs.lines_changed > 0
with:
token: ${{ secrets.GH_PAT_UPDATE_3RDPARTY }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-en-us-plural.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

- name: commit and create draft pull request
if: steps.count_unfinished.outputs.xmlstarlet_result > 0
uses: peter-evans/create-pull-request@v5
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GH_PAT_UPDATE_3RDPARTY }}
add-paths: ${{ env.PLURAL_TRANSLATIONS_FILE }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
echo ::set-output name=lines_changed::$lines_changed
- name: send in a pull request
uses: peter-evans/create-pull-request@v5
uses: peter-evans/create-pull-request@v6
if: steps.getdiff.outputs.lines_changed > 0
with:
token: ${{ secrets.GH_PAT_UPDATE_3RDPARTY }}
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ qrc_*.cpp
*.qm
*.autosave
mudlet
app-build.txt

# ignore macOS apps in general, but keep the Autoupdater from Sparkle
3rdparty/boost/*
Expand Down Expand Up @@ -44,4 +45,4 @@ CMakeSettings.json

# flatpak builder
CI/.flatpak-builder
CI/build-dir
CI/build-dir
2 changes: 1 addition & 1 deletion 3rdparty/edbee-lib
2 changes: 1 addition & 1 deletion 3rdparty/kdtoolbox/singleshot_connect/singleshot_connect.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
This file is part of KDToolBox.
SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]>
SPDX-FileCopyrightText: 2020 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]>
Author: Giuseppe D'Angelo <[email protected]>
SPDX-License-Identifier: MIT
Expand Down
68 changes: 41 additions & 27 deletions CI/appveyor.after_success.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -134,36 +134,50 @@ if ("$Env:APPVEYOR_REPO_TAG" -eq "false" -and -Not $Script:PublicTestBuild) {
$DEPLOY_URL = $DEPLOY_URL.Trim()
echo "Deployed Mudlet to '$DEPLOY_URL'"
} else {
# disabled temporarily as ssh key is unavailable

# get winscp .NET dll for uploads
# activate higher TLS version. Seems PS only uses 1.0 by default
# credit: https://stackoverflow.com/questions/41618766/powershell-invoke-webrequest-fails-with-ssl-tls-secure-channel/48030563#48030563
# [Net.ServicePointManager]::SecurityProtocol = [System.Security.Authentication.SslProtocols] "tls, tls11, tls12"
# (New-Object System.Net.WebClient).DownloadFile("https://downloads.sourceforge.net/project/winscp/WinSCP/5.13.4/WinSCP-5.13.4-Automation.zip?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fwinscp%2Ffiles%2FWinSCP%2F5.13.4%2FWinSCP-5.13.4-Automation.zip%2Fdownload&ts=1538514946", "C:\src\Winscp-automation.zip")
# Add-Type -AssemblyName System.IO.Compression.FileSystem
# [System.IO.Compression.ZipFile]::ExtractToDirectory("C:\src\Winscp-automation.zip", "C:\src\Winscp-automation\")
# Add-Type -Path 'C:\src\Winscp-automation\WinSCPnet.dll'

# # do the upload
# $sessionOptions = New-Object WinSCP.SessionOptions -Property @{
# # sftp://
# Protocol = [WinSCP.Protocol]::Scp
# HostName = "mudlet.org"
# UserName = "keneanung"
# SshPrivateKeyPath = "$Env:APPVEYOR_BUILD_FOLDER\CI\mudlet-deploy-key-windows.ppk"
# SshPrivateKeyPassphrase = "${Env:DEPLOY_KEY_PASS}"
# }
# $session = New-Object WinSCP.Session
# $fingerprint = $session.ScanFingerprint($sessionOptions, "SHA-256")
# $sessionOptions.SshHostKeyFingerprint = $fingerprint
# # Connect
# Write-Output "=== Uploading installer to https://www.mudlet.org/wp-content/files/?C=M;O=D ==="
# $session.Open($sessionOptions)
# $session.PutFiles("${Env:APPVEYOR_BUILD_FOLDER}\src\release\Setup.exe", "${Env:DEPLOY_PATH}/Mudlet-${Env:VERSION}-windows-installer.exe")
# $session.Close()
# $session.Dispose()
# $DEPLOY_URL="https://www.mudlet.org/wp-content/files/Mudlet-${Env:VERSION}-windows-installer.exe"
[Net.ServicePointManager]::SecurityProtocol = [System.Security.Authentication.SslProtocols] "tls, tls11, tls12"
(New-Object System.Net.WebClient).DownloadFile("https://downloads.sourceforge.net/project/winscp/WinSCP/5.13.4/WinSCP-5.13.4-Automation.zip?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fwinscp%2Ffiles%2FWinSCP%2F5.13.4%2FWinSCP-5.13.4-Automation.zip%2Fdownload&ts=1538514946", "C:\src\Winscp-automation.zip")
Add-Type -AssemblyName System.IO.Compression.FileSystem
[System.IO.Compression.ZipFile]::ExtractToDirectory("C:\src\Winscp-automation.zip", "C:\src\Winscp-automation\")
Add-Type -Path 'C:\src\Winscp-automation\WinSCPnet.dll'

# do the upload
$sessionOptions = New-Object WinSCP.SessionOptions -Property @{
# sftp://
Protocol = [WinSCP.Protocol]::Scp
HostName = "mudlet.org"
UserName = "vadi"
SshPrivateKeyPath = "$Env:APPVEYOR_BUILD_FOLDER\CI\mudlet-deploy-key-windows.ppk"
SshPrivateKeyPassphrase = "${Env:DEPLOY_KEY_PASS}"
}
$session = New-Object WinSCP.Session
$fingerprint = $session.ScanFingerprint($sessionOptions, "SHA-256")
$sessionOptions.SshHostKeyFingerprint = $fingerprint
# Connect
Write-Output "=== Uploading installer to https://www.mudlet.org/wp-content/files/?C=M;O=D ==="
$session.Open($sessionOptions)
$session.PutFiles("${Env:APPVEYOR_BUILD_FOLDER}\src\release\Setup.exe", "${Env:DEPLOY_PATH}/Mudlet-${Env:VERSION}-windows-installer.exe")
$session.Close()
$session.Dispose()
$DEPLOY_URL="https://www.mudlet.org/wp-content/files/Mudlet-${Env:VERSION}-windows-installer.exe"
Set-Variable -Name "SHA256SUM" -Value (Get-FileHash -Path "${Env:DEPLOY_PATH}/Mudlet-${Env:VERSION}-windows-installer.exe" -Algorithm SHA256).Hash
Invoke-RestMethod -Uri 'https://www.mudlet.org/wp-content/plugins/wp-downloadmanager/download-add.php' `
-Method POST `
-Headers @{
"x-wp-download-token" = $Env:X_WP_DOWNLOAD_TOKEN
} `
-Body @{
"file_type" = "2"
"file_remote" = $Env:DEPLOY_URL
"file_name" = "Mudlet-$Env:VERSION (Windows)"
"file_des" = "sha256: $SHA256SUM"
"file_cat" = "0"
"file_permission" = "-1"
"output" = "json"
"do" = "Add File"
}
Push-AppveyorArtifact "${Env:APPVEYOR_BUILD_FOLDER}\src\release\Setup.exe" -DeploymentName "${Env:DEPLOY_PATH}/Mudlet-${Env:VERSION}-windows-installer.exe"
}

Expand Down
Loading

0 comments on commit f0d2343

Please sign in to comment.