Skip to content

Commit c04a299

Browse files
committed
Use clang-cl and others bells and wisthels
1 parent eb1007a commit c04a299

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

.github/workflows/cibuildwheels.yml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ env:
1818
# musllinux takes too long to build, and it's not worth it for now
1919
CIBW_SKIP: "pp* *musllinux* *-win32"
2020
# Use explicit generator/compiler env vars; CMAKE_ARGS with spaces is not split on Windows.
21-
CIBW_ENVIRONMENT_WINDOWS: "PATH=C:\\Program Files\\LLVM\\bin;%PATH% CC=clang-cl CXX=clang-cl CMAKE_GENERATOR=Ninja CMAKE_C_COMPILER=clang-cl CMAKE_CXX_COMPILER=clang-cl"
21+
CIBW_ENVIRONMENT_WINDOWS: "PATH=C:\\Program Files\\LLVM\\bin;%PATH% CC=clang-cl CXX=clang-cl CMAKE_GENERATOR=Ninja CMAKE_C_COMPILER=clang-cl CMAKE_CXX_COMPILER=clang-cl CMAKE_C_COMPILER_LAUNCHER=sccache CMAKE_CXX_COMPILER_LAUNCHER=sccache CMAKE_BUILD_PARALLEL_LEVEL=8 SKBUILD_PARALLEL_LEVEL=8 SCCACHE_DIR=C:\\Users\\runneradmin\\AppData\\Local\\sccache"
2222

2323
jobs:
2424

@@ -79,6 +79,32 @@ jobs:
7979
id: ninja
8080
uses: turtlesec-no/get-ninja@main
8181

82+
- name: Add LLVM to PATH (Windows)
83+
if: ${{ matrix.os == 'windows-latest' }}
84+
run: echo "C:\\Program Files\\LLVM\\bin" >> $env:GITHUB_PATH
85+
86+
- name: Install sccache (Windows)
87+
if: ${{ matrix.os == 'windows-latest' }}
88+
run: choco install sccache --yes
89+
90+
- name: Cache sccache (Windows)
91+
if: ${{ matrix.os == 'windows-latest' }}
92+
uses: actions/cache@v4
93+
with:
94+
path: C:\Users\runneradmin\AppData\Local\sccache
95+
key: sccache-${{ runner.os }}-${{ github.sha }}
96+
restore-keys: |
97+
sccache-${{ runner.os }}-
98+
99+
- name: Cache pip (Windows)
100+
if: ${{ matrix.os == 'windows-latest' }}
101+
uses: actions/cache@v4
102+
with:
103+
path: C:\Users\runneradmin\AppData\Local\pip\Cache
104+
key: pip-${{ runner.os }}-${{ hashFiles('pyproject.toml') }}
105+
restore-keys: |
106+
pip-${{ runner.os }}-
107+
82108
- name: Install MSVC amd64
83109
uses: ilammy/msvc-dev-cmd@v1
84110
with:

0 commit comments

Comments
 (0)