Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Update to Zig 0.15.1 #14

Update to Zig 0.15.1

Update to Zig 0.15.1 #14

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
include:
- os: ubuntu-latest
target: x86_64-linux
- os: macos-latest
target: aarch64-macos
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
# 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: nix develop -c zig env
- name: Run tests
run: nix develop -c zig build test -Dtarget=${{ matrix.target }} --summary all
build-windows:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: mlugg/setup-zig@v2
with:
version: "0.15.1"
- run: zig env
- name: Run tests
run: zig build test -Dtarget=x86_64-windows-gnu --summary all
coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
# 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: nix develop -c zig env
- name: Run tests with coverage
run: nix develop -c zig build test -Dcoverage -Dtarget=x86_64-linux-musl --summary all
- name: Upload to Codecov
uses: codecov/codecov-action@v5
with:
directory: zig-out/coverage
fail_ci_if_error: true
verbose: true