fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! wip: switch f… #54
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
name: Build flake outputs | |
on: | |
push: | |
branches: | |
- main | |
- next | |
- build/gha-nix-fast-build | |
# pull_request: | |
env: | |
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | |
RUN_ID: ${{ github.run_id }} | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.branch }} | |
cancel-in-progress: true | |
jobs: | |
nix-matrix: | |
runs-on: [self-hosted] | |
outputs: | |
matrix: ${{ steps.generate-matrix.outputs.matrix }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: cachix/install-nix-action@v30 | |
- id: generate-matrix | |
name: Generate Nix Matrix | |
run: | | |
set -Eeu | |
matrix="$(nix eval --json '.#githubActions.matrix')" | |
echo "matrix=$matrix" >> "$GITHUB_OUTPUT" | |
build: | |
# runs-on: ${{ matrix.system }} | |
runs-on: [self-hosted] | |
strategy: | |
matrix: ${{ fromJSON(needs.nix-matrix.outputs.matrix) }} | |
# matrix: | |
# job: | |
# - systems: x86_64-linux | |
# - systems: aaarch64-darwin aaarch64-linux | |
# mac_address: 16:3e:75:99:c8:5a | |
# fail-fast: false | |
steps: | |
- uses: actions/checkout@main | |
- name: Wake builder | |
if: ${{ matrix.job.mac_address != '' }} | |
run: wol "${{ matrix.job.mac_address }}" | |
- name: Run nix-fast-build | |
run: nix build --flake .#${{ matrix.attr }} | |
- name: Generate build report | |
uses: dorny/test-reporter@main | |
if: success() || failure() | |
with: | |
name: Build Repoprt | |
path: report.xml | |
reporter: jest-junit | |
- name: Add GC roots | |
if: success() | |
run: ./.github/workflows/gc-roots.nu add "$BRANCH_NAME" "$RUN_ID" |