Skip to content

ci(gh-actions): Improvement to the CI pipeline #79

ci(gh-actions): Improvement to the CI pipeline

ci(gh-actions): Improvement to the CI pipeline #79

Workflow file for this run

name: CI
on:
workflow_dispatch:
merge_group:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
generate-matrix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v9
- id: generate-matrix
name: Generate Nix Matrix
run: |
set -Eeu
matrix="$(nix eval --json '.#lib.mkGHActionsMatrix')"
echo "matrix=$matrix" >> "$GITHUB_OUTPUT"
outputs:
matrix: ${{ steps.generate-matrix.outputs.matrix }}
build:
needs: generate-matrix
strategy:
fail-fast: false
matrix: ${{fromJSON(needs.generate-matrix.outputs.matrix)}}
name: ${{ matrix.package }} (${{ matrix.os }})
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.allowedToFail }}
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v9
- name: Run the Magic Nix Cache
uses: DeterminateSystems/magic-nix-cache-action@v2
- uses: cachix/cachix-action@v14
with:
name: ${{ vars.CACHIX_CACHE }}
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- name: Build ${{ matrix.package }}
run: nix build -L --json --no-link '.#${{ matrix.attrPath }}'