Skip to content

windows: fix zig 0.15 callconv #518

windows: fix zig 0.15 callconv

windows: fix zig 0.15 callconv #518

Workflow file for this run

on: [push, pull_request]
name: Test
jobs:
build:
strategy:
matrix:
os: [namespace-profile-mitchellh-sm]
target: [
aarch64-linux-gnu,
aarch64-linux-musl,
x86_64-linux-gnu,
x86_64-linux-musl,
aarch64-macos,
x86_64-macos,
# wasm32-wasi, - regressed in Zig 0.13
x86_64-windows-gnu
# Broken but not in any obvious way:
# x86-linux-gnu,
# x86-linux-musl,
# x86-windows,
]
runs-on: ${{ matrix.os }}
needs: [test-x86_64-linux, test-x86_64-windows]
env:
ZIG_LOCAL_CACHE_DIR: /zig/local-cache
ZIG_GLOBAL_CACHE_DIR: /zig/global-cache
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Setup Cache
uses: namespacelabs/[email protected]
with:
path: |
/nix
/zig
# Install Nix and use that to run our tests so our environment matches exactly.
- uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-unstable
# Run our checks to catch quick issues
- run: nix flake check
# Run our go tests within the context of the dev shell from the flake. This
# will ensure we have all our dependencies.
- name: test
run: nix develop -c zig build --summary all -Dtarget=${{ matrix.target }}
test-x86_64-linux:
strategy:
matrix:
os: [namespace-profile-mitchellh-sm]
runs-on: ${{ matrix.os }}
env:
ZIG_LOCAL_CACHE_DIR: /zig/local-cache
ZIG_GLOBAL_CACHE_DIR: /zig/global-cache
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Setup Cache
uses: namespacelabs/[email protected]
with:
path: |
/nix
/zig
- uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-unstable
# Run our checks to catch quick issues
- run: nix flake check
# Run our go tests within the context of the dev shell from the flake. This
# will ensure we have all our dependencies.
- name: test
run: nix develop -c zig build test --summary all
# WASI has regressed since Zig 0.13, we should fix it.
# - name: test wasi
# run: nix develop -c zig build test -Dtarget=wasm32-wasi -fwasmtime --summary all
- name: build all benchmarks and examples
run: nix develop -c zig build -Demit-example -Demit-bench --summary all
# Run a full build to ensure that works
- run: nix build
test-x86_64-freebsd:
runs-on: namespace-profile-mitchellh-sm-systemd
steps:
- name: Checkout code
uses: actions/checkout@v5
# Required by Namespace
- run: sudo systemctl start ssh
- name: test
uses: vmactions/freebsd-vm@v1
with:
usesh: true
prepare: |
sed 's/quarterly/latest/g' /etc/pkg/FreeBSD.conf
pkg update -f
pkg upgrade -y
pkg install -y wget
run: |
wget https://ziglang.org/download/0.15.1/zig-x86_64-freebsd-0.15.1.tar.xz
tar -xf zig-x86_64-freebsd-0.15.1.tar.xz
zig-x86_64-freebsd-0.15.0-dev.777+6810ffa42/zig build test --summary all
zig-x86_64-freebsd-0.15.0-dev.777+6810ffa42/zig build -Demit-example -Demit-bench --summary all
test-aarch64-macos:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Install zig
uses: mlugg/setup-zig@v2
with:
version: 0.15.1
- name: test
run: zig build test --summary all
- name: build all benchmarks and examples
run: zig build -Demit-example -Demit-bench --summary all
test-x86_64-windows:
strategy:
matrix:
os: [windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Install zig
uses: mlugg/setup-zig@v2
with:
version: 0.15.1
- name: test
run: zig build test --summary all
- name: build all benchmarks and examples
run: zig build -Demit-example -Demit-bench --summary all