chores: use custom github runners #3659
This file contains hidden or 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: Nix CI | |
on: | |
push: | |
branches: | |
- develop | |
- release/* | |
pull_request: | |
workflow_dispatch: | |
permissions: | |
id-token: write | |
# required by testinfra-ami-build dependent workflows | |
contents: write | |
packages: write | |
jobs: | |
nix-eval: | |
runs-on: blacksmith-32vcpu-ubuntu-2404 | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
- name: Install nix | |
uses: cachix/install-nix-action@v31 | |
with: | |
install_url: https://releases.nixos.org/nix/nix-2.31.2/install | |
- id: set-matrix | |
name: Generate Nix Matrix | |
run: | | |
set -Eeu | |
echo matrix="$(nix shell nixpkgs/nix-eval-jobs/405fc615369e0ea1b9c284c107ca4c3e1bc15774 --command scripts/github-matrix.py checks legacyPackages)" >> "$GITHUB_OUTPUT" | |
nix-build-aarch64-linux: | |
name: ${{ matrix.name }} (aarch64-linux) | |
needs: nix-eval | |
runs-on: ${{ matrix.runs_on.group && matrix.runs_on || matrix.runs_on.labels }} | |
if: ${{ fromJSON(needs.nix-eval.outputs.matrix).aarch64_linux != null }} | |
strategy: | |
fail-fast: false | |
max-parallel: 5 | |
matrix: ${{ fromJSON(needs.nix-eval.outputs.matrix).aarch64_linux }} | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
- name: Build Nix Package | |
uses: ./.github/actions/nix-build-self-hosted | |
with: | |
attr: ${{ matrix.attr }} | |
nix-build-aarch64-darwin: | |
name: ${{ matrix.name }} (aarch64-darwin) | |
needs: nix-eval | |
runs-on: ${{ matrix.runs_on.group && matrix.runs_on || matrix.runs_on.labels }} | |
if: ${{ fromJSON(needs.nix-eval.outputs.matrix).aarch64_darwin != null }} | |
strategy: | |
fail-fast: false | |
max-parallel: 5 | |
matrix: ${{ fromJSON(needs.nix-eval.outputs.matrix).aarch64_darwin }} | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
- name: Build Nix Package | |
uses: ./.github/actions/nix-build-self-hosted | |
with: | |
attr: ${{ matrix.attr }} | |
# TODO | |
# nix-build-x86_64-linux: | |
# name: ${{matrix.postgresql_version}}.${{ matrix.name }} (x86_64-linux) | |
# needs: nix-eval | |
# runs-on: ${{ matrix.runs_on.group && matrix.runs_on || matrix.runs_on.labels }} | |
# if: ${{ fromJSON(needs.nix-eval.outputs.matrix).x86_64_linux != null }} | |
# strategy: | |
# fail-fast: false | |
# max-parallel: 3 | |
# matrix: ${{ fromJSON(needs.nix-eval.outputs.matrix).x86_64_linux }} | |
# steps: | |
# - name: Checkout Repo | |
# uses: actions/checkout@v4 | |
# - name: Build Nix Package | |
# uses: ./.github/actions/nix-build-self-hosted | |
# with: | |
# attr: ${{ matrix.attr }} | |
run-testinfra: | |
needs: [nix-build-aarch64-linux, nix-build-aarch64-darwin] #, nix-build-x86_64-linux] | |
if: | | |
!cancelled() && | |
(needs.nix-build-aarch64-linux.result == 'skipped' || needs.nix-build-aarch64-linux.result == 'success') && | |
(needs.nix-build-aarch64-darwin.result == 'skipped' || needs.nix-build-aarch64-darwin.result == 'success') | |
uses: ./.github/workflows/testinfra-ami-build.yml | |
secrets: | |
DEV_AWS_ROLE: ${{ secrets.DEV_AWS_ROLE }} | |
run-tests: | |
needs: [nix-build-aarch64-linux, nix-build-aarch64-darwin] #, nix-build-x86_64-linux] | |
if: | | |
!cancelled() && | |
(needs.nix-build-aarch64-linux.result == 'skipped' || needs.nix-build-aarch64-linux.result == 'success') && | |
(needs.nix-build-aarch64-darwin.result == 'skipped' || needs.nix-build-aarch64-darwin.result == 'success') | |
uses: ./.github/workflows/test.yml |