@@ -25,10 +25,23 @@ runs:
25
25
- name : Set up CTK cache variable
26
26
shell : bash --noprofile --norc -xeuo pipefail {0}
27
27
run : |
28
- HASH=$(echo -n "${{ inputs.cuda-components }}" | sha256sum | awk '{print $1}')
28
+ # Pre-process the component list to ensure hash uniqueness
29
+ CTK_CACHE_COMPONENTS=${{ inputs.cuda-components }}
30
+ # Conditionally strip out libnvjitlink for CUDA versions < 12
31
+ if [[ "$(cut -d '.' -f 1 <<< ${{ inputs.cuda-version }})" -lt 12 ]]; then
32
+ CTK_CACHE_COMPONENTS="${CTK_CACHE_COMPONENTS//libnvjitlink/}"
33
+ fi
34
+ # Conditionally strip out libcufile since it does not support Windows
35
+ if [[ "${{ inputs.host-platform }}" == win-* ]]; then
36
+ CTK_CACHE_COMPONENTS="${CTK_CACHE_COMPONENTS//libcufile/}"
37
+ fi
38
+ # Cleanup stray commas after removing components
39
+ CTK_CACHE_COMPONENTS="${CTK_CACHE_COMPONENTS//,,/,}"
40
+
41
+ HASH=$(echo -n "${CTK_CACHE_COMPONENTS}" | sha256sum | awk '{print $1}')
29
42
echo "CTK_CACHE_KEY=mini-ctk-${{ inputs.cuda-version }}-${{ inputs.host-platform }}-$HASH" >> $GITHUB_ENV
30
43
echo "CTK_CACHE_FILENAME=mini-ctk-${{ inputs.cuda-version }}-${{ inputs.host-platform }}-$HASH.tar.gz" >> $GITHUB_ENV
31
- echo "CTK_CACHE_COMPONENTS=${{ inputs.cuda-components } }" >> $GITHUB_ENV
44
+ echo "CTK_CACHE_COMPONENTS=${CTK_CACHE_COMPONENTS }" >> $GITHUB_ENV
32
45
33
46
- name : Install dependencies
34
47
uses : ./.github/actions/install_unix_deps
@@ -94,12 +107,6 @@ runs:
94
107
rm $CTK_COMPONENT_COMPONENT_FILENAME
95
108
}
96
109
97
- # Conditionally strip out libnvjitlink for CUDA versions < 12
98
- if [[ "$(cut -d '.' -f 1 <<< ${{ inputs.cuda-version }})" -lt 12 ]]; then
99
- CTK_CACHE_COMPONENTS="${CTK_CACHE_COMPONENTS//libnvjitlink/}"
100
- fi
101
- # Cleanup stray commas after removing components
102
- CTK_CACHE_COMPONENTS="${CTK_CACHE_COMPONENTS//,,/,}"
103
110
# Get headers and shared libraries in place
104
111
for item in $(echo $CTK_CACHE_COMPONENTS | tr ',' ' '); do
105
112
populate_cuda_path "$item"
0 commit comments