diff options
| author | seth <[email protected]> | 2023-11-08 03:44:24 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-11-07 22:44:24 -0500 |
| commit | 2817f8e1272bd55a2e0be30bfaf7c69cb56176d3 (patch) | |
| tree | b082f0597cbc4a2391ae21d3516f63456fa8b16c /.github/workflows/ci.yaml | |
| parent | 099fde4156bd2d50d455601ae748ab9757594c07 (diff) | |
ci: use artifacts to pass matrices between jobs (#1)
* docs: remove bad bullet point in readme
* ci: use artifacts for passing matrices
Diffstat (limited to '.github/workflows/ci.yaml')
| -rw-r--r-- | .github/workflows/ci.yaml | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f179792..005c436 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -19,40 +19,45 @@ jobs: - uses: nixbuild/nix-quick-install-action@v26 - name: generate matrix - id: generate run: | + set -euxo pipefail + cd test/${{ matrix.test }} - set -e - echo "matrix=$(nix eval --show-trace --json .#githubWorkflow.matrix)" >> "$GITHUB_OUTPUT" + nix eval --show-trace --json .#githubWorkflow.matrix > matrix-${{ matrix.test }}.json - - name: save matrix - uses: cloudposse/github-action-matrix-outputs-write@main + - name: store matrix + uses: actions/upload-artifact@v3 with: - matrix-step-name: ${{ github.job }} - matrix-key: ${{ matrix.test }} - outputs: | - matrix: ${{ steps.generate.outputs.matrix }} + name: matrix-${{ matrix.test }} + path: test/${{ matrix.test }}/matrix-${{ matrix.test }}.json read: needs: eval runs-on: ubuntu-latest outputs: - result: ${{ steps.read.outputs.result }} + lib-matrix: ${{ steps.module.outputs.result }} + module-matrix: ${{ steps.lib.outputs.result }} steps: - - name: read matrix - uses: cloudposse/github-action-matrix-outputs-read@main - id: read - with: - matrix-step-name: eval + - uses: actions/download-artifact@v3 + + - name: recover lib matrix + id: lib + run: + echo "result=$(cat matrix-lib/matrix-lib.json)" >> "$GITHUB_OUTPUT" + + - name: recover module matrix + id: module + run: + echo "result=$(cat matrix-module/matrix-module.json)" >> "$GITHUB_OUTPUT" # would be nice to have another matrix for these but meh test-lib: needs: read strategy: - matrix: ${{ fromJSON(fromJSON(needs.read.outputs.result).matrix.lib) }} + matrix: ${{ fromJSON(needs.read.outputs.lib-matrix) }} runs-on: ${{ matrix.os }} @@ -86,7 +91,7 @@ jobs: needs: read strategy: - matrix: ${{ fromJSON(fromJSON(needs.read.outputs.result).matrix.module) }} + matrix: ${{ fromJSON(needs.read.outputs.module-matrix) }} runs-on: ${{ matrix.os }} |
