@@ -11,44 +11,67 @@ jobs:
1111 strategy :
1212 fail-fast : false
1313 matrix :
14- os :
15- - macos-14
16- runs-on : ${{ matrix.os }}
14+ target :
15+ - macos-aarch64-dyn
16+ - macos-x86_64-dyn
17+ include :
18+ - target : macos-aarch64-dyn
19+ arch_name : arm64-apple-macos
20+ run_test : true
21+ - target : macos-x86_64-dyn
22+ arch_name : x86_64-apple-darwin
23+ run_test : true
24+ runs-on : macos-15
1725
1826 steps :
27+ - name : Harden Runner
28+ uses : step-security/harden-runner@c6295a65d1254861815972266d5933fd6e532bdf # v2
29+ with :
30+ egress-policy : audit
31+
1932 - name : Checkout code
20- uses : actions/checkout@v4
33+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2134
22- - name : Setup Python 3.12
23- uses : actions/setup-python@v5
35+ - name : Setup Python 3.13
36+ uses : actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5
2437 with :
25- python-version : ' 3.12 '
38+ python-version : ' 3.13 '
2639
2740 - name : Install packages
2841 run : |
2942 brew update
30- brew unlink python3
31- # upgrade from [email protected] to [email protected] fails to overwrite those 32- rm -f /usr/local/bin/2to3 /usr/local/bin/2to3-3.12 /usr/local/bin/idle3 /usr/local/bin/idle3.12 /usr/local/bin/pydoc3 /usr/local/bin/pydoc3.12 /usr/local/bin/python3 /usr/local/bin/python3-config /usr/local/bin/python3.12 /usr/local/bin/python3.12-config
33- brew install gcovr ninja libmagic
43+ brew install gcovr || brew link --overwrite python # ninja
3444
3545 - name : Install Python modules
36- run : pip3 install meson==0.49.2 pytest
46+ run : pip3 install meson pytest
3747
3848 - name : Install dependencies
39- uses : kiwix/kiwix-build/actions/dl_deps_archive@main
49+ uses : kiwix/kiwix-build/actions/dl_deps_archive@77592b12ffa8f2b51f9b28e6f34643eb2d99ac62 # main
4050 with :
41- target_platform : macos-x86_64-dyn
51+ target_platform : ${{ matrix.target }}
4252
4353 - name : Compile
4454 shell : bash
4555 run : |
46- export PKG_CONFIG_PATH=$HOME/BUILD_x86_64-apple-darwin/INSTALL/lib/pkgconfig
47- export CPPFLAGS="-I$HOME/BUILD_x86_64-apple-darwin/INSTALL/include"
48- meson . build
56+ MESON_CROSSFILE="$HOME/BUILD_${{matrix.arch_name}}/meson_cross_file.txt"
57+ if [ -e $MESON_CROSSFILE ]; then
58+ MESON_OPTION="$MESON_OPTION --cross-file $MESON_CROSSFILE -Dstatic-linkage=true"
59+ cat $MESON_CROSSFILE
60+ fi
61+ export PKG_CONFIG_PATH=$HOME/BUILD_${{matrix.arch_name}}/INSTALL/lib/pkgconfig
62+ export CPPFLAGS="-I$HOME/BUILD_${{matrix.arch_name}}/INSTALL/include"
63+ meson . build ${MESON_OPTION}
4964 cd build
5065 ninja
5166
67+ - name : Test
68+ if : matrix.run_test
69+ shell : bash
70+ run : |
71+ export LD_LIBRARY_PATH=$HOME/BUILD_${{matrix.arch_name}}/INSTALL/lib:$HOME/BUILD_${{matrix.arch_name}}/INSTALL/lib64
72+ cd build
73+ meson test --verbose
74+
5275 Windows :
5376 runs-on : windows-2022
5477
0 commit comments