Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 23 additions & 6 deletions .github/workflows/nix-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,33 @@ jobs:
derivation: base-lib
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v22
- uses: DeterminateSystems/magic-nix-cache-action@v2
- uses: nixbuild/nix-quick-install-action@v30
with:
nix_conf: |
keep-env-derivations = true
keep-outputs = true
- name: Restore and save Nix store
uses: nix-community/cache-nix-action@v6
with:
# restore and save a cache using this key
primary-key: nix-${{ matrix.derivation }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
- run: nix build .#${{ matrix.derivation }} --print-build-logs

nix-shell:
name: "Test building inside a nix shell"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v22
- uses: DeterminateSystems/magic-nix-cache-action@v2
# for some reason this doesn't work without update, even though it doesn't download anything
- run: nix develop -Lv -c bash -c "cabal update; cabal v1-build"
- uses: nixbuild/nix-quick-install-action@v30
with:
nix_conf: |
keep-env-derivations = true
keep-outputs = true
- name: Restore and save Nix store
uses: nix-community/cache-nix-action@v6
with:
primary-key: nix-devshell-${{ hashFiles('**/*.nix', '**/flake.lock') }}
- name: drop into the devshell and run cabal
# for some reason this doesn't work without update
# even though it doesn't actually download anything
run: nix develop -Lv -c bash -c "cabal update; cabal v1-build"
Loading