Skip to content

Commit

Permalink
Introduce CI workflow with cross-platform support
Browse files Browse the repository at this point in the history
- Introduce a new CI workflow to enhance automatic testing on multiple platforms.
- Ensure CI triggers for all pull requests and push events to the main branch.
- Implement Nix for uniform build and test environment across different systems.
  • Loading branch information
thekorn committed Dec 1, 2024
1 parent 415c718 commit c71081d
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
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

0 comments on commit c71081d

Please sign in to comment.