|
76 | 76 | if: ${{ startsWith(inputs.host-platform, 'win') }} |
77 | 77 | uses: ilammy/msvc-dev-cmd@v1 # TODO: ask admin to allow pinning commits |
78 | 78 |
|
79 | | - # at this point, cl.exe already exists in PATH |
80 | | - - name: Find cl.exe and set CL_EXE environment variable |
81 | | - if: ${{ startsWith(inputs.host-platform, 'win') }} |
82 | | - run: | |
83 | | - # Find the full path of cl.exe |
84 | | - CL_EXE=$(which cl.exe) |
85 | | - if [ -z "${CL_EXE}" ]; then |
86 | | - echo "Error: cl.exe not found in PATH" |
87 | | - exit 1 |
88 | | - fi |
89 | | - echo "Found cl.exe at: ${CL_EXE}" |
90 | | - echo "CL_EXE=$(cygpath -w "${CL_EXE}")" >> $GITHUB_ENV |
91 | | -
|
92 | | - #- name: Generate sccache wrapper script |
93 | | - # if: ${{ startsWith(inputs.host-platform, 'win') }} |
94 | | - # run: | |
95 | | - # # Create a wrapper directory |
96 | | - # mkdir -p sccache_wrapper |
97 | | - # # Generate the wrapper script named cl.exe |
98 | | - # cat > sccache_wrapper/cl.exe <<'EOF' |
99 | | - # @echo off |
100 | | - # sccache "%CL_EXE%" %* |
101 | | - # EOF |
102 | | - # cat sccache_wrapper/cl.exe |
103 | | - # # Record the wrapper path for later use |
104 | | - # echo "SCCACHE_WRAPPER_DIR=$(realpath "./sccache_wrapper")" >> $GITHUB_ENV |
105 | | - |
106 | | - - name: Replace cl.exe by sccache.exe |
107 | | - if: ${{ startsWith(inputs.host-platform, 'win') }} |
108 | | - run: | |
109 | | - ls -lt "${{ env.CL_EXE }}" |
110 | | - cp "${{ env.SCCACHE_PATH }}" "${{ env.CL_EXE }}" |
111 | | - ls -lt "${{ env.CL_EXE }}" |
112 | | - "${{ env.SCCACHE_PATH }}" --start-server |
113 | | -
|
114 | 79 | - name: Set environment variables |
115 | 80 | env: |
116 | 81 | CUDA_VER: ${{ inputs.cuda-version }} |
@@ -190,24 +155,9 @@ jobs: |
190 | 155 | CIBW_ENVIRONMENT_WINDOWS: > |
191 | 156 | CUDA_PATH="$(cygpath -w ${{ env.CUDA_PATH }})" |
192 | 157 | CUDA_PYTHON_PARALLEL_LEVEL=${{ env.CUDA_PYTHON_PARALLEL_LEVEL }} |
193 | | - SCCACHE_GHA_ENABLED=true |
194 | | - ACTIONS_RUNTIME_TOKEN=${{ env.ACTIONS_RUNTIME_TOKEN }} |
195 | | - ACTIONS_RUNTIME_URL=${{ env.ACTIONS_RUNTIME_URL }} |
196 | | - ACTIONS_RESULTS_URL=${{ env.ACTIONS_RESULTS_URL }} |
197 | | - ACTIONS_CACHE_URL=${{ env.ACTIONS_CACHE_URL }} |
198 | | - ACTIONS_CACHE_SERVICE_V2=${{ env.ACTIONS_CACHE_SERVICE_V2 }} |
199 | | - SCCACHE_DIR="$(cygpath -w ${{ env.SCCACHE_DIR }})" |
200 | | - SCCACHE_CACHE_SIZE=${{ env.SCCACHE_CACHE_SIZE }} |
201 | | - SCCACHE_LOG=debug |
202 | | - #CL_EXE="${{ env.CL_EXE }}" |
203 | | - #PATH="$(cygpath -w "${{ env.SCCACHE_WRAPPER_DIR }}");$PATH" |
204 | | - CIBW_BEFORE_ALL_WINDOWS: > |
205 | | - echo %PATH% |
206 | 158 | # check cache stats before leaving cibuildwheel |
207 | 159 | CIBW_BEFORE_TEST_LINUX: > |
208 | 160 | "/host/${{ env.SCCACHE_PATH }}" --show-stats |
209 | | - CIBW_BEFORE_TEST_WINDOWS: > |
210 | | - "${{ env.SCCACHE_PATH }}" --show-stats |
211 | 161 | # force the test stage to be run (so that before-test is not skipped) |
212 | 162 | # TODO: we might want to think twice on adding this, it does a lot of |
213 | 163 | # things before reaching this command. |
|
0 commit comments