Skip to content

Commit eba73bd

Browse files
authored
Merge branch 'development' into claude/investigate-issue-774-011CUUSx5mk2o87uHFSjWLww
2 parents dd6910b + f7618ce commit eba73bd

File tree

113 files changed

+4628
-2497
lines changed

Some content is hidden

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

113 files changed

+4628
-2497
lines changed

.devcontainer/Dockerfile

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,30 @@
11
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.208.0/containers/cpp/.devcontainer/base.Dockerfile
22

3-
# [Choice] Debian / Ubuntu version (use Debian 11/9, Ubuntu 18.04/21.04 on local arm64/Apple Silicon): debian-11, debian-10, debian-9, ubuntu-21.04, ubuntu-20.04, ubuntu-18.04
4-
ARG VARIANT=debian-11
5-
FROM mcr.microsoft.com/devcontainers/cpp:0-${VARIANT}
3+
# [Choice] Debian / Ubuntu version: debian-13, debian-12, debian-11, ubuntu-24.04, ubuntu-22.04
4+
ARG VARIANT=debian-13
5+
FROM mcr.microsoft.com/devcontainers/cpp:${VARIANT}
66
ENV DBUS_SESSION_BUS_ADDRESS="autolaunch:" DISPLAY=":1" LANG="en_US.UTF-8" LANGUAGE="en_US.UTF-8"
77

8+
# Add deb-multimedia repo for libpcre3-dev (not available in Debian 13+)
9+
RUN echo "deb http://www.deb-multimedia.org trixie main" >> /etc/apt/sources.list \
10+
&& apt-get update -oAcquire::AllowInsecureRepositories=true \
11+
&& apt-get install -y --allow-unauthenticated deb-multimedia-keyring \
12+
&& rm -rf /var/lib/apt/lists/*
13+
814
# Install C++ dependencies
915
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
10-
&& apt-get -y install --no-install-recommends build-essential git liblua5.1-dev \
11-
zlib1g-dev libhunspell-dev libpcre3-dev libzip-dev libboost-dev libyajl-dev \
12-
libpulse-dev lua-rex-pcre lua-filesystem lua-zip qtbase5-dev \
13-
qtchooser qt5-qmake qtbase5-dev-tools qtmultimedia5-dev qttools5-dev luarocks\
14-
ccache libpugixml-dev libqt5texttospeech5-dev qtspeech5-flite-plugin \
15-
qtspeech5-speechd-plugin libqt5opengl5-dev ninja-build firefox-esr \
16-
&& apt-get clean \
16+
&& apt-get -y install --no-install-recommends build-essential git libglu1-mesa-dev \
17+
libgl1-mesa-dev liblua5.1-0-dev zlib1g-dev libhunspell-dev libpcre3-dev libpcre2-dev \
18+
libzip-dev libboost-dev libyajl-dev libpulse-dev libsecret-1-dev lua-rex-pcre2 \
19+
lua-filesystem lua-zip lua-sql-sqlite3 libxkbcommon-dev qmake6-bin qt6-base-dev \
20+
libqt6opengl6-dev qt6-multimedia-dev qt6-tools-dev qtkeychain-qt6-dev luarocks ccache \
21+
libpugixml-dev libqt6core5compat6-dev qt6-speech-dev ninja-build cmake libzstd-dev \
22+
libsqlite3-dev libassimp-dev firefox-esr \
23+
&& apt-get clean \
1724
&& rm -rf /var/lib/apt/lists/*
1825

19-
# Install Lua dependencies
20-
RUN luarocks install luautf8 \
26+
# Install Lua dependencies (lua-sql-sqlite3 and lua-rex-pcre2 are already installed via apt)
27+
RUN luarocks install luautf8 \
2128
&& luarocks install lua-yajl \
22-
&& luarocks install lua-sql-sqlite3 2.6.1 \
29+
&& luarocks install lrexlib-pcre \
2330
&& luarocks install busted

.devcontainer/devcontainer.json

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"name": "C++",
55
"build": {
66
"dockerfile": "Dockerfile",
7-
// Update 'VARIANT' to pick an Debian / Ubuntu OS version: debian-11, debian-10, debian-9, ubuntu-21.04, ubuntu-20.04, ubuntu-18.04
8-
// Use Debian 11, Debian 9, Ubuntu 18.04 or Ubuntu 21.04 on local arm64/Apple Silicon
9-
"args": { "VARIANT": "debian-11" }
7+
// Update 'VARIANT' to pick an Debian / Ubuntu OS version: debian-12, debian-11, ubuntu-24.04, ubuntu-22.04
8+
// Use Debian 12, Debian 11, Ubuntu 22.04 or Ubuntu 24.04 on local arm64/Apple Silicon
9+
"args": { "VARIANT": "debian-13" }
1010
},
1111
"runArgs": ["--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined"],
1212

@@ -16,7 +16,8 @@
1616
// Add the IDs of extensions you want installed when the container is created.
1717
"extensions": [
1818
"ms-vscode.cpptools",
19-
"ms-vscode.cmake-tools"
19+
"ms-vscode.cmake-tools",
20+
"ms-dotnettools.vscode-dotnet-runtime"
2021
],
2122

2223
"forwardPorts": [5900, 5901, 6080],
@@ -32,10 +33,10 @@
3233
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
3334
"remoteUser": "vscode",
3435
"features": {
35-
"desktop-lite": {
36-
"password": "mudlet",
37-
"webPort": "6080",
38-
"vncPort": "5901"
39-
}
36+
"ghcr.io/devcontainers/features/desktop-lite:1": {
37+
"password": "mudlet",
38+
"webPort": "6080",
39+
"vncPort": "5901"
40+
}
4041
}
4142
}

.github/workflows/build-mudlet-win.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: Checkout Mudlet source code
3030
uses: actions/checkout@v6
3131
with:
32-
submodules: true
32+
submodules: recursive
3333
fetch-depth: 0
3434

3535
- name: (Windows) Setup MSYS2
@@ -62,8 +62,25 @@ jobs:
6262
GITHUB_SCHEDULED_BUILD: ${{ github.event_name == 'schedule' || github.event.inputs.scheduled == 'true' }}
6363
GITHUB_PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}
6464
GITHUB_PULL_REQUEST_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
65+
# Enable debug sending only for tags and scheduled builds (Release builds and PTB builds)
66+
SENTRY_SEND_DEBUG: ${{ (startsWith(github.ref, 'refs/tags/') || github.event_name == 'schedule' || github.event.inputs.scheduled == 'true') && '1' || '0' }}
67+
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
68+
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
69+
WITH_SENTRY: "ON"
6570
run: $GITHUB_WORKSPACE/CI/build-mudlet-for-windows.sh
6671

72+
- name: (Windows) Run QTest
73+
shell: msys2 {0}
74+
run: |
75+
LUA_PATH=$(cygpath -u "$(luarocks --lua-version 5.1 path --lr-path)" )
76+
export LUA_PATH
77+
LUA_CPATH=$(cygpath -u "$(luarocks --lua-version 5.1 path --lr-cpath)" )
78+
export LUA_CPATH
79+
80+
ctest --test-dir $GITHUB_WORKSPACE/build-$MSYSTEM/test --output-on-failure
81+
env:
82+
QT_FORCE_STDERR_LOGGING: 1
83+
6784
- name: (Windows) Run Lua tests
6885
timeout-minutes: 5
6986
shell: msys2 {0}
@@ -98,7 +115,9 @@ jobs:
98115
- name: (Windows) Package
99116
shell: msys2 {0}
100117
run: $GITHUB_WORKSPACE/CI/package-mudlet-for-windows.sh
101-
118+
env:
119+
WITH_SENTRY: "ON"
120+
102121
- name: (Windows) Login to Azure
103122
uses: azure/login@v2
104123
if: github.actor != 'dependabot[bot]' && (github.event_name == 'push' || github.event_name == 'schedule' || github.event.inputs.scheduled == 'true' || github.event.pull_request.head.repo.full_name == github.repository)

.github/workflows/build-mudlet.yml

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
- name: Checkout Mudlet source code
6464
uses: actions/checkout@v6
6565
with:
66-
submodules: true
66+
submodules: recursive
6767
fetch-depth: 0
6868

6969
- name: Install Qt
@@ -97,7 +97,7 @@ jobs:
9797
HOMEBREW_NO_INSTALL_CLEANUP: "ON"
9898
run: |
9999
# Install all required dependencies
100-
brew install libzzip libzip ccache expect assimp hunspell pcre pugixml sqlite yajl boost
100+
brew install libzzip libzip ccache expect assimp hunspell pcre2 pugixml sqlite yajl boost
101101
102102
echo "CCACHE_DIR=${{runner.workspace}}/ccache" >> $GITHUB_ENV
103103
@@ -117,8 +117,8 @@ jobs:
117117
# The action installs to .lua/ and .luarocks/ in the runner home
118118
echo "LUA_DIR=$HOME/.lua" >> $GITHUB_ENV
119119
120-
# Help CMake find keg-only Homebrew packages (PCRE is keg-only on macOS)
121-
echo "PKG_CONFIG_PATH=${HOMEBREW_PREFIX}/opt/pcre/lib/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV
120+
# Help CMake find keg-only Homebrew packages (PCRE2 is keg-only on macOS)
121+
echo "PKG_CONFIG_PATH=${HOMEBREW_PREFIX}/opt/pcre2/lib/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV
122122
123123
# Install lua-yajl early to generate translation statistics
124124
luarocks --lua-version 5.1 install --local lua-yajl YAJL_DIR=${HOMEBREW_PREFIX}/opt/yajl
@@ -154,19 +154,23 @@ jobs:
154154
imagemagick \
155155
libassimp-dev \
156156
libboost-dev \
157+
libcurl4-openssl-dev \
157158
libglu1-mesa-dev \
158159
libhunspell-dev \
159160
liblua5.1-0-dev \
160-
libpcre3-dev \
161+
libpcre2-dev \
161162
libpulse-dev \
162163
libpugixml-dev \
163164
libsecret-1-dev \
164165
libsqlite3-dev \
165166
libxkbcommon-x11-0 \
166167
libyajl-dev \
167168
libzip-dev \
168-
pcregrep \
169+
pcre2-utils \
169170
pkg-config \
171+
libssl-dev \
172+
openssl \
173+
ca-certificates \
170174
-y
171175
172176
# switch to GCC that supports C++20 while retaining support for older OS's
@@ -207,7 +211,7 @@ jobs:
207211
env:
208212
GITHUB_EVENT_INPUTS_SCHEDULED: ${{inputs.scheduled}}
209213
run: |
210-
sudo apt-get -y install pcregrep
214+
sudo apt-get -y install pcre2-utils
211215
${{github.workspace}}/CI/travis.validate_deployment.sh
212216
${{github.workspace}}/CI/travis.set-build-info.sh
213217
@@ -216,7 +220,7 @@ jobs:
216220
env:
217221
GITHUB_EVENT_INPUTS_SCHEDULED: ${{inputs.scheduled}}
218222
run: |
219-
brew install pcre
223+
brew install pcre2
220224
${{github.workspace}}/CI/travis.validate_deployment.sh
221225
${{github.workspace}}/CI/travis.set-build-info.sh
222226
# ccache can't reliably detect that the compiler is clang on macOS, so just say so explicitly.
@@ -237,8 +241,12 @@ jobs:
237241
-DCMAKE_PREFIX_PATH=${{ env.QT_PREFIX != '' && env.QT_PREFIX || env.MINGW_BASE_DIR }}
238242
${{ runner.os == 'macOS' && format('-DLUA_INCLUDE_DIR={0}/.lua/include -DLUA_LIBRARY={0}/.lua/lib/liblua.a', github.workspace) || '' }}
239243
-DUSE_SANITIZER=""
244+
-DWITH_SENTRY=ON
245+
-DSENTRY_SEND_DEBUG=${{ (startsWith(github.ref, 'refs/tags/') || github.event_name == 'schedule' || github.event.inputs.scheduled == 'true') && '1' || '0' }}
246+
-DSENTRY_DSN=${{ secrets.SENTRY_DSN }}
240247
env:
241248
NINJA_STATUS: '[%f/%t %o/sec] '
249+
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
242250

243251
- name: Save ccache
244252
if: always() && steps.restore-ccache.outputs.cache-hit != 'true'
@@ -255,6 +263,11 @@ jobs:
255263
working-directory: '${{runner.workspace}}/b/ninja'
256264
run: ctest --output-on-failure
257265

266+
- name: Run QTest
267+
run: ctest --test-dir ${{runner.workspace}}/b/ninja -L functional --output-on-failure
268+
env:
269+
QT_FORCE_STDERR_LOGGING: 1
270+
258271
- name: install dependencies for packaging/tests
259272
if: matrix.deploy == 'deploy' || matrix.run_tests == 'true'
260273
run: |
@@ -266,11 +279,11 @@ jobs:
266279
if [ "$RUNNER_OS" = "macOS" ]; then
267280
$LUAROCKS lua-zip ZIP_DIR=${HOMEBREW_PREFIX}/opt/libzip
268281
$LUAROCKS LuaSQL-SQLite3 2.6.1 SQLITE_DIR=${HOMEBREW_PREFIX}/opt/sqlite
269-
$LUAROCKS lrexlib-pcre PCRE_DIR=${HOMEBREW_PREFIX}/opt/pcre
282+
$LUAROCKS lrexlib-pcre2 PCRE2_DIR=${HOMEBREW_PREFIX}/opt/pcre2
270283
else
271284
$LUAROCKS lua-zip
272285
$LUAROCKS LuaSQL-SQLite3 2.6.1
273-
$LUAROCKS lrexlib-pcre
286+
$LUAROCKS lrexlib-pcre2
274287
fi
275288
276289
# CI changelog generation dependencies
@@ -323,6 +336,7 @@ jobs:
323336
APPLE_USERNAME: ${{secrets.APPLE_USERNAME}}
324337
APPLE_PASSWORD: ${{secrets.APPLE_PASSWORD}}
325338
APPLE_TEAM_ID: ${{secrets.APPLE_TEAM_ID}}
339+
WITH_SENTRY: "ON"
326340

327341
- name: Upload packaged Mudlet
328342
uses: actions/upload-artifact@v5

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

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ on:
66
- '**.cpp'
77
- '**.h'
88
- '.github/workflows/clangtidy-diff-analysis.yml'
9+
workflow_dispatch:
10+
inputs:
11+
pr_number:
12+
description: 'PR number to analyze (required for clang-tidy to have files to check)'
13+
required: true
14+
type: number
915

1016
jobs:
1117
compile-mudlet:
@@ -29,7 +35,7 @@ jobs:
2935
- name: Checkout Mudlet source code
3036
uses: actions/checkout@v6
3137
with:
32-
submodules: true
38+
submodules: recursive
3339
fetch-depth: 0
3440
# https://github.com/ZedThree/clang-tidy-review/issues/10
3541
ref: ${{ github.event.pull_request.head.sha }}
@@ -79,6 +85,17 @@ jobs:
7985
- name: Use CMake 3.30.3
8086
uses: lukka/get-cmake@v3.30.3
8187

88+
- name: (Linux) Install Lua via GitHub Actions
89+
uses: leafo/gh-actions-lua@v12
90+
if: runner.os == 'Linux'
91+
with:
92+
luaVersion: "5.1.5"
93+
buildCache: false
94+
95+
- name: (Linux) Install Luarocks via GitHub Actions
96+
uses: leafo/gh-actions-luarocks@v6
97+
if: runner.os == 'Linux'
98+
8299
- name: (Linux) Install dependencies
83100
if: runner.os == 'Linux'
84101
run: |
@@ -87,9 +104,15 @@ jobs:
87104
# Install all required dependencies
88105
# liblua5.1-0-dev is needed for CMake to find Lua headers/library
89106
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
107+
libassimp-dev libpcre2-dev libpugixml-dev libsqlite3-dev libyajl-dev libhunspell-dev liblua5.1-0-dev libboost-dev -y
108+
109+
# Install lua-yajl early to generate translation statistics
110+
luarocks install --local lua-yajl
91111
92-
echo "Skipping generation of translation stats, so not installing lua-yajl."
112+
# Allow stats generation script to see location of lua-yajl
113+
eval "$(luarocks path --local --lua-version "5.1")"
114+
echo "LUA_PATH=$LUA_PATH" >> $GITHUB_ENV
115+
echo "LUA_CPATH=$LUA_CPATH" >> $GITHUB_ENV
93116
94117
- name: Generate compile_commands.json
95118
uses: lukka/run-cmake@v3
@@ -107,15 +130,18 @@ jobs:
107130
--target autogen
108131
109132
- name: Check C++ changes against style guide
110-
uses: ZedThree/clang-tidy-review@v0.22.1
133+
uses: ZedThree/clang-tidy-review@v0.22.2
111134
id: static_analysis
112135
with:
136+
pr: ${{ inputs.pr_number || github.event.pull_request.number }}
113137
build_dir: 'b/ninja' # path is relative to checkout directory
114138
exclude: '3rdparty'
115139
config_file: '.clang-tidy'
116140
# the action doesn't see system-level libraries, need to replicate them here
117-
apt_packages: 'gettext, pkg-config, libzip-dev, libglu1-mesa-dev, libpulse-dev'
141+
apt_packages: 'gettext, pkg-config, libzip-dev, libglu1-mesa-dev, libpulse-dev, libpcre3-dev, liblua5.1-0-dev, libassimp-dev, libboost-dev, libhunspell-dev, libpugixml-dev, libsecret-1-dev, libsqlite3-dev, libyajl-dev'
142+
# workaround for https://github.com/ZedThree/clang-tidy-review/issues/157
143+
extra_arguments: '--allow-no-checks'
118144
split_workflow: true
119145

120146
- name: Upload check results
121-
uses: ZedThree/clang-tidy-review/upload@v0.22.1
147+
uses: ZedThree/clang-tidy-review/upload@v0.22.2

.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.22.1
14+
- uses: ZedThree/clang-tidy-review/post@v0.22.2
1515
with:
1616
# don't post any comments if the PR is fine
1717
lgtm_comment_body: ''

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
# We must fetch at least the immediate parents so that if this is
4545
# a pull request then we can checkout the head.
4646
fetch-depth: 2
47-
submodules: true
47+
submodules: recursive
4848

4949
- name: (Windows) Install Qt
5050
uses: jurplel/install-qt-action@v4
@@ -118,8 +118,8 @@ jobs:
118118
119119
# Install all required dependencies
120120
# 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
121+
sudo apt-get install libsecret-1-dev ccache pkg-config pcre2-utils expect libzip-dev libglu1-mesa-dev libpulse-dev g++-${{matrix.gcc_compiler_version}} \
122+
libassimp-dev libpcre2-dev libpugixml-dev libsqlite3-dev libyajl-dev libhunspell-dev liblua5.1-0-dev libboost-dev -y
123123
124124
# switch to GCC that supports C++20 while retaining support for older OS's
125125
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{matrix.gcc_compiler_version}} ${{matrix.gcc_compiler_version}}

.github/workflows/performance-analysis.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,21 @@ jobs:
2525
uses: actions/checkout@v6
2626
with:
2727
fetch-depth: 0
28-
submodules: true
28+
submodules: recursive
2929

3030
- name: Use CMake 3.30.3
3131
uses: lukka/get-cmake@v3.30.3
3232

3333
- name: Install dependencies
3434
run: |
3535
sudo apt-get update
36-
sudo apt-get install build-essential git liblua5.1-dev zlib1g-dev libhunspell-dev libpcre3-dev \
37-
libzip-dev libboost-graph-dev libyajl-dev libpulse-dev lua-rex-pcre lua-filesystem lua-zip \
36+
sudo apt-get install build-essential git liblua5.1-dev zlib1g-dev libhunspell-dev libpcre2-dev \
37+
libzip-dev libboost-graph-dev libyajl-dev libpulse-dev lua-filesystem lua-zip \
3838
lua-sql-sqlite3 qt6-multimedia-dev qt6-tools-dev luarocks ccache libpugixml-dev cmake ninja-build \
3939
xvfb libassimp-dev -y
4040
41+
sudo luarocks install lrexlib-pcre2
42+
4143
sudo luarocks install luautf8
4244
sudo luarocks install lua-yajl YAJL_LIBDIR=`find /usr -name "libyajl.so" -printf '%h\n'` YAJL_INCDIR=/usr/include
4345

0 commit comments

Comments
 (0)