Introduce CI workflow with cross-platform support #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build test | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
concurrency: | |
# Cancels pending runs when a PR gets updated. | |
group: ${{ github.head_ref || github.run_id }}-${{ github.actor }} | |
cancel-in-progress: true | |
jobs: | |
build-test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest, ubuntu-latest] | |
runs-on: ${{matrix.os}} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
# Install Nix and use that to run our tests so our environment matches exactly. | |
- uses: cachix/install-nix-action@v30 | |
with: | |
nix_path: nixpkgs=channel:nixos-unstable | |
# Run our checks to catch quick issues | |
- run: nix flake check | |
- name: build & test | |
run: nix develop -c zig build test --summary all |