test-api: fix Windows tests #7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: test | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| msvc: | |
| name: ${{ matrix.name }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: win32-x86 | |
| runs_on: windows-2025 | |
| msbuild_arch: x86 | |
| - name: win64-x64 | |
| runs_on: windows-2025 | |
| msbuild_arch: x64 | |
| - name: win-arm64 | |
| runs_on: windows-11-arm | |
| msbuild_arch: arm64 | |
| runs-on: ${{ matrix.runs_on }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up MSBuild | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| arch: ${{ matrix.msbuild_arch }} | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.x" | |
| - name: Install Meson and Ninja | |
| shell: pwsh | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install meson ninja | |
| - name: Install WiX | |
| run: | | |
| dotnet tool install --global wix | |
| $wixVersion = (wix --version).Trim() | |
| wix eula accept wix7 | |
| wix extension add -g "WixToolset.UI.wixext/$wixVersion" | |
| - name: Build | |
| run: | | |
| meson _build --vsenv | |
| meson compile -C _build msi | |
| - name: Run tests | |
| run: | | |
| meson test -v -C _build | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: build-output-${{ matrix.msbuild_arch }} | |
| path: | | |
| _build/*.exe | |
| _build/*.dll | |
| _build/*.msi | |
| msys2: | |
| runs-on: windows-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: [ | |
| { msystem: MINGW64, arch: x86_64}, | |
| ] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: setup-msys2 | |
| uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: ${{ matrix.msystem }} | |
| update: true | |
| install: >- | |
| mingw-w64-${{ matrix.arch }}-meson | |
| mingw-w64-${{ matrix.arch }}-ninja | |
| mingw-w64-${{ matrix.arch }}-gcc | |
| - name: Build | |
| shell: msys2 {0} | |
| run: | | |
| # the code assumes msvc style printf atm | |
| export CFLAGS=-D__USE_MINGW_ANSI_STDIO=0 | |
| meson _build | |
| meson compile -C _build | |
| - name: Run tests | |
| shell: msys2 {0} | |
| run: | | |
| meson test -v -C _build | |
| debian-meson: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: debian:testing | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Update system and add dependencies | |
| run: | | |
| apt-get update | |
| apt-get install -y kyua atf-sh build-essential meson | |
| - name: Build | |
| run: | | |
| meson _build -Dwerror=true | |
| meson compile -C _build | |
| - name: Run tests | |
| run: | | |
| meson test -v -C _build | |
| debian-meson-asan: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: debian:testing | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Update system and add dependencies | |
| run: | | |
| apt-get update | |
| apt-get install -y kyua atf-sh build-essential meson | |
| - name: Build | |
| run: | | |
| meson _build -Db_sanitize=address | |
| meson compile -C _build | |
| - name: Run tests | |
| run: | | |
| meson test -v -C _build | |
| env: | |
| ASAN_OPTIONS: "exitcode=7" | |
| debian-autotools: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: debian:testing | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Update system and add dependencies | |
| run: | | |
| apt-get update | |
| apt-get install -y kyua atf-sh build-essential autoconf libtool | |
| - name: Build | |
| run: | | |
| ./autogen.sh | |
| ./configure | |
| make -j9 | |
| - name: Run tests | |
| run: | | |
| make distcheck | |
| alpine-meson: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: alpine | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Update system and add dependencies | |
| run: | | |
| apk update | |
| apk add kyua atf build-base meson | |
| - name: Build | |
| run: | | |
| meson _build -Dwerror=true | |
| meson compile -C _build | |
| - name: Run tests | |
| run: | | |
| meson test -v -C _build | |
| alpine-muon: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: alpine | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Update system and add dependencies | |
| run: | | |
| apk update | |
| apk add kyua atf build-base muon samurai | |
| - name: Build | |
| run: | | |
| muon setup -Ddefault_library=both -Dwerror=true _build | |
| samu -C _build | |
| - name: Run tests | |
| run: | | |
| cd _build | |
| muon test -v -v | |
| alpine-autotools: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: alpine | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Update system and add dependencies | |
| run: | | |
| apk update | |
| apk add kyua atf build-base autoconf automake libtool xz gzip tar | |
| - name: Build | |
| run: | | |
| ./autogen.sh | |
| ./configure | |
| make -j9 | |
| - name: Run tests | |
| run: | | |
| make distcheck | |
| analysis: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: alpine | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Update system and add dependencies | |
| run: | | |
| apk update | |
| apk add kyua atf build-base autoconf automake libtool xz gzip | |
| - name: Build | |
| run: | | |
| export CFLAGS="-Wall -Werror -O2 -ggdb3 -fanalyzer" | |
| ./autogen.sh | |
| ./configure | |
| make -j9 CFLAGS="$CFLAGS" | |
| llvm-sanitizers: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: alpine | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Update system and add dependencies | |
| run: | | |
| apk update | |
| apk add kyua atf build-base meson clang cmd:llvm-symbolizer compiler-rt | |
| - name: Build | |
| run: | | |
| CC=clang meson _build -Dwerror=true -Db_sanitize=address,undefined -Db_lundef=false | |
| meson compile -C _build | |
| - name: Run tests | |
| run: | | |
| meson test -v -C _build | |
| lite: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: alpine | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Update system and add dependencies | |
| run: | | |
| apk update | |
| apk add build-base clang cmd:llvm-symbolizer compiler-rt | |
| - name: Build | |
| run: | | |
| export CC=clang | |
| export CFLAGS="-O2 -Wall -Wextra -ggdb3 -fsanitize=address,undefined" | |
| make -f Makefile.lite PKG_DEFAULT_PATH="/usr/lib/pkgconfig:/usr/share/pkgconfig" SYSTEM_LIBDIR="/usr/lib" SYSTEM_INCLUDEDIR="/usr/include" -j $(nproc) | |
| - name: Run tests | |
| run: | | |
| export CC=clang | |
| export CFLAGS="-O2 -Wall -Wextra -ggdb3 -fsanitize=address,undefined" | |
| make -f Makefile.lite PKG_DEFAULT_PATH="/usr/lib/pkgconfig:/usr/share/pkgconfig" SYSTEM_LIBDIR="/usr/lib" SYSTEM_INCLUDEDIR="/usr/include" -j $(nproc) check |