This repository was archived by the owner on May 24, 2026. It is now read-only.
use github mirrors due to flakey gitlab #21
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: Build | |
| on: | |
| push: | |
| branches: [master, develop] | |
| pull_request: | |
| branches: [master, develop] | |
| workflow_dispatch: | |
| jobs: | |
| windows: | |
| runs-on: windows-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - arch: x86 | |
| msystem: MINGW32 | |
| prefix: mingw-w64-i686 | |
| - arch: x64 | |
| msystem: UCRT64 | |
| prefix: mingw-w64-ucrt-x86_64 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: ${{ matrix.msystem }} | |
| install: >- | |
| ${{ matrix.prefix }}-gcc | |
| ${{ matrix.prefix }}-meson | |
| ${{ matrix.prefix }}-pkgconf | |
| ${{ matrix.prefix }}-glib2 | |
| ${{ matrix.prefix }}-libxml2 | |
| mingw-w64-ucrt-x86_64-vala | |
| bison | |
| - name: Build | |
| shell: msys2 {0} | |
| run: | | |
| export PATH="/${{ matrix.msystem }}:/ucrt64/bin:$PATH" | |
| export XDG_DATA_DIRS="/ucrt64/share:/${MSYSTEM,,}/share:/usr/share" | |
| meson setup builddir --default-library=static --prefer-static | |
| meson compile -C builddir | |
| - name: Verify | |
| run: builddir\wixl.exe --version | |
| - name: Rename binary | |
| run: copy builddir\wixl.exe wixl-win-${{ matrix.arch }}.exe | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: build-win-${{ matrix.arch }} | |
| path: wixl-win-${{ matrix.arch }}.exe | |
| retention-days: 1 | |
| linux: | |
| runs-on: ${{ matrix.runner }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - arch: x64 | |
| runner: ubuntu-latest | |
| - arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Build in Alpine | |
| run: | | |
| docker run --rm -v "$PWD":/src -w /src alpine:latest sh -c ' | |
| set -e | |
| apk add --no-cache \ | |
| gcc musl-dev meson vala bison pkgconf file \ | |
| glib-dev glib-static \ | |
| libxml2-dev libxml2-static \ | |
| zlib-dev zlib-static \ | |
| pcre2-dev pcre2-static \ | |
| libffi-dev \ | |
| xz-dev xz-static \ | |
| util-linux-dev util-linux-static | |
| echo "=== Verifying static libs ===" | |
| ls /usr/lib/libglib-2.0.a /usr/lib/libgio-2.0.a /usr/lib/libgobject-2.0.a /usr/lib/libxml2.a /usr/lib/libz.a /usr/lib/libpcre2-8.a /usr/lib/libffi.a /usr/lib/liblzma.a /usr/lib/libmount.a /usr/lib/libblkid.a | |
| meson setup builddir --default-library=static --prefer-static | |
| meson compile -C builddir | |
| file builddir/wixl | |
| ldd builddir/wixl || echo "statically linked" | |
| builddir/wixl --version | |
| ' | |
| - name: Rename binary | |
| run: cp builddir/wixl wixl-linux-${{ matrix.arch }} | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: build-linux-${{ matrix.arch }} | |
| path: wixl-linux-${{ matrix.arch }} | |
| retention-days: 1 | |
| macos: | |
| runs-on: ${{ matrix.runner }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - arch: arm64 | |
| runner: macos-latest | |
| - arch: x64 | |
| runner: macos-15-intel | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install dependencies | |
| run: | | |
| brew install meson vala bison glib libxml2 zlib libffi cmake | |
| echo "$(brew --prefix bison)/bin" >> $GITHUB_PATH | |
| - name: Build static libxml2 | |
| run: | | |
| brew fetch --force libxml2 | |
| TARBALL=$(brew --cache libxml2) | |
| TMPDIR=$(mktemp -d) | |
| tar xf "$TARBALL" -C "$TMPDIR" | |
| cd "$TMPDIR"/libxml2-* | |
| cmake -B build \ | |
| -DBUILD_SHARED_LIBS=OFF \ | |
| -DLIBXML2_WITH_PYTHON=OFF \ | |
| -DLIBXML2_WITH_ICU=OFF \ | |
| -DLIBXML2_WITH_LZMA=OFF \ | |
| -DZLIB_ROOT=$(brew --prefix zlib) | |
| cmake --build build | |
| cp build/libxml2.a "$(brew --prefix libxml2)/lib/" | |
| - name: Build | |
| run: | | |
| export PKG_CONFIG_PATH="$(brew --prefix libxml2)/lib/pkgconfig:$(brew --prefix zlib)/lib/pkgconfig:$(brew --prefix libffi)/lib/pkgconfig:$PKG_CONFIG_PATH" | |
| export LDFLAGS="-L$(brew --prefix zlib)/lib -L$(brew --prefix libffi)/lib -L$(brew --prefix libxml2)/lib" | |
| export CPPFLAGS="-I$(brew --prefix libxml2)/include" | |
| meson setup builddir --default-library=static --prefer-static | |
| meson compile -C builddir | |
| - name: Verify | |
| run: | | |
| file builddir/wixl | |
| otool -L builddir/wixl | |
| ls -lh builddir/wixl | |
| builddir/wixl --version | |
| if otool -L builddir/wixl | grep -E '\.(dylib|so)' | grep -v '/usr/lib/\|/System/Library/'; then | |
| echo "ERROR: Found non-system dynamic dependencies!" | |
| exit 1 | |
| fi | |
| - name: Rename binary | |
| run: cp builddir/wixl wixl-macos-${{ matrix.arch }} | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: build-macos-${{ matrix.arch }} | |
| path: wixl-macos-${{ matrix.arch }} | |
| retention-days: 1 | |
| package: | |
| runs-on: macos-latest | |
| needs: [windows, linux, macos] | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| pattern: build-* | |
| merge-multiple: true | |
| - name: Create macOS universal binary | |
| run: | | |
| lipo -create wixl-macos-arm64 wixl-macos-x64 -output wixl-osx-universal | |
| chmod +x wixl-osx-universal | |
| file wixl-osx-universal | |
| rm wixl-macos-arm64 wixl-macos-x64 | |
| - name: Prepare release directory | |
| run: | | |
| mkdir release | |
| mv wixl-win-x86.exe release/ | |
| mv wixl-win-x64.exe release/ | |
| mv wixl-linux-x64 release/ | |
| mv wixl-linux-arm64 release/ | |
| mv wixl-osx-universal release/ | |
| ls -la release/ | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: wixl | |
| path: release/* |