-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
29a24f4
commit 52fc2a9
Showing
11 changed files
with
1,070 additions
and
345 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: "CI/Dispatch/Group" | ||
|
||
defaults: | ||
run: | ||
shell: bash -euo pipefail {0} | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
name: {type: string, required: true} | ||
jobs: {type: string, required: true} | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
standlone-jobs: | ||
name: "" | ||
if: fromJSON(inputs.jobs).standalone | ||
permissions: | ||
id-token: write | ||
contents: read | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: ${{fromJSON(inputs.jobs).standalone}} | ||
uses: ./.github/workflows/ci-dispatch-job.yml | ||
with: | ||
name: ${{ matrix.name }} | ||
runner: ${{ matrix.runner }} | ||
image: ${{ matrix.image }} | ||
command: | | ||
${{ matrix.command }} | ||
two-stage-jobs: | ||
name: "" | ||
if: fromJSON(inputs.jobs).two_stage | ||
permissions: | ||
id-token: write | ||
contents: read | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: ${{fromJSON(inputs.jobs).two_stage}} | ||
uses: ./.github/workflows/ci-dispatch-two-stage.yml | ||
with: | ||
producers: ${{ toJSON(matrix.producers) }} | ||
consumers: ${{ toJSON(matrix.consumers) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
name: "CI/Dispatch/Job" | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
name: {type: string, required: true} | ||
image: {type: string, required: true} | ||
runner: {type: string, required: true} | ||
command: {type: string, required: true} | ||
env: {type: string, required: false} | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
dispatch-job: | ||
name: ${{inputs.name}} | ||
permissions: | ||
id-token: write | ||
contents: read | ||
runs-on: ${{inputs.runner}} | ||
env: | ||
SCCACHE_BUCKET: rapids-sccache-devs | ||
SCCACHE_REGION: us-east-2 | ||
SCCACHE_IDLE_TIMEOUT: 0 | ||
SCCACHE_S3_USE_SSL: true | ||
SCCACHE_S3_NO_CREDENTIALS: false | ||
# container: | ||
# options: -u root | ||
# image: ${{inputs.image}} | ||
# env: | ||
# NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }} | ||
steps: | ||
# Linux runner: | ||
# - name: Checkout repo | ||
# if: startsWith(inputs.runner, 'linux') | ||
# uses: actions/checkout@v3 | ||
# with: | ||
# path: cccl | ||
# persist-credentials: false | ||
# - name: Move files to coder user home directory | ||
# if: startsWith(inputs.runner, 'linux') | ||
# run: | | ||
# cp -R cccl /home/coder/cccl | ||
# chown -R coder:coder /home/coder/ | ||
# - name: Add NVCC problem matcher | ||
# if: startsWith(inputs.runner, 'linux') | ||
# run: | | ||
# echo "::add-matcher::cccl/.github/problem-matchers/problem-matcher.json" | ||
# - name: Configure credentials and environment variables for sccache | ||
# if: startsWith(inputs.runner, 'linux') | ||
# uses: ./cccl/.github/actions/configure_cccl_sccache | ||
# - name: Run command | ||
# if: startsWith(inputs.runner, 'linux') | ||
# shell: su coder {0} | ||
# run: | | ||
# set -eo pipefail | ||
# cd ~/cccl | ||
# echo -e "\e[1;34mRunning as 'coder' user in $(pwd):\e[0m" | ||
# echo -e "\e[1;34m${{inputs.command}}\e[0m" | ||
# eval "${{inputs.command}}" || exit_code=$? | ||
# if [ ! -z "$exit_code" ]; then | ||
# echo -e "::group::️❗ \e[1;31mInstructions to Reproduce CI Failure Locally\e[0m" | ||
# echo "::error:: To replicate this failure locally, follow the steps below:" | ||
# echo "1. Clone the repository, and navigate to the correct branch and commit:" | ||
# 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" | ||
# echo "" | ||
# echo "2. Run the failed command inside the same Docker container used by the CI:" | ||
# echo " docker run --rm -it --gpus all --pull=always --volume \$PWD:/repo --workdir /repo ${{ inputs.image }} ${{inputs.command}}" | ||
# echo "" | ||
# echo "For additional information, see:" | ||
# echo " - DevContainer Documentation: https://github.com/NVIDIA/cccl/blob/main/.devcontainer/README.md" | ||
# echo " - Continuous Integration (CI) Overview: https://github.com/NVIDIA/cccl/blob/main/ci-overview.md" | ||
# exit $exit_code | ||
# fi | ||
|
||
# Windows runner: | ||
- 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: Fetch ${{ inputs.image }} | ||
run: docker pull ${{ inputs.image }} | ||
- name: Run Command (Windows) | ||
if: startsWith(inputs.runner, 'windows') | ||
run: >- | ||
docker run ${{ inputs.image }} powershell -c "[System.Environment]::SetEnvironmentVariable('AWS_ACCESS_KEY_ID','${{env.AWS_ACCESS_KEY_ID}}') | ||
[System.Environment]::SetEnvironmentVariable('AWS_SECRET_ACCESS_KEY','${{env.AWS_SECRET_ACCESS_KEY}}') | ||
[System.Environment]::SetEnvironmentVariable('AWS_SESSION_TOKEN','${{env.AWS_SESSION_TOKEN }}') | ||
[System.Environment]::SetEnvironmentVariable('SCCACHE_BUCKET','${{env.SCCACHE_BUCKET}}') | ||
[System.Environment]::SetEnvironmentVariable('SCCACHE_REGION','${{env.SCCACHE_REGION}}') | ||
[System.Environment]::SetEnvironmentVariable('SCCACHE_IDLE_TIMEOUT','${{env.SCCACHE_IDLE_TIMEOUT}}') | ||
[System.Environment]::SetEnvironmentVariable('SCCACHE_S3_USE_SSL','${{env.SCCACHE_S3_USE_SSL}}') | ||
[System.Environment]::SetEnvironmentVariable('SCCACHE_S3_NO_CREDENTIALS','${{env.SCCACHE_S3_NO_CREDENTIALS}}') | ||
git clone https://github.com/NVIDIA/cccl.git; | ||
cd cccl; | ||
git fetch --all; | ||
git checkout ${{github.ref_name}}; | ||
${{inputs.command}}" | ||
- name: Run Command (Linux) | ||
if: startsWith(inputs.runner, 'linux') | ||
run: >- | ||
docker run ${{ inputs.image }} bash -c "export AWS_ACCESS_KEY_ID=${{env.AWS_ACCESS_KEY_ID}}; | ||
export AWS_SECRET_ACCESS_KEY=${{env.AWS_SECRET_ACCESS_KEY}}; | ||
export AWS_SESSION_TOKEN=${{env.AWS_SESSION_TOKEN }}; | ||
export SCCACHE_BUCKET=${{env.SCCACHE_BUCKET}}; | ||
export SCCACHE_REGION=${{env.SCCACHE_REGION}}; | ||
export SCCACHE_IDLE_TIMEOUT=${{env.SCCACHE_IDLE_TIMEOUT}}; | ||
export SCCACHE_S3_USE_SSL=${{env.SCCACHE_S3_USE_SSL}}; | ||
export SCCACHE_S3_NO_CREDENTIALS=${{env.SCCACHE_S3_NO_CREDENTIALS}}; | ||
export NVIDIA_VISIBLE_DEVICES=${{ env.NVIDIA_VISIBLE_DEVICES }}; | ||
git clone https://github.com/NVIDIA/cccl.git; | ||
cd cccl; | ||
git fetch --all; | ||
git checkout ${{github.ref_name}}; | ||
${{inputs.command}}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: "CI/Dispatch/TwoStage" | ||
|
||
defaults: | ||
run: | ||
shell: bash -euo pipefail {0} | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
producers: {type: string, required: true} | ||
consumers: {type: string, required: true} | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
producers: | ||
name: ${{ matrix.name }} | ||
if: fromJSON(inputs.producers) | ||
permissions: | ||
id-token: write | ||
contents: read | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: ${{fromJSON(inputs.producers)}} | ||
uses: ./.github/workflows/ci-dispatch-job.yml | ||
with: | ||
name: ${{ matrix.name }} | ||
runner: ${{ matrix.runner }} | ||
image: ${{ matrix.image }} | ||
command: | | ||
${{ matrix.command }} | ||
consumers: | ||
name: ${{ matrix.name }} | ||
if: fromJSON(inputs.consumers) | ||
needs: producers | ||
permissions: | ||
id-token: write | ||
contents: read | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: ${{fromJSON(inputs.consumers)}} | ||
uses: ./.github/workflows/ci-dispatch-job.yml | ||
with: | ||
name: ${{ matrix.name }} | ||
runner: ${{ matrix.runner }} | ||
image: ${{ matrix.image }} | ||
command: | | ||
${{ matrix.command }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.