add a github action to test the nix flake works and doesn't break #14
Workflow file for this run
This file contains hidden or 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: Test Nix Flake | ||
Check failure on line 1 in .github/workflows/nix.yml
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
workflow_dispatch: | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
jobs: | ||
nix-flake-check: | ||
steps: | ||
- uses: actions/checkout@v5 | ||
with: | ||
submodules: recursive | ||
- uses: cachix/install-nix-action@v31 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
- name: nix flake check for all platforms | ||
run: | | ||
nix flake check --all-systems | ||
nix-build-linux: | ||
steps: | ||
- uses: actions/checkout@v5 | ||
with: | ||
submodules: recursive | ||
- uses: cachix/install-nix-action@v31 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
- name: nix build . for x86_64-linux | ||
run: nix build . | ||
nix-build-macos: | ||
steps: | ||
- uses: actions/checkout@v5 | ||
with: | ||
submodules: recursive | ||
- uses: cachix/install-nix-action@v31 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
- name: nix build for x86_64-darwin | ||
run: nix build . |