@@ -90,11 +90,37 @@ jobs:
90
90
#! /usr/bin/env bash
91
91
set -eo pipefail
92
92
93
- . ~/cccl/ci/rapids/post-create-command.sh;
94
-
95
93
declare -a failures
96
94
declare -A failures_map
97
95
96
+ _print_err_exit_msg() {
97
+ local code=$?
98
+ if test $code -ne 0; then
99
+ echo "::error:: Failures: ${failures[*]}"
100
+ echo -e "::group::️❗ \e[1;31mInstructions to Reproduce CI Failure Locally\e[0m"
101
+ echo "::error:: To replicate this failure locally, follow the steps below:"
102
+ echo "1. Clone the repository, and navigate to the correct branch and commit:"
103
+ echo " git clone --branch $GITHUB_REF_NAME --single-branch https://github.com/$GITHUB_REPOSITORY.git && cd $(echo $GITHUB_REPOSITORY | cut -d'/' -f2) && git checkout $GITHUB_SHA"
104
+ echo ""
105
+ echo "2. Run the failed command inside the same Docker container used by this CI job:"
106
+ cat <<____EOF
107
+ RAPIDS_LIBS='${RAPIDS_LIBS}'$(for lib in cmake ${RAPIDS_LIBS}; do var=RAPIDS_${lib//-/_}_GIT_REPO; if test -v "$var" && test -n "${!var}"; then echo -n " $var='${!var}'"; fi; done) \\
108
+ .devcontainer/launch.sh -d -c ${{matrix.cuda}} -H rapids-conda -- ./ci/rapids/rapids-entrypoint.sh \\
109
+ /bin/bash -li -c 'uninstall-all -j -qqq && clean-all -j && build-all -j -v || exec /bin/bash -li'
110
+ ____EOF
111
+ echo ""
112
+ echo "For additional information, see:"
113
+ echo " - DevContainer Documentation: https://github.com/NVIDIA/cccl/blob/main/.devcontainer/README.md"
114
+ echo " - Continuous Integration (CI) Overview: https://github.com/NVIDIA/cccl/blob/main/ci-overview.md"
115
+ fi
116
+ exit $code
117
+ }
118
+
119
+ # Print failures and exit
120
+ trap '_print_err_exit_msg' EXIT;
121
+
122
+ . ~/cccl/ci/rapids/post-create-command.sh;
123
+
98
124
# Configure and build each lib with -DBUILD_TESTS=OFF, then again with -DBUILD_TESTS=ON
99
125
for RAPIDS_ENABLE_TESTS in OFF ON; do
100
126
_apply_manifest_modifications;
@@ -109,54 +135,20 @@ jobs:
109
135
sccache --show-adv-stats
110
136
done
111
137
done
112
-
113
- # Print failures and exit
114
- if test ${#failures[@]} -gt 0; then
115
- echo "::error:: Failures: ${failures[*]}"
116
- echo -e "::group::️❗ \e[1;31mInstructions to Reproduce CI Failure Locally\e[0m"
117
- echo "::error:: To replicate this failure locally, follow the steps below:"
118
- echo "1. Clone the repository, and navigate to the correct branch and commit:"
119
- echo " git clone --branch $GITHUB_REF_NAME --single-branch https://github.com/$GITHUB_REPOSITORY.git && cd $(echo $GITHUB_REPOSITORY | cut -d'/' -f2) && git checkout $GITHUB_SHA"
120
- echo ""
121
- echo "2. Run the failed command inside the same Docker container used by this CI job:"
122
- cat <<__EOF
123
- RAPIDS_LIBS='${RAPIDS_LIBS}'$(for lib in cmake ${RAPIDS_LIBS}; do var=RAPIDS_${lib//-/_}_GIT_REPO; if test -v "$var" && test -n "${!var}"; then echo -n " $var='${!var}'"; fi; done) \\
124
- .devcontainer/launch.sh -d -c ${{matrix.cuda}} -H rapids-conda -- ./ci/rapids/rapids-entrypoint.sh \\
125
- /bin/bash -li -c 'uninstall-all -j -qqq && clean-all -j && build-all -j -v || exec /bin/bash -li'
126
- __EOF
127
- echo ""
128
- echo "For additional information, see:"
129
- echo " - DevContainer Documentation: https://github.com/NVIDIA/cccl/blob/main/.devcontainer/README.md"
130
- echo " - Continuous Integration (CI) Overview: https://github.com/NVIDIA/cccl/blob/main/ci-overview.md"
131
- exit 1
132
- fi
133
138
EOF
134
139
135
140
chmod +x "$RUNNER_TEMP"/ci{,-entrypoint}.sh
136
141
137
- mkdir -p .aws
138
-
139
- cat <<EOF > .aws/config
140
- [default]
141
- bucket=rapids-sccache-devs
142
- region=us-east-2
143
- EOF
144
-
145
- cat <<EOF > .aws/credentials
146
- [default]
147
- aws_access_key_id=$AWS_ACCESS_KEY_ID
148
- aws_session_token=$AWS_SESSION_TOKEN
149
- aws_secret_access_key=$AWS_SECRET_ACCESS_KEY
150
- EOF
151
-
152
- chmod 0600 .aws/credentials
153
- chmod 0664 .aws/config
154
-
155
142
.devcontainer/launch.sh \
156
143
--docker \
157
144
--cuda ${{matrix.cuda}} \
158
145
--host rapids-conda \
159
- --env VAULT_HOST= \
146
+ --env "VAULT_HOST=" \
147
+ --env "AWS_REGION=$AWS_REGION" \
148
+ --env "SCCACHE_REGION=$AWS_REGION" \
149
+ --env "AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID" \
150
+ --env "AWS_SESSION_TOKEN=$AWS_SESSION_TOKEN" \
151
+ --env "AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY" \
160
152
--env "GITHUB_SHA=$GITHUB_SHA" \
161
153
--env "GITHUB_REF_NAME=$GITHUB_REF_NAME" \
162
154
--env "GITHUB_REPOSITORY=$GITHUB_REPOSITORY" \
0 commit comments