Skip to content

ci: test setup-zig override for vm action #66

ci: test setup-zig override for vm action

ci: test setup-zig override for vm action #66

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:
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