|
10 | 10 |
|
11 | 11 | permissions: |
12 | 12 | id-token: write |
13 | | - # required by dependent workflows |
| 13 | + # required by testinfra-ami-build dependent workflows |
14 | 14 | contents: write |
15 | 15 | packages: write |
16 | 16 |
|
17 | 17 | jobs: |
18 | | - nix-matrix: |
19 | | - runs-on: ubuntu-latest |
20 | | - outputs: |
21 | | - matrix: ${{ steps.set-matrix.outputs.matrix }} |
22 | | - steps: |
23 | | - - uses: actions/checkout@v4 |
24 | | - - uses: cachix/install-nix-action@v30 |
25 | | - - id: set-matrix |
26 | | - name: Generate Nix Matrix |
27 | | - run: | |
28 | | - set -Eeu |
29 | | - matrix="$(nix eval --json '.#githubActions.matrix')" |
30 | | - echo "matrix=$matrix" >> "$GITHUB_OUTPUT" |
31 | | -
|
32 | 18 | build-run-image: |
33 | | - name: ${{ matrix.name }} (${{ matrix.system }}) |
34 | | - needs: nix-matrix |
35 | | - runs-on: ${{ matrix.os }} |
36 | 19 | strategy: |
37 | 20 | fail-fast: false |
38 | | - matrix: ${{fromJSON(needs.nix-matrix.outputs.matrix)}} |
| 21 | + matrix: |
| 22 | + include: |
| 23 | + - runner: blacksmith-32vcpu-ubuntu-2404 |
| 24 | + arch: amd64 |
| 25 | + - runner: blacksmith-32vcpu-ubuntu-2404-arm |
| 26 | + arch: arm64 |
| 27 | + - runner: macos-latest-xlarge |
| 28 | + arch: arm64 |
| 29 | + runs-on: ${{ matrix.runner }} |
39 | 30 | timeout-minutes: 180 |
40 | 31 | steps: |
41 | 32 | - name: Checkout Repo |
@@ -113,12 +104,23 @@ jobs: |
113 | 104 | sudo rm -rf /tmp/* 2>/dev/null || true |
114 | 105 | echo "=== AFTER CLEANUP ===" |
115 | 106 | df -h |
116 | | - - run: nix build -L '.#${{ matrix.attr }}' |
| 107 | + - name: Build psql bundle |
| 108 | + run: > |
| 109 | + nix run "github:Mic92/nix-fast-build?rev=b1dae483ab7d4139a6297e02b6de9e5d30e43d48" |
| 110 | + -- --skip-cached --no-nom ${{ matrix.runner == 'macos-latest-xlarge' && '--max-jobs 1' || '' }} |
| 111 | + --flake ".#checks.$(nix eval --raw --impure --expr 'builtins.currentSystem')" |
117 | 112 | env: |
118 | 113 | AWS_ACCESS_KEY_ID: ${{ env.AWS_ACCESS_KEY_ID }} |
119 | 114 | AWS_SECRET_ACCESS_KEY: ${{ env.AWS_SECRET_ACCESS_KEY }} |
120 | 115 | AWS_SESSION_TOKEN: ${{ env.AWS_SESSION_TOKEN }} |
121 | 116 |
|
| 117 | + run-testinfra: |
| 118 | + needs: build-run-image |
| 119 | + if: ${{ success() }} |
| 120 | + uses: ./.github/workflows/testinfra-ami-build.yml |
| 121 | + secrets: |
| 122 | + DEV_AWS_ROLE: ${{ secrets.DEV_AWS_ROLE }} |
| 123 | + |
122 | 124 | run-tests: |
123 | 125 | needs: build-run-image |
124 | 126 | if: ${{ success() }} |
|
0 commit comments