Skip to content

Commit 405cd38

Browse files
authored
Merge branch 'development' into Fix_switchToFfmpegAudioBackEndOnWindows
2 parents 9c0596f + 1d0365d commit 405cd38

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+2869
-1472
lines changed

.DirIcon

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
mudlet.png

.github/workflows/build-mudlet.yml

Lines changed: 51 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818
name: ${{matrix.buildname}}
1919
runs-on: ${{matrix.os}}
2020
if: ${{ github.repository_owner == 'Mudlet' }}
21+
env:
22+
LUA_VERSION: '5.1.5'
2123
strategy:
2224
fail-fast: false
2325
matrix:
@@ -28,7 +30,6 @@ jobs:
2830
# oldest OS supported for maximum compatibility of built AppImage
2931
- os: ubuntu-22.04
3032
buildname: 'ubuntu / gcc / lua tests'
31-
triplet: x64-linux
3233
compiler: gcc_64
3334
gcc_compiler_version: 10
3435
qt: '6.9.0'
@@ -37,26 +38,22 @@ jobs:
3738
- os: ubuntu-22.04
3839
# Another try to use GCC12
3940
buildname: 'ubuntu (x86_64)'
40-
triplet: x64-linux
4141
compiler: gcc_64
4242
gcc_compiler_version: 12
4343
qt: '6.9.0'
4444
- os: ubuntu-latest
4545
buildname: 'ubuntu / clang'
46-
triplet: x64-linux
4746
compiler: clang_64
4847
gcc_compiler_version: 10
4948
qt: '6.9.0'
50-
- os: macos-13
49+
- os: macos-15-intel
5150
buildname: 'macos (x86_64) / c++, lua tests'
52-
triplet: x64-osx
5351
compiler: clang_64
5452
qt: '6.9.0'
5553
deploy: 'deploy'
5654
run_tests: 'true'
5755
- os: macos-14
5856
buildname: 'macos (arm64) / c++, lua tests'
59-
triplet: arm64-osx
6057
compiler: clang_64
6158
qt: '6.9.0'
6259
deploy: 'deploy'
@@ -84,7 +81,7 @@ jobs:
8481
if: runner.os == 'macOS'
8582
uses: leafo/gh-actions-lua@v12
8683
with:
87-
luaVersion: "5.1.5"
84+
luaVersion: ${{ env.LUA_VERSION }}
8885
buildCache: false
8986

9087
- name: (macOS) Install Luarocks via GitHub Actions
@@ -100,39 +97,31 @@ jobs:
10097
HOMEBREW_NO_INSTALL_CLEANUP: "ON"
10198
run: |
10299
# Install all required dependencies
103-
BREWS=("libzzip" "libzip" "ccache" "expect" "assimp" "hunspell" "pcre" "pugixml" "sqlite" "yajl" "boost")
104-
105-
# Loop through each brew package
106-
for brew in "${BREWS[@]}"; do
107-
if ! brew list --formula "${brew}" &>/dev/null; then
108-
echo "Installing ${brew}..."
109-
brew install "$brew"
110-
else
111-
echo "${brew} is already installed."
112-
fi
113-
done
100+
brew install libzzip libzip ccache expect assimp hunspell pcre pugixml sqlite yajl boost
114101
115102
echo "CCACHE_DIR=${{runner.workspace}}/ccache" >> $GITHUB_ENV
116103
117104
# Use latest available XCode
118105
echo "DEVELOPER_DIR=$(xcode-select --print-path)" >> $GITHUB_ENV
119106
echo "SDKROOT=$(xcrun --sdk macosx --show-sdk-path)" >> $GITHUB_ENV
120107
108+
# Detect Homebrew prefix once (differs between x86_64 and ARM64)
109+
if [ "$(uname -m)" = "arm64" ]; then
110+
HOMEBREW_PREFIX=/opt/homebrew
111+
else
112+
HOMEBREW_PREFIX=/usr/local
113+
fi
114+
echo "HOMEBREW_PREFIX=$HOMEBREW_PREFIX" >> $GITHUB_ENV
115+
121116
# Help CMake find Lua installed by gh-actions-lua
122117
# The action installs to .lua/ and .luarocks/ in the runner home
123118
echo "LUA_DIR=$HOME/.lua" >> $GITHUB_ENV
124119
125120
# Help CMake find keg-only Homebrew packages (PCRE is keg-only on macOS)
126-
echo "PKG_CONFIG_PATH=/usr/local/opt/pcre/lib/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV
121+
echo "PKG_CONFIG_PATH=${HOMEBREW_PREFIX}/opt/pcre/lib/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV
127122
128123
# Install lua-yajl early to generate translation statistics
129-
# Detect Homebrew prefix (differs between x86_64 and ARM64)
130-
if [ "$(uname -m)" = "arm64" ]; then
131-
YAJL_PREFIX=/opt/homebrew/opt/yajl
132-
else
133-
YAJL_PREFIX=/usr/local/opt/yajl
134-
fi
135-
luarocks --lua-version 5.1 install --local lua-yajl YAJL_DIR=$YAJL_PREFIX
124+
luarocks --lua-version 5.1 install --local lua-yajl YAJL_DIR=${HOMEBREW_PREFIX}/opt/yajl
136125
137126
# Allow stats generation script to see location of lua-yajl
138127
eval "$(luarocks path --local --lua-version "5.1")"
@@ -143,7 +132,7 @@ jobs:
143132
uses: leafo/gh-actions-lua@v12
144133
if: runner.os == 'Linux'
145134
with:
146-
luaVersion: "5.1.5"
135+
luaVersion: ${{ env.LUA_VERSION }}
147136
buildCache: false
148137

149138
- name: (Linux) Install Luarocks via GitHub Actions
@@ -158,8 +147,27 @@ jobs:
158147
# Install all required dependencies
159148
# imagemagick is for the desktop screenshot
160149
# liblua5.1-0-dev is needed for CMake to find Lua headers/library
161-
sudo apt-get install libsecret-1-dev ccache pkg-config pcregrep expect libzip-dev libglu1-mesa-dev libpulse-dev g++-${{matrix.gcc_compiler_version}} \
162-
libxkbcommon-x11-0 imagemagick libassimp-dev libpcre3-dev libpugixml-dev libsqlite3-dev libyajl-dev libhunspell-dev liblua5.1-0-dev libboost-dev -y
150+
sudo apt-get install \
151+
ccache \
152+
expect \
153+
g++-${{matrix.gcc_compiler_version}} \
154+
imagemagick \
155+
libassimp-dev \
156+
libboost-dev \
157+
libglu1-mesa-dev \
158+
libhunspell-dev \
159+
liblua5.1-0-dev \
160+
libpcre3-dev \
161+
libpulse-dev \
162+
libpugixml-dev \
163+
libsecret-1-dev \
164+
libsqlite3-dev \
165+
libxkbcommon-x11-0 \
166+
libyajl-dev \
167+
libzip-dev \
168+
pcregrep \
169+
pkg-config \
170+
-y
163171
164172
# switch to GCC that supports C++20 while retaining support for older OS's
165173
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{matrix.gcc_compiler_version}} ${{matrix.gcc_compiler_version}}
@@ -170,7 +178,7 @@ jobs:
170178
echo "CCACHE_DIR=${{runner.workspace}}/ccache" >> $GITHUB_ENV
171179
172180
# Install lua-yajl early to generate translation statistics
173-
luarocks install --local lua-yajl
181+
luarocks --lua-version 5.1 install --local lua-yajl
174182
175183
# Allow stats generation script to see location of lua-yajl
176184
eval "$(luarocks path --local --lua-version "5.1")"
@@ -250,35 +258,27 @@ jobs:
250258
- name: install dependencies for packaging/tests
251259
if: matrix.deploy == 'deploy' || matrix.run_tests == 'true'
252260
run: |
253-
luarocks --lua-version 5.1 install --local LuaFileSystem
254-
luarocks --lua-version 5.1 install --local luautf8
261+
LUAROCKS="luarocks --lua-version 5.1 install --local"
262+
263+
$LUAROCKS LuaFileSystem
264+
$LUAROCKS luautf8
255265
256-
# Detect paths for dependencies that need DIR hints on macOS
257266
if [ "$RUNNER_OS" = "macOS" ]; then
258-
if [ "$(uname -m)" = "arm64" ]; then
259-
ZIP_PREFIX=/opt/homebrew/opt/libzip
260-
SQLITE_PREFIX=/opt/homebrew/opt/sqlite
261-
PCRE_PREFIX=/opt/homebrew/opt/pcre
262-
else
263-
ZIP_PREFIX=/usr/local/opt/libzip
264-
SQLITE_PREFIX=/usr/local/opt/sqlite
265-
PCRE_PREFIX=/usr/local/opt/pcre
266-
fi
267-
luarocks --lua-version 5.1 install --local lua-zip ZIP_DIR=$ZIP_PREFIX
268-
luarocks --lua-version 5.1 install --local LuaSQL-SQLite3 2.6.1 SQLITE_DIR=$SQLITE_PREFIX
269-
luarocks --lua-version 5.1 install --local lrexlib-pcre PCRE_DIR=$PCRE_PREFIX
267+
$LUAROCKS lua-zip ZIP_DIR=${HOMEBREW_PREFIX}/opt/libzip
268+
$LUAROCKS LuaSQL-SQLite3 2.6.1 SQLITE_DIR=${HOMEBREW_PREFIX}/opt/sqlite
269+
$LUAROCKS lrexlib-pcre PCRE_DIR=${HOMEBREW_PREFIX}/opt/pcre
270270
else
271-
luarocks --lua-version 5.1 install --local lua-zip
272-
luarocks --lua-version 5.1 install --local LuaSQL-SQLite3 2.6.1
273-
luarocks --lua-version 5.1 install --local lrexlib-pcre
271+
$LUAROCKS lua-zip
272+
$LUAROCKS LuaSQL-SQLite3 2.6.1
273+
$LUAROCKS lrexlib-pcre
274274
fi
275275
276276
# CI changelog generation dependencies
277-
luarocks --lua-version 5.1 install --local argparse
278-
luarocks --lua-version 5.1 install --local lunajson
277+
$LUAROCKS argparse
278+
$LUAROCKS lunajson
279279
280280
# Lua-based tests
281-
luarocks --lua-version 5.1 install --local busted
281+
$LUAROCKS busted
282282
283283
# necessary for Qt multimedia and modern Qt
284284
# libfuse2 could be needed for linuxdeployqt on Ubuntu 22.04:
@@ -323,7 +323,6 @@ jobs:
323323
APPLE_USERNAME: ${{secrets.APPLE_USERNAME}}
324324
APPLE_PASSWORD: ${{secrets.APPLE_PASSWORD}}
325325
APPLE_TEAM_ID: ${{secrets.APPLE_TEAM_ID}}
326-
TRIPLET: ${{matrix.triplet}}
327326

328327
- name: Upload packaged Mudlet
329328
uses: actions/upload-artifact@v5

.github/workflows/clangtidy-diff-analysis.yml

Lines changed: 10 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -76,32 +76,18 @@ jobs:
7676
rm -rf boost-*/* download.7z
7777
shell: bash
7878

79-
# workaround a poor interaction between github actions/cmake/vcpkg, see https://github.com/lukka/run-vcpkg/issues/88#issuecomment-885758902
80-
- name: Use CMake 3.20.1
81-
uses: lukka/get-cmake@v3.20.1
79+
- name: Use CMake 3.30.3
80+
uses: lukka/get-cmake@v3.30.3
8281

83-
- name: (Linux) Install non-vcpkg dependencies (1/2)
82+
- name: (Linux) Install dependencies
8483
if: runner.os == 'Linux'
8584
run: |
86-
# gettext is needed for vcpkg
87-
sudo apt-get install gettext -y
85+
sudo apt-get update
8886
89-
# Restore from cache the previously built ports. If "cache miss", then provision vcpkg, install desired ports, finally cache everything for the next run.
90-
- name: Restore from cache and run vcpkg
91-
uses: lukka/run-vcpkg@v7
92-
env:
93-
vcpkgResponseFile: ${{github.workspace}}/3rdparty/our-vcpkg-dependencies/vcpkg-${{matrix.triplet}}-dependencies
94-
with:
95-
vcpkgArguments: '@${{env.vcpkgResponseFile}}'
96-
vcpkgDirectory: '${{github.workspace}}/3rdparty/vcpkg'
97-
appendedCacheKey: ${{hashFiles(env.vcpkgResponseFile)}}-cachekey
98-
99-
- name: (Linux) Install non-vcpkg dependencies (2/2)
100-
if: runner.os == 'Linux'
101-
run: |
102-
# Install from vcpkg everything we can for cross-platform consistency
103-
# If not available, use other methods
104-
sudo apt-get install libsecret-1-dev pkg-config libzip-dev libglu1-mesa-dev libpulse-dev -y
87+
# Install all required dependencies
88+
# liblua5.1-0-dev is needed for CMake to find Lua headers/library
89+
sudo apt-get install libsecret-1-dev ccache pkg-config libzip-dev libglu1-mesa-dev libpulse-dev \
90+
libassimp-dev libpcre3-dev libpugixml-dev libsqlite3-dev libyajl-dev libhunspell-dev liblua5.1-0-dev libboost-dev -y
10591
10692
echo "Skipping generation of translation stats, so not installing lua-yajl."
10793
@@ -110,20 +96,18 @@ jobs:
11096
with:
11197
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
11298
cmakeListsTxtPath: '${{github.workspace}}/CMakeLists.txt'
113-
useVcpkgToolchainFile: true
11499
# has to be the github workspace, not the runner workspace, for the docker-based clang-tidy-review
115100
buildDirectory: '${{github.workspace}}/b/ninja'
116101
cmakeAppendedArgs: >-
117102
-DCMAKE_GLOBAL_AUTOGEN_TARGET=ON
118103
-G Ninja
119104
-DCMAKE_PREFIX_PATH=${{ env.QT_PREFIX != '' && env.QT_PREFIX || env.MINGW_BASE_DIR }}
120-
-DVCPKG_APPLOCAL_DEPS=OFF
121105
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
122106
buildWithCMakeArgs: >-
123107
--target autogen
124108
125109
- name: Check C++ changes against style guide
126-
uses: ZedThree/clang-tidy-review@v0.21.0
110+
uses: ZedThree/clang-tidy-review@v0.22.0
127111
id: static_analysis
128112
with:
129113
build_dir: 'b/ninja' # path is relative to checkout directory
@@ -134,4 +118,4 @@ jobs:
134118
split_workflow: true
135119

136120
- name: Upload check results
137-
uses: ZedThree/clang-tidy-review/upload@v0.21.0
121+
uses: ZedThree/clang-tidy-review/upload@v0.22.0

.github/workflows/clangtidy-post-comments.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: ZedThree/clang-tidy-review/post@v0.21.0
14+
- uses: ZedThree/clang-tidy-review/post@v0.22.0
1515
with:
1616
# don't post any comments if the PR is fine
1717
lgtm_comment_body: ''

.github/workflows/codeql-analysis.yml

Lines changed: 16 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -100,39 +100,26 @@ jobs:
100100
- name: Use CMake 3.30.3
101101
uses: lukka/get-cmake@v3.30.3
102102

103-
- name: (Linux) Install non-vcpkg dependencies (1/2)
103+
- name: (Linux) Install Lua via GitHub Actions
104+
uses: leafo/gh-actions-lua@v12
104105
if: runner.os == 'Linux'
105-
run: |
106-
# dependencies needed for vcpkg specifically
107-
sudo apt-get install gettext -y
108-
109-
- name: Restore from cache and run vcpkg
110-
uses: lukka/run-vcpkg@v7
111-
env:
112-
vcpkgResponseFile: ${{github.workspace}}/3rdparty/our-vcpkg-dependencies/vcpkg-${{matrix.triplet}}-dependencies
113106
with:
114-
vcpkgArguments: '@${{env.vcpkgResponseFile}}'
115-
vcpkgDirectory: '${{github.workspace}}/3rdparty/vcpkg'
116-
appendedCacheKey: ${{hashFiles(env.vcpkgResponseFile)}}-cachekey
107+
luaVersion: "5.1.5"
108+
buildCache: false
117109

118-
- name: (Linux) Install non-vcpkg dependencies (2/2)
110+
- name: (Linux) Install Luarocks via GitHub Actions
111+
uses: leafo/gh-actions-luarocks@v6
112+
if: runner.os == 'Linux'
113+
114+
- name: (Linux) Install dependencies
119115
if: runner.os == 'Linux'
120116
run: |
121-
# Install from vcpkg everything we can for cross-platform consistency
122-
# If not available, use other methods
123-
sudo apt-get install \
124-
ccache \
125-
expect \
126-
g++-${{matrix.gcc_compiler_version}} \
127-
libassimp-dev \
128-
libglu1-mesa-dev \
129-
libpulse-dev \
130-
libsecret-1-dev \
131-
libzip-dev \
132-
luarocks \
133-
pcregrep \
134-
pkg-config \
135-
-y
117+
sudo apt-get update
118+
119+
# Install all required dependencies
120+
# liblua5.1-0-dev is needed for CMake to find Lua headers/library
121+
sudo apt-get install libsecret-1-dev ccache pkg-config pcregrep expect libzip-dev libglu1-mesa-dev libpulse-dev g++-${{matrix.gcc_compiler_version}} \
122+
libassimp-dev libpcre3-dev libpugixml-dev libsqlite3-dev libyajl-dev libhunspell-dev liblua5.1-0-dev libboost-dev -y
136123
137124
# switch to GCC that supports C++20 while retaining support for older OS's
138125
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{matrix.gcc_compiler_version}} ${{matrix.gcc_compiler_version}}
@@ -143,14 +130,7 @@ jobs:
143130
echo "CCACHE_DIR=${{runner.workspace}}/ccache" >> $GITHUB_ENV
144131
145132
# Install lua-yajl early to generate translation statistics
146-
export PATH="${{env.VCPKG_ROOT}}/installed/${{matrix.triplet}}/tools/lua:$PATH"
147-
# workaround https://github.com/lloyd/yajl/issues/209
148-
mv ${{env.VCPKG_ROOT}}/installed/${{matrix.triplet}}/lib/libyajl_s.a ${{env.VCPKG_ROOT}}/installed/${{matrix.triplet}}/lib/libyajl.a
149-
mv ${{env.VCPKG_ROOT}}/installed/${{matrix.triplet}}/debug/lib/libyajl_s.a ${{env.VCPKG_ROOT}}/installed/${{matrix.triplet}}/debug/lib/libyajl.a
150-
# Rock locations search is hardcoded to -L/usr/local/lib and not adjustable
151-
export LIBRARY_PATH="${{env.VCPKG_ROOT}}/installed/${{matrix.triplet}}/lib:$LIBRARY_PATH"
152-
# LUA_INCDIR needs to be passed as well due to https://github.com/luarocks/luarocks/issues/1239
153-
luarocks install YAJL_INCDIR="${{env.VCPKG_ROOT}}/installed/${{matrix.triplet}}/include" YAJL_LIBDIR="${{env.VCPKG_ROOT}}/installed/${{matrix.triplet}}/lib" LUA_INCDIR="${{env.VCPKG_ROOT}}/installed/${{matrix.triplet}}/include" --local lua-yajl
133+
luarocks install --local lua-yajl
154134
155135
# Allow stats generation script to see location of lua-yajl
156136
eval "$(luarocks path --local --lua-version "5.1")"
@@ -168,12 +148,10 @@ jobs:
168148
with:
169149
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
170150
cmakeListsTxtPath: '${{github.workspace}}/CMakeLists.txt'
171-
useVcpkgToolchainFile: true
172151
buildDirectory: '${{runner.workspace}}/b/ninja'
173152
cmakeAppendedArgs: >-
174153
-G Ninja
175154
-DCMAKE_PREFIX_PATH=${{ env.QT_PREFIX != '' && env.QT_PREFIX || env.MINGW_BASE_DIR }}
176-
-DVCPKG_APPLOCAL_DEPS=OFF
177155
env:
178156
NINJA_STATUS: '[%f/%t %o/sec] '
179157

.github/workflows/performance-analysis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ jobs:
3030
- name: Use CMake 3.30.3
3131
uses: lukka/get-cmake@v3.30.3
3232

33-
# run-vcpkg action does not run on arm64 (https://github.com/lukka/run-vcpkg/issues/152)
34-
# so install dependencies manually
3533
- name: Install dependencies
3634
run: |
3735
sudo apt-get update

0 commit comments

Comments
 (0)