Skip to content

ci: add zig 0.17.0 and bump checkout to latest #55

ci: add zig 0.17.0 and bump checkout to latest

ci: add zig 0.17.0 and bump checkout to latest #55

Workflow file for this run

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:
name: ${{ matrix.os }}
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
zig-version: [0.16.0, 0.17.0]
os: [freebsd, openbsd]
include:
- os: freebsd
packages: pkg install -y curl
- os: openbsd
packages: pkg_add -I curl xz # OpenBSD tar cannot decompress .tar.xz
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Build (FreeBSD)
if: matrix.os == 'freebsd'
uses: vmactions/freebsd-vm@v1.5.9
with: &bsd_build
cache-after-prepare: true
copyback: false
prepare: |
${{ matrix.packages }}
mkdir -p /usr/local/zig
curl -fsSL https://ziglang.org/download/${{ matrix.zig-version }}/zig-x86_64-${{ matrix.os }}-${{ matrix.zig-version }}.tar.xz -o /usr/local/zig/zig.tar.xz
run: |
set -e
xzcat /usr/local/zig/zig.tar.xz | tar -xf - -C /usr/local/zig/
export PATH="/usr/local/zig/zig-x86_64-${{ matrix.os }}-${{ matrix.zig-version }}:$PATH"
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