Skip to content

Commit

Permalink
Fix CMake option handling. (#1698)
Browse files Browse the repository at this point in the history
* Fix CMake option handling.

These need to just be passed as a string, which is more flexible than assuming only key/value pairs.

* Inline the sccache action.

The relative action path doesn't properly resolve when CCCL's workflows/actions from reused in other repos (eg. nvbench).
  • Loading branch information
alliepiper authored May 6, 2024
1 parent b3ef1e6 commit 831f0e9
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 25 deletions.
19 changes: 0 additions & 19 deletions .github/actions/configure_cccl_sccache/action.yml

This file was deleted.

3 changes: 1 addition & 2 deletions .github/actions/workflow-build/build-workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,7 @@ def generate_dispatch_job_command(matrix_job, job_type):
if device_compiler_name != 'nvcc':
command += f" -cuda \"{device_compiler_exe}\""
if cmake_options:
cmake_args = " ".join([f"{key}={value}" for key, value in cmake_options.items()])
command += f" -cmake-options \"{cmake_args}\""
command += f" -cmake-options \"{cmake_options}\""

return command

Expand Down
17 changes: 15 additions & 2 deletions .github/workflows/verify-devcontainers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,23 @@ jobs:
if [[ "$src" != "$dst" ]]; then
cp "$src" "$dst"
fi
# We don't really need sccache configured, but we need the AWS credentials envvars to be set
# in order to avoid the devcontainer hanging waiting for GitHub authentication
- name: Configure credentials and environment variables for sccache
uses: ./.github/actions/configure_cccl_sccache
- name: Get AWS credentials for sccache bucket
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::279114543810:role/gha-oidc-NVIDIA
aws-region: us-east-2
role-duration-seconds: 43200 # 12 hours)
- name: Set environment variables
run: |
echo "SCCACHE_BUCKET=rapids-sccache-devs" >> $GITHUB_ENV
echo "SCCACHE_REGION=us-east-2" >> $GITHUB_ENV
echo "SCCACHE_IDLE_TIMEOUT=32768" >> $GITHUB_ENV
echo "SCCACHE_S3_USE_SSL=true" >> $GITHUB_ENV
echo "SCCACHE_S3_NO_CREDENTIALS=false" >> $GITHUB_ENV
- name: Run in devcontainer
uses: devcontainers/[email protected]
with:
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/workflow-dispatch-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,19 @@ jobs:
- name: Add NVCC problem matcher
run: |
echo "::add-matcher::cccl/.github/problem-matchers/problem-matcher.json"
- name: Configure credentials and environment variables for sccache
uses: ./cccl/.github/actions/configure_cccl_sccache
- name: Get AWS credentials for sccache bucket
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::279114543810:role/gha-oidc-NVIDIA
aws-region: us-east-2
role-duration-seconds: 43200 # 12 hours)
- name: Set environment variables
run: |
echo "SCCACHE_BUCKET=rapids-sccache-devs" >> $GITHUB_ENV
echo "SCCACHE_REGION=us-east-2" >> $GITHUB_ENV
echo "SCCACHE_IDLE_TIMEOUT=32768" >> $GITHUB_ENV
echo "SCCACHE_S3_USE_SSL=true" >> $GITHUB_ENV
echo "SCCACHE_S3_NO_CREDENTIALS=false" >> $GITHUB_ENV
- name: Run command
shell: su coder {0}
env:
Expand Down

0 comments on commit 831f0e9

Please sign in to comment.