chores: use custom github runners #3581
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: | |
extensions-matrix: | |
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 extensions)" >> "$GITHUB_OUTPUT" | |
build-extensions-aarch64-linux: | |
name: ${{matrix.postgresql_version}}.${{ matrix.name }} (aarch64-linux) | |
needs: extensions-matrix | |
runs-on: ${{ matrix.runs_on.group && matrix.runs_on || matrix.runs_on.labels }} | |
if: ${{ fromJSON(needs.extensions-matrix.outputs.matrix).aarch64_linux != null }} | |
strategy: | |
fail-fast: false | |
max-parallel: 3 | |
matrix: ${{ fromJSON(needs.extensions-matrix.outputs.matrix).aarch64_linux }} | |
steps: | |
- name: Build Nix Package | |
uses: ./.github/actions/nix-build-setup | |
with: | |
attr: ${{ matrix.attr }} | |
build-extensions-aarch64-darwin: | |
name: ${{matrix.postgresql_version}}.${{ matrix.name }} (aarch64-darwin) | |
needs: extensions-matrix | |
runs-on: ${{ matrix.runs_on.group && matrix.runs_on || matrix.runs_on.labels }} | |
if: ${{ fromJSON(needs.extensions-matrix.outputs.matrix).aarch64_darwin != null }} | |
strategy: | |
fail-fast: false | |
max-parallel: 3 | |
matrix: ${{ fromJSON(needs.extensions-matrix.outputs.matrix).aarch64_darwin }} | |
steps: | |
- name: Build Nix Package | |
uses: ./.github/actions/nix-build-setup | |
with: | |
attr: ${{ matrix.attr }} | |
build-extensions-x86_64-linux: | |
name: ${{matrix.postgresql_version}}.${{ matrix.name }} (x86_64-linux) | |
needs: extensions-matrix | |
runs-on: ${{ matrix.runs_on.group && matrix.runs_on || matrix.runs_on.labels }} | |
if: ${{ fromJSON(needs.extensions-matrix.outputs.matrix).x86_64_linux != null }} | |
strategy: | |
fail-fast: false | |
max-parallel: 3 | |
matrix: ${{ fromJSON(needs.extensions-matrix.outputs.matrix).x86_64_linux }} | |
steps: | |
- name: Build Nix Package | |
uses: ./.github/actions/nix-build-setup | |
with: | |
attr: ${{ matrix.attr }} | |
checks-matrix: | |
needs: [build-extensions-aarch64-linux, build-extensions-aarch64-darwin, build-extensions-x86_64-linux] | |
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)" >> "$GITHUB_OUTPUT" | |
build-checks: | |
name: ${{ matrix.name }} (${{ matrix.system }}) | |
needs: [checks-matrix, build-extensions-aarch64-linux, build-extensions-aarch64-darwin, build-extensions-x86_64-linux] | |
runs-on: ${{ matrix.runs_on.group && matrix.runs_on || matrix.runs_on.labels }} | |
strategy: | |
fail-fast: false | |
matrix: ${{fromJSON(needs.checks-matrix.outputs.matrix)}} | |
steps: | |
- name: Build Nix Package | |
uses: ./.github/actions/nix-build-setup | |
with: | |
attr: ${{ matrix.attr }} | |
run-tests: | |
needs: build-checks | |
if: ${{ success() }} | |
uses: ./.github/workflows/test.yml |