|
21 | 21 | required: false
|
22 | 22 | default: "linux,macos,windows"
|
23 | 23 |
|
24 |
| -env: |
25 |
| - CIBW_ARCHS_WINDOWS: "AMD64" |
26 |
| - |
27 | 24 | jobs:
|
28 | 25 | prepare-matrix:
|
29 | 26 | name: "Prepare matrix to run for ${{ inputs.python-version }} on `${{ inputs.target }}`"
|
|
86 | 83 | - name: Install OpenSSL for Windows
|
87 | 84 | if: runner.os == 'Windows'
|
88 | 85 | run: |
|
89 |
| - choco install openssl --version=3.4.1 -f -y |
| 86 | + choco install openssl --version=3.4.1 -f -y --no-progress |
| 87 | + choco install llvm -y --no-progress |
90 | 88 |
|
91 | 89 | - name: Install Conan
|
92 | 90 | if: runner.os == 'Windows'
|
@@ -115,45 +113,34 @@ jobs:
|
115 | 113 | echo "Enforcing target deployment for 14.0"
|
116 | 114 | fi
|
117 | 115 |
|
118 |
| -# - name: Add clang path to $PATH env |
119 |
| -# if: runner.os == 'Windows' |
120 |
| -# run: echo "C:\msys64\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append |
121 |
| - |
122 |
| - - name: Add clang path to $PATH env |
123 |
| - if: runner.os == 'Windows' |
124 |
| - run: | |
125 |
| - echo "CC=clang" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append |
126 |
| - echo "CXX=clang++" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append |
127 |
| -
|
128 |
| - - name: Check Clang Version |
129 |
| - run: clang --version |
130 |
| - |
131 |
| - - name: Force Clang for Compilation |
132 |
| - run: | |
133 |
| - echo "[build]" >> $HOME/.pydistutils.cfg |
134 |
| - echo "compiler=clang" >> $HOME/.pydistutils.cfg |
| 116 | + - name: Show clang-cl version |
| 117 | + run: clang-cl --version |
135 | 118 |
|
136 |
| - - name: Ensure cl.exe is Removed |
| 119 | + - name: Add clang to PATH |
| 120 | + shell: pwsh |
137 | 121 | run: |
|
138 |
| - cl.exe --version |
| 122 | + echo "C:\Program Files\LLVM\bin" >> $Env:GITHUB_PATH |
139 | 123 |
|
140 |
| - - name: Build wheels for windows |
141 |
| - if: runner.os == 'Windows' |
| 124 | + - name: Build wheels |
| 125 | + if: runner.os != 'Windows' |
142 | 126 | run: |
|
143 |
| - $envPath = $env:Path |
144 |
| - echo $envPath |
145 |
| - $pathArray = $envPath -split ";" |
146 |
| - $filteredPaths = $pathArray | Where-Object { $_ -notmatch "Microsoft Visual Studio" } |
147 |
| - $newPath = ($filteredPaths -join ";").TrimEnd(";") |
148 |
| - echo $newPath |
149 |
| - $env:Path = $newPath |
150 |
| - [System.Environment]::SetEnvironmentVariable("Path", $newPath, "User") |
151 | 127 | python3 -m cibuildwheel --output-dir wheelhouse
|
152 | 128 |
|
153 | 129 | - name: Build wheels
|
154 |
| - if: runner.os != 'Windows' |
| 130 | + if: runner.os == 'Windows' |
155 | 131 | run: |
|
156 |
| - python3 -m cibuildwheel --output-dir wheelhouse |
| 132 | + python3 -m cibuildwheel --output-dir wheelhouse --platform windows |
| 133 | + env: |
| 134 | + CIBW_ENVIRONMENT_WINDOWS: 'CC=clang-cl CXX=clang-cl DISTUTILS_USE_SDK=1 LDSHARED="clang -shared" ARFLAGS=rcs AR=llvm-ar CFLAGS="/nologo /O2 /W3 /DNDEBUG /D_CRT_SECURE_NO_WARNINGS /MD" CXXFLAGS="/nologo /O2 /W3 /DNDEBUG /D_CRT_SECURE_NO_WARNINGS /EHsc /MD /std:c++17" ' |
| 135 | + CC: clang-cl |
| 136 | + CXX: clang-cl |
| 137 | + DISTUTILS_USE_SDK: 1 |
| 138 | + CIBW_BUILD_VERBOSITY: 3 |
| 139 | + LDSHARED: clang -shared |
| 140 | + ARFLAGS: rcs |
| 141 | + AR: llvm-ar |
| 142 | + CFLAGS: /nologo /O2 /W3 /DNDEBUG /D_CRT_SECURE_NO_WARNINGS /MD |
| 143 | + CXXFLAGS: /nologo /O2 /W3 /DNDEBUG /D_CRT_SECURE_NO_WARNINGS /EHsc /MD /std:c++17 |
157 | 144 |
|
158 | 145 | - uses: actions/upload-artifact@v4
|
159 | 146 | with:
|
@@ -227,9 +214,6 @@ jobs:
|
227 | 214 | permissions:
|
228 | 215 | id-token: write
|
229 | 216 |
|
230 |
| - # upload to PyPI on every tag starting with 'v' |
231 |
| - # alternatively, to publish when a GitHub Release is created, use the following rule: |
232 |
| - # if: github.event_name == 'release' && github.event.action == 'published' |
233 | 217 | steps:
|
234 | 218 | - uses: actions/download-artifact@v4
|
235 | 219 | with:
|
|
0 commit comments