Skip to content

Commit

Permalink
.github/workflows: per GHC step, gc after
Browse files Browse the repository at this point in the history
  • Loading branch information
sternenseemann committed Dec 24, 2024
1 parent 9c93336 commit 9d9c86a
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions .github/workflows/nixpkgs-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,35 @@ on:
branches: [ master ]

jobs:
nix-build:
get-ghc-versions:
name: Determine GHC versions to test
runs-on: ubuntu-latest
outputs:
versions: ${{ steps.get-ghc-versions-step.outputs.versions }}

steps:
- uses: actions/[email protected]
- uses: cachix/install-nix-action@v30
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: ci.nix
run: nix-build ci.nix
- name: Get GHC Versions from ci.nix
id: get-ghc-versions-step
run: |
echo -n "versions=" >> "$GITHUB_OUTPUT"
nix-instantiate --eval --strict --json -E 'builtins.attrNames (import ./ci.nix { })' >> "$GITHUB_OUTPUT"
nix-build:
runs-on: ubuntu-latest
needs:
- get-ghc-versions
strategy:
matrix:
version: ${{ fromJSON(needs.get-ghc-versions.outputs.versions) }}
- uses: actions/[email protected]
- uses: cachix/install-nix-action@v30
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: nix-build ci.nix -A ${{ matrix.version }}
run: |
nix-build -A ${{ matrix.version }}
nix-store --gc

0 comments on commit 9d9c86a

Please sign in to comment.