flake.lock: Update #1286
Workflow file for this run
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 packages | |
# Triggered by pushes to any branch, but can also be triggered manually. | |
on: [push, workflow_dispatch] | |
# Only allow one run at a time per branch. | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref_name }} | |
# Specify bash to enable `-eo pipefail`. | |
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
# Get the list of packages to build (not broken or cached). | |
generate-matrix: | |
name: Get list of packages to build | |
runs-on: ubuntu-latest | |
outputs: | |
packages: ${{ steps.matrix.outputs.packages }} | |
steps: | |
- name: Set up repository | |
uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@v16 | |
- name: Get list of packages to build | |
id: matrix | |
run: ./automation.py get-packages-to-build | tee $GITHUB_STEP_SUMMARY | |
env: | |
NIX_CONFIG: extra-substituters = https://internetunexplorer.cachix.org | |
# Build the packages in parallel using a matrix strategy. | |
build: | |
name: Build ${{ matrix.package }} | |
runs-on: ubuntu-latest | |
needs: generate-matrix | |
# Skip this entire job if there are no packages to build. | |
if: needs.generate-matrix.outputs.packages != '[]' | |
strategy: | |
matrix: | |
package: ${{ fromJson(needs.generate-matrix.outputs.packages) }} | |
fail-fast: false # Keep going if some jobs fail. | |
steps: | |
- name: Set up repository | |
uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@v16 | |
# cachix-action will take care of pushing everything to the binary cache. | |
- name: Set up binary cache | |
uses: cachix/cachix-action@v15 | |
with: | |
name: internetunexplorer | |
authToken: ${{ secrets.CACHIX_TOKEN }} | |
pushFilter: "-source$" # Skip pushing sources to save space. | |
- name: Build ${{ matrix.package }} | |
run: nix build .#${{ matrix.package }} --print-build-logs | |
# Branch protection rules cannot require the success of all of the jobs in a | |
# matrix, so we need an extra job to report the status. | |
# https://github.com/orgs/community/discussions/26822 | |
check-status: | |
name: Wait for build(s) to succeed | |
runs-on: ubuntu-latest | |
needs: build | |
# Always run this job, even when no packages were built. | |
# https://docs.github.com/en/actions/learn-github-actions/expressions#status-check-functions | |
if: always() | |
steps: | |
- run: exit 1 | |
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') |