Skip to content

Commit

Permalink
CI: Upload HPC-enabled binaries to separate name
Browse files Browse the repository at this point in the history
Previously, we were inadvertently uploading the HPC-enabled binaries and the
non-HPC-enabled binaries to the same name (`dist-tests-${{ matrix.os }}`). This
is very dangerous, as this risks the two artifacts clobbering each other.
Moreover, `actions/upload-artifact@v4` makes this a hard error, so we now have
no choice but to disambiguate the artifact names.
  • Loading branch information
RyanGlScott committed Sep 9, 2024
1 parent 413d64b commit cb1ab83
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,21 @@ jobs:
prover_tests
dest: dist-tests

# In the next 2 steps, we upload to different names depending on whether
# the binaries were compiled using HPC or not. This is done to ensure that
# the HPC-enabled binaries do not clobber the non-HPC-enabled binaries.
- uses: actions/upload-artifact@v4
if: "matrix.ghc == '9.4.8'"
if: "matrix.ghc == '9.4.8'" && matrix.hpc == false
with:
path: dist-tests
name: dist-tests-${{ matrix.os }}

- uses: actions/upload-artifact@v4
if: "matrix.ghc == '9.4.8'" && matrix.hpc == true
with:
path: dist-tests
name: dist-tests-${{ matrix.os }}-hpc

- shell: bash
run: .github/ci.sh setup_dist_bins

Expand Down Expand Up @@ -556,7 +565,7 @@ jobs:

- uses: actions/download-artifact@v4
with:
name: dist-tests-${{ matrix.os }}
name: dist-tests-${{ matrix.os }}-hpc
path: dist-tests

- uses: actions/download-artifact@v4
Expand Down

0 comments on commit cb1ab83

Please sign in to comment.