|
8 | 8 | workflow_dispatch: |
9 | 9 |
|
10 | 10 | jobs: |
11 | | - build: |
12 | | - strategy: |
13 | | - fail-fast: false |
14 | | - matrix: |
15 | | - zig-version: ["0.14.1", "0.15.2", "0.16.0", "0.17.0", "master"] |
16 | | - os: [ubuntu-latest, windows-latest] |
17 | | - include: |
18 | | - - zig-version: "master" |
19 | | - os: macos-latest |
20 | | - check-format: true |
21 | | - - zig-version: "master" |
22 | | - os: windows-latest |
23 | | - build-options: "-Dtarget=native-native-msvc" |
24 | | - |
25 | | - runs-on: ${{ matrix.os }} |
26 | | - steps: |
27 | | - - name: Checkout |
28 | | - uses: actions/checkout@v7 |
29 | | - |
30 | | - - name: Setup Zig |
31 | | - uses: mlugg/setup-zig@v2 |
32 | | - with: |
33 | | - version: ${{ matrix.zig-version }} |
34 | | - |
35 | | - - if: ${{ matrix.check-format }} |
36 | | - name: Check Formatting |
37 | | - run: zig fmt --check --ast-check . |
38 | | - |
39 | | - - name: Build |
40 | | - run: zig build -Dbuild-tests -Dbuild-benchmarks ${{ matrix.build-options }} --summary all |
41 | | - |
42 | 11 | bsd: |
43 | 12 | runs-on: ubuntu-latest |
44 | 13 | timeout-minutes: 30 |
45 | | - strategy: |
46 | | - fail-fast: false |
47 | | - matrix: |
48 | | - zig-version: [0.16.0, 0.17.0] |
49 | | - os: [freebsd, openbsd] |
50 | | - include: |
51 | | - - os: freebsd |
52 | | - packages: pkg install -y curl minisign |
53 | | - - os: openbsd |
54 | | - packages: pkg_add -I curl minisign xz # OpenBSD tar cannot decompress .tar.xz |
55 | 14 | steps: |
56 | 15 | - name: Checkout |
57 | 16 | uses: actions/checkout@v7 |
58 | | - |
| 17 | + - name: Setup Zig |
| 18 | + uses: torque/setup-zig@override-autodetection |
| 19 | + with: |
| 20 | + version: latest |
| 21 | + force-host: x86_64-freebsd |
59 | 22 | - name: Build (FreeBSD) |
60 | | - if: matrix.os == 'freebsd' |
61 | 23 | uses: vmactions/freebsd-vm@v1.5.9 |
62 | | - with: &bsd_build |
| 24 | + with: |
63 | 25 | cache-after-prepare: true |
64 | 26 | copyback: false |
65 | | - prepare: | |
66 | | - ${{ matrix.packages }} |
67 | | - mkdir -p /usr/local |
68 | | - curl -fsSL https://ziglang.org/download/${{ matrix.zig-version }}/zig-x86_64-${{ matrix.os }}-${{ matrix.zig-version }}.tar.xz -o /tmp/zig.tar.xz |
69 | | - curl -fsSL https://ziglang.org/download/${{ matrix.zig-version }}/zig-x86_64-${{ matrix.os }}-${{ matrix.zig-version }}.tar.xz.minisig -o /tmp/zig.tar.xz.minisig |
70 | | - minisign -VP 'RWSGOq2NVecA2UPNdBUZykf1CCb147pkmdtYxgb3Ti+JO/wCYvhbAb/U' -m /tmp/zig.tar.xz |
71 | | - xzcat /tmp/zig.tar.xz | tar -xf - -C /usr/local/ |
72 | | - mv /usr/local/zig-x86_64-${{ matrix.os }}-${{ matrix.zig-version }} /usr/local/zig |
73 | | - rm -v /tmp/zig.tar.xz /tmp/zig.tar.xz.minisig |
| 27 | + envs: ZIG_TOOLCHAIN_INSTALL_DIR |
74 | 28 | run: | |
75 | | - /usr/local/zig/zig build -Dbuild-tests -Dbuild-benchmarks --summary all |
76 | | -
|
77 | | - - name: Build (OpenBSD) |
78 | | - if: matrix.os == 'openbsd' |
79 | | - uses: vmactions/openbsd-vm@v1.4.8 |
80 | | - with: *bsd_build |
| 29 | + env | sort; |
| 30 | + ${ZIG_TOOLCHAIN_INSTALL_DIR}/zig version; |
0 commit comments