chore: update mac-based hosts #58
This file contains 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
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
matrix: | |
permissions: | |
contents: read | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.generate.outputs.matrix }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: DeterminateSystems/nix-installer-action@v16 | |
with: | |
extra-conf: | | |
accept-flake-config = true | |
- id: generate | |
name: generate Matrix | |
run: | | |
set -Eeu | |
echo "matrix=$(nix eval --json '.#githubActions.matrix')" >> "$GITHUB_OUTPUT" | |
check-eval: | |
permissions: | |
contents: read | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: DeterminateSystems/nix-installer-action@v16 | |
with: | |
extra-conf: | | |
accept-flake-config = true | |
- name: nix flake check | |
run: | | |
nix flake check \ | |
--print-build-logs \ | |
--show-trace | |
check-build-matrix: | |
name: ${{ matrix.name }}.${{ matrix.system }} | |
needs: matrix | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: ${{fromJSON(needs.matrix.outputs.matrix)}} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: DeterminateSystems/nix-installer-action@v16 | |
with: | |
extra-conf: | | |
accept-flake-config = true | |
- uses: cachix/cachix-action@v15 | |
with: | |
name: mirkolenz | |
authToken: ${{ secrets.CACHIX_TOKEN }} | |
- name: nix build | |
run: | | |
nix build \ | |
--print-build-logs \ | |
--show-trace \ | |
--no-link \ | |
'.#${{ matrix.attr }}' | |
check-build: | |
needs: check-build-matrix | |
runs-on: ubuntu-latest | |
if: always() | |
steps: | |
- run: | | |
result="${{ needs.check-build-matrix.result }}" | |
if [[ $result == "success" ]]; then | |
exit 0 | |
else | |
exit 1 | |
fi |