Skip to content

Merge pull request #26 from NixOS/ci #21

Merge pull request #26 from NixOS/ci

Merge pull request #26 from NixOS/ci #21

Workflow file for this run

name: "nixpkgs CI"
on:
workflow_dispatch:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
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: 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) }}
steps:
- 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 }}
env:
ATTR: ${{ matrix.version }}
run: |
nix-build ci.nix -A "$ATTR"