Skip to content

Commit

Permalink
Add step to upload artifacts (#51)
Browse files Browse the repository at this point in the history
This PR adds a step to run `rapids-upload-artifacts-dir` (added
[here](rapidsai/gha-tools#43)) to any shared
workflows that expose a `RAPIDS_ARTIFACTS_DIR` environment variable.

The new `Upload additional artifacts` step will _always_ run even if the
prior build/test steps fail.

This is helpful for uploading log files that result from failed builds.

It is the repository script's responsibility to ensure that log files
end up in the `RAPIDS_ARTIFACTS_DIR` after a failed build though.
  • Loading branch information
ajschmidt8 authored Mar 20, 2023
1 parent ab658be commit 415af53
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ on:
type: boolean
required: false

defaults:
run:
shell: bash

jobs:
other-checks:
runs-on: ubuntu-latest
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/conda-cpp-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ on:
type: string
default: "ci/build_cpp.sh"

defaults:
run:
shell: bash

permissions:
actions: none
checks: none
Expand Down Expand Up @@ -74,3 +78,6 @@ jobs:
echo "RAPIDS_NIGHTLY_DATE=${{ inputs.date }}" >> "${GITHUB_ENV}"
- name: C++ build
run: ${{ inputs.build_script }}
- name: Upload additional artifacts
if: "!cancelled()"
run: rapids-upload-artifacts-dir cuda${RAPIDS_CUDA_VERSION%%.*}_$(arch)
7 changes: 7 additions & 0 deletions .github/workflows/conda-cpp-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ on:
type: string
default: "ci/test_cpp.sh"

defaults:
run:
shell: bash

permissions:
actions: none
checks: none
Expand Down Expand Up @@ -127,3 +131,6 @@ jobs:
with:
paths: "${{ env.RAPIDS_TESTS_DIR }}/*.xml"
if: always()
- name: Upload additional artifacts
if: "!cancelled()"
run: rapids-upload-artifacts-dir cuda${RAPIDS_CUDA_VERSION%%.*}_$(arch)
7 changes: 7 additions & 0 deletions .github/workflows/conda-python-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ on:
type: string
default: "ci/build_python.sh"

defaults:
run:
shell: bash

permissions:
actions: none
checks: none
Expand Down Expand Up @@ -75,3 +79,6 @@ jobs:
echo "RAPIDS_NIGHTLY_DATE=${{ inputs.date }}" >> "${GITHUB_ENV}"
- name: Python build
run: ${{ inputs.build_script }}
- name: Upload additional artifacts
if: "!cancelled()"
run: rapids-upload-artifacts-dir cuda${RAPIDS_CUDA_VERSION%%.*}_$(arch)_py${RAPIDS_PY_VERSION//.}
7 changes: 7 additions & 0 deletions .github/workflows/conda-python-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ on:
type: boolean
default: true

defaults:
run:
shell: bash

permissions:
actions: none
checks: none
Expand Down Expand Up @@ -138,3 +142,6 @@ jobs:
-s \
"${RAPIDS_COVERAGE_DIR}" \
-v
- name: Upload additional artifacts
if: "!cancelled()"
run: rapids-upload-artifacts-dir cuda${RAPIDS_CUDA_VERSION%%.*}_$(arch)_py${RAPIDS_PY_VERSION//.}
4 changes: 4 additions & 0 deletions .github/workflows/conda-upload-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ on:
type: string
default: main

defaults:
run:
shell: bash

permissions:
actions: none
checks: none
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/custom-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ on:
required: true
type: string

defaults:
run:
shell: bash

permissions:
actions: none
checks: none
Expand Down

0 comments on commit 415af53

Please sign in to comment.