Repository navigation
ci: test setup-zig override for vm action #66
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: CI | |
| on: | |
| push: | |
| pull_request: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| zig-version: ["0.14.1", "0.15.2", "0.16.0", "0.17.0", "master"] | |
| os: [ubuntu-latest, windows-latest] | |
| include: | |
| - zig-version: "master" | |
| os: macos-latest | |
| check-format: true | |
| - zig-version: "master" | |
| os: windows-latest | |
| build-options: "-Dtarget=native-native-msvc" | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Setup Zig | |
| uses: mlugg/setup-zig@v2 | |
| with: | |
| version: ${{ matrix.zig-version }} | |
| - if: ${{ matrix.check-format }} | |
| name: Check Formatting | |
| run: zig fmt --check --ast-check . | |
| - name: Build | |
| run: zig build -Dbuild-tests -Dbuild-benchmarks ${{ matrix.build-options }} --summary all | |
| bsd: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| zig-version: [0.16.0, 0.17.0] | |
| os: [freebsd, openbsd] | |
| arch: [x86_64] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Setup Zig | |
| uses: torque/setup-zig@override-autodetection | |
| with: | |
| version: ${{ matrix.zig-version }} | |
| force-host: ${{ matrix.arch }}-${{ matrix.os }} | |
| - name: Build (FreeBSD) | |
| if: matrix.os == 'freebsd' | |
| uses: vmactions/freebsd-vm@v1.5.9 | |
| with: &bsd_build | |
| copyback: false | |
| envs: ZIG_TOOLCHAIN_INSTALL_DIR | |
| run: | | |
| "${ZIG_TOOLCHAIN_INSTALL_DIR}"/zig build -Dbuild-tests -Dbuild-benchmarks --summary all | |
| - name: Build (OpenBSD) | |
| if: matrix.os == 'openbsd' | |
| uses: vmactions/openbsd-vm@v1.4.8 | |
| with: *bsd_build |