ci: use nix flake for building #164
Workflow file for this run
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: CI | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: Build and test | |
runs-on: ${{ matrix.os }}-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos, ubuntu, windows] | |
steps: | |
- if: matrix.os == 'windows' | |
run: git config --global core.autocrlf false | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@v15 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up Nix cache | |
uses: DeterminateSystems/magic-nix-cache-action@v8 | |
- run: nix develop --command bash -c "zig fmt --check src" | |
- run: nix develop --command bash -c "zig build test" | |
- run: nix develop --command bash -c "zig build run" |