Skip to content

Commit 43f643e

Browse files
committed
store and load sccache preprocessor cache, save sccache logs as workflow artifact
1 parent d1ec0d9 commit 43f643e

5 files changed

Lines changed: 68 additions & 6 deletions

File tree

.devcontainer/llvm19-cuda12.0/devcontainer.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
"hostRequirements": { "gpu": "optional" },
55

6-
"initializeCommand": ["/bin/bash", "-c", "mkdir -p .cache/.{aws,config}"],
6+
"initializeCommand": ["/bin/bash", "-c", "mkdir -p .cache/.{aws,cache,config}"],
77

88
"containerEnv": {
99
"AWS_ROLE_ARN": "arn:aws:iam::279114543810:role/nv-gha-token-sccache-devs",
@@ -19,14 +19,18 @@
1919
"SCCACHE_DIST_MAX_RETRIES": "${localEnv:SCCACHE_DIST_MAX_RETRIES:4}",
2020
"SCCACHE_DIST_REQUEST_TIMEOUT": "${localEnv:SCCACHE_DIST_REQUEST_TIMEOUT:7140}",
2121
"SCCACHE_DIST_TOKEN": "${localEnv:SCCACHE_DIST_TOKEN}",
22+
"SCCACHE_ERROR_LOG": "/home/coder/stdexec/.cache/sccache.log",
2223
"SCCACHE_REGION": "us-east-2",
23-
"SCCACHE_S3_KEY_PREFIX": "nvidia-stdexec-dev"
24+
"SCCACHE_S3_KEY_PREFIX": "nvidia-stdexec-dev",
25+
"SCCACHE_SERVER_PORT": "4226",
26+
"SCCACHE_SERVER_LOG": "${localEnv:SCCACHE_SERVER_LOG:sccache=debug}"
2427
},
2528

2629
"workspaceFolder": "/home/coder/stdexec",
2730
"workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/stdexec,type=bind,consistency=consistent",
2831
"mounts": [
2932
"source=${localWorkspaceFolder}/.cache/.aws,target=/home/coder/.aws,type=bind,consistency=consistent",
33+
"source=${localWorkspaceFolder}/.cache/.cache,target=/home/coder/.cache,type=bind,consistency=consistent",
3034
"source=${localWorkspaceFolder}/.cache/.config,target=/home/coder/.config,type=bind,consistency=consistent"
3135
],
3236

.devcontainer/llvm19-cuda12.9/devcontainer.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
"hostRequirements": { "gpu": "optional" },
55

6-
"initializeCommand": ["/bin/bash", "-c", "mkdir -p .cache/.{aws,config}"],
6+
"initializeCommand": ["/bin/bash", "-c", "mkdir -p .cache/.{aws,cache,config}"],
77

88
"containerEnv": {
99
"AWS_ROLE_ARN": "arn:aws:iam::279114543810:role/nv-gha-token-sccache-devs",
@@ -19,14 +19,18 @@
1919
"SCCACHE_DIST_MAX_RETRIES": "${localEnv:SCCACHE_DIST_MAX_RETRIES:4}",
2020
"SCCACHE_DIST_REQUEST_TIMEOUT": "${localEnv:SCCACHE_DIST_REQUEST_TIMEOUT:7140}",
2121
"SCCACHE_DIST_TOKEN": "${localEnv:SCCACHE_DIST_TOKEN}",
22+
"SCCACHE_ERROR_LOG": "/home/coder/stdexec/.cache/sccache.log",
2223
"SCCACHE_REGION": "us-east-2",
23-
"SCCACHE_S3_KEY_PREFIX": "nvidia-stdexec-dev"
24+
"SCCACHE_S3_KEY_PREFIX": "nvidia-stdexec-dev",
25+
"SCCACHE_SERVER_PORT": "4226",
26+
"SCCACHE_SERVER_LOG": "${localEnv:SCCACHE_SERVER_LOG:sccache=debug}"
2427
},
2528

2629
"workspaceFolder": "/home/coder/stdexec",
2730
"workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/stdexec,type=bind,consistency=consistent",
2831
"mounts": [
2932
"source=${localWorkspaceFolder}/.cache/.aws,target=/home/coder/.aws,type=bind,consistency=consistent",
33+
"source=${localWorkspaceFolder}/.cache/.cache,target=/home/coder/.cache,type=bind,consistency=consistent",
3034
"source=${localWorkspaceFolder}/.cache/.config,target=/home/coder/.config,type=bind,consistency=consistent"
3135
],
3236

.devcontainer/nvhpc25.7/devcontainer.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
"hostRequirements": { "gpu": "optional" },
55

6-
"initializeCommand": ["/bin/bash", "-c", "mkdir -p .cache/.{aws,config}"],
6+
"initializeCommand": ["/bin/bash", "-c", "mkdir -p .cache/.{aws,cache,config}"],
77

88
"containerEnv": {
99
"AWS_ROLE_ARN": "arn:aws:iam::279114543810:role/nv-gha-token-sccache-devs",
@@ -19,14 +19,18 @@
1919
"SCCACHE_DIST_MAX_RETRIES": "${localEnv:SCCACHE_DIST_MAX_RETRIES:4}",
2020
"SCCACHE_DIST_REQUEST_TIMEOUT": "${localEnv:SCCACHE_DIST_REQUEST_TIMEOUT:7140}",
2121
"SCCACHE_DIST_TOKEN": "${localEnv:SCCACHE_DIST_TOKEN}",
22+
"SCCACHE_ERROR_LOG": "/home/coder/stdexec/.cache/sccache.log",
2223
"SCCACHE_REGION": "us-east-2",
23-
"SCCACHE_S3_KEY_PREFIX": "nvidia-stdexec-dev"
24+
"SCCACHE_S3_KEY_PREFIX": "nvidia-stdexec-dev",
25+
"SCCACHE_SERVER_PORT": "4226",
26+
"SCCACHE_SERVER_LOG": "${localEnv:SCCACHE_SERVER_LOG:sccache=debug}"
2427
},
2528

2629
"workspaceFolder": "/home/coder/stdexec",
2730
"workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/stdexec,type=bind,consistency=consistent",
2831
"mounts": [
2932
"source=${localWorkspaceFolder}/.cache/.aws,target=/home/coder/.aws,type=bind,consistency=consistent",
33+
"source=${localWorkspaceFolder}/.cache/.cache,target=/home/coder/.cache,type=bind,consistency=consistent",
3034
"source=${localWorkspaceFolder}/.cache/.config,target=/home/coder/.config,type=bind,consistency=consistent"
3135
],
3236

.github/workflows/ci.cpu.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,24 @@ jobs:
4646
with:
4747
path: stdexec
4848
persist-credentials: false
49+
- name: Setup environment
50+
run: |
51+
echo "ARTIFACT_PREFIX=${{runner.os}}-${{matrix.tag}}-${{matrix.arch}}" >> "${GITHUB_ENV}"
52+
echo "ARTIFACT_SUFFIX=${{github.run_id}}-${{github.run_attempt}}-$RANDOM" >> "${GITHUB_ENV}"
53+
- id: sccache-preprocessor-cache
54+
name: Setup sccache preprocessor cache
55+
uses: actions/cache@v4
56+
with:
57+
path: .cache/.cache/sccache/preprocessor
58+
restore-keys: sccache-preprocessor-cache-${{env.ARTIFACT_PREFIX}}
59+
key: sccache-preprocessor-cache-${{env.ARTIFACT_PREFIX}}-${{env.ARTIFACT_SUFFIX}}
60+
- id: sccache-dist-toolchains-cache
61+
name: Setup sccache-dist client toolchains cache
62+
uses: actions/cache@v4
63+
with:
64+
path: .cache/.cache/sccache-dist-client
65+
restore-keys: sccache-toolchains-cache-${{env.ARTIFACT_PREFIX}}
66+
key: sccache-toolchains-cache-${{env.ARTIFACT_PREFIX}}-${{env.ARTIFACT_SUFFIX}}
4967
- if: github.repository_owner == 'NVIDIA'
5068
name: Get AWS credentials for sccache bucket
5169
uses: aws-actions/configure-aws-credentials@v4
@@ -81,6 +99,13 @@ jobs:
8199
82100
# Tests
83101
ctest --test-dir build --verbose --output-on-failure --timeout 60;
102+
- if: ${{ !cancelled() }}
103+
name: Upload sccache logs
104+
uses: actions/upload-artifact@v4
105+
with:
106+
name: sccache-client-logs-${{env.ARTIFACT_PREFIX}}-${{env.ARTIFACT_SUFFIX}}
107+
path: .cache/sccache*.log
108+
compression-level: 9
84109

85110
ci-cpu:
86111
runs-on: ubuntu-latest

.github/workflows/ci.gpu.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,24 @@ jobs:
4848
with:
4949
path: stdexec
5050
persist-credentials: false
51+
- name: Setup environment
52+
run: |
53+
echo "ARTIFACT_PREFIX=${{runner.os}}-cuda${{matrix.cuda}}-${{matrix.tag}}-${{matrix.arch}}" >> "${GITHUB_ENV}"
54+
echo "ARTIFACT_SUFFIX=${{github.run_id}}-${{github.run_attempt}}-$RANDOM" >> "${GITHUB_ENV}"
55+
- id: sccache-preprocessor-cache
56+
name: Setup sccache preprocessor cache
57+
uses: actions/cache@v4
58+
with:
59+
path: .cache/.cache/sccache/preprocessor
60+
restore-keys: sccache-preprocessor-cache-${{env.ARTIFACT_PREFIX}}
61+
key: sccache-preprocessor-cache-${{env.ARTIFACT_PREFIX}}-${{env.ARTIFACT_SUFFIX}}
62+
- id: sccache-dist-toolchains-cache
63+
name: Setup sccache-dist client toolchains cache
64+
uses: actions/cache@v4
65+
with:
66+
path: .cache/.cache/sccache-dist-client
67+
restore-keys: sccache-toolchains-cache-${{env.ARTIFACT_PREFIX}}
68+
key: sccache-toolchains-cache-${{env.ARTIFACT_PREFIX}}-${{env.ARTIFACT_SUFFIX}}
5169
- if: github.repository_owner == 'NVIDIA'
5270
name: Get AWS credentials for sccache bucket
5371
uses: aws-actions/configure-aws-credentials@v4
@@ -89,6 +107,13 @@ jobs:
89107
./build/examples/nvexec/maxwell_cpu_st --iterations=1000 --N=512 --run-cpp --run-inline-scheduler;
90108
./build/examples/nvexec/maxwell_cpu_mt --iterations=1000 --N=512 --run-std --run-stdpar --run-thread-pool-scheduler;
91109
./build/examples/nvexec/maxwell_gpu_s --iterations=1000 --N=512 --run-cuda --run-stdpar --run-stream-scheduler;
110+
- if: ${{ !cancelled() }}
111+
name: Upload sccache logs
112+
uses: actions/upload-artifact@v4
113+
with:
114+
name: sccache-client-logs-${{env.ARTIFACT_PREFIX}}-${{env.ARTIFACT_SUFFIX}}
115+
path: .cache/sccache*.log
116+
compression-level: 9
92117

93118

94119
ci-gpu:

0 commit comments

Comments
 (0)