Skip to content

ci: use nix flake for building #164

ci: use nix flake for building

ci: use nix flake for building #164

Workflow file for this run

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"