chores: use custom github runners #3645
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 dependent workflows | |
contents: write | |
packages: write | |
jobs: | |
nix-eval: | |
runs-on: | |
group: self-hosted-runners-nix | |
labels: | |
- aarch64-darwin | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
- id: set-matrix | |
name: Generate Nix Matrix | |
run: | | |
set -Eeu | |
echo matrix="$(python 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-setup | |
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-setup | |
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-setup | |
# with: | |
# attr: ${{ matrix.attr }} | |
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 |