|
21 | 21 | fail-fast: false |
22 | 22 | matrix: |
23 | 23 | os: ['ubuntu-latest', 'windows-2022', 'macos-13'] |
24 | | - python: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14.0-rc.2', 'pypy3.9-v7.3.16', 'pypy3.10-v7.3.17'] |
| 24 | + python: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14', 'pypy3.9-v7.3.16', 'pypy3.10-v7.3.17'] |
25 | 25 |
|
26 | 26 | name: "Python ${{ matrix.python }} / ${{ matrix.os }}" |
27 | 27 | runs-on: ${{ matrix.os }} |
@@ -107,98 +107,180 @@ jobs: |
107 | 107 | cd build; |
108 | 108 | python3 -m pytest |
109 | 109 |
|
110 | | - old-compilers: |
111 | | - if: false # Disable for now, the CI is glitchy |
112 | | - strategy: |
113 | | - fail-fast: false |
114 | | - matrix: |
115 | | - include: |
116 | | - - cc: gcc-8 |
117 | | - cxx: g++-8 |
118 | | - apt: gcc-8 g++-8 |
119 | | - - cc: gcc-9 |
120 | | - cxx: g++-9 |
121 | | - apt: gcc-9 |
122 | | - - cc: clang-8 |
123 | | - cxx: clang++-8 |
124 | | - apt: clang-8 |
125 | | - - cc: clang-9 |
126 | | - cxx: clang++-9 |
127 | | - apt: clang-9 |
128 | | - - cc: clang-10 |
129 | | - cxx: clang++-10 |
130 | | - apt: clang-10 |
131 | | - |
| 110 | + free-threaded: |
| 111 | + name: "Python 3.14-dev / ubuntu.latest [free-threaded]" |
132 | 112 | runs-on: ubuntu-latest |
133 | | - container: ubuntu:20.04 |
134 | | - name: "${{matrix.cc}} on Ubuntu 20.04" |
135 | | - env: |
136 | | - CC: ${{matrix.cc}} |
137 | | - CXX: ${{matrix.cxx}} |
138 | | - DEBIAN_FRONTEND: noninteractive |
139 | 113 |
|
140 | 114 | steps: |
141 | | - - name: Install dependencies |
142 | | - run: | |
143 | | - apt-get update |
144 | | - apt-get install -y python3-numpy python3-pip python3-pytest libeigen3-dev cmake git ${{matrix.apt}} |
145 | | - python3 -m pip install typing_extensions |
146 | | -
|
147 | 115 | - uses: actions/checkout@v4 |
148 | 116 | with: |
149 | 117 | submodules: true |
150 | 118 |
|
| 119 | + - uses: deadsnakes/[email protected] |
| 120 | + with: |
| 121 | + python-version: 3.14-dev |
| 122 | + nogil: true |
| 123 | + |
| 124 | + - name: Install the latest CMake |
| 125 | + uses: lukka/get-cmake@latest |
| 126 | + |
| 127 | + - name: Install PyTest |
| 128 | + run: | |
| 129 | + python -m pip install pytest pytest-github-actions-annotate-failures |
| 130 | +
|
151 | 131 | - name: Configure |
152 | | - run: cmake -S . -B build |
| 132 | + run: > |
| 133 | + cmake -S . -B build -DNB_TEST_FREE_THREADED=ON |
153 | 134 |
|
154 | 135 | - name: Build C++ |
155 | | - run: cmake --build build -j 2 |
| 136 | + run: > |
| 137 | + cmake --build build -j 2 |
156 | 138 |
|
157 | 139 | - name: Check ABI tag |
158 | 140 | run: > |
159 | 141 | cd build/tests; |
160 | | - python3 -c 'import test_functions_ext as t; print(f"ABI tag is \"{ t.abi_tag() }\"")' |
| 142 | + python -c 'import test_functions_ext as t; print(f"ABI tag is \"{ t.abi_tag() }\"")' |
161 | 143 |
|
162 | 144 | - name: Run tests |
163 | 145 | run: > |
164 | 146 | cd build; |
165 | | - python3 -m pytest |
| 147 | + python -m pytest |
166 | 148 |
|
167 | | - free-threaded: |
168 | | - name: "Python 3.14-dev / ubuntu.latest [free-threaded]" |
169 | | - runs-on: ubuntu-latest |
| 149 | + mingw: |
| 150 | + runs-on: windows-2022 |
| 151 | + name: "Python ${{ matrix.python }} / MinGW-w64" |
| 152 | + strategy: |
| 153 | + fail-fast: false |
| 154 | + matrix: |
| 155 | + python: ['3.12'] |
170 | 156 |
|
171 | 157 | steps: |
172 | 158 | - uses: actions/checkout@v4 |
173 | 159 | with: |
174 | 160 | submodules: true |
175 | 161 |
|
176 | | - - uses: deadsnakes/[email protected] |
| 162 | + - name: Setup Python ${{ matrix.python }} |
| 163 | + uses: actions/setup-python@v5 |
177 | 164 | with: |
178 | | - python-version: 3.14-dev |
179 | | - nogil: true |
| 165 | + python-version: ${{ matrix.python }} |
| 166 | + cache: 'pip' |
| 167 | + |
| 168 | + - name: Setup MSYS2 (MINGW64) |
| 169 | + uses: msys2/setup-msys2@v2 |
| 170 | + with: |
| 171 | + msystem: MINGW64 |
| 172 | + install: >- |
| 173 | + mingw-w64-x86_64-gcc |
| 174 | + mingw-w64-x86_64-cmake |
| 175 | + mingw-w64-x86_64-ninja |
| 176 | + mingw-w64-x86_64-python |
| 177 | + mingw-w64-x86_64-python-pip |
| 178 | + mingw-w64-x86_64-python-pytest |
| 179 | +
|
| 180 | + - name: Install Python packages |
| 181 | + shell: msys2 {0} |
| 182 | + run: | |
| 183 | + python -m pip install pytest-github-actions-annotate-failures typing_extensions |
| 184 | +
|
| 185 | + - name: Configure |
| 186 | + shell: msys2 {0} |
| 187 | + run: | |
| 188 | + export PATH=/mingw64/bin:$PATH |
| 189 | + export CC=gcc |
| 190 | + export CXX=g++ |
| 191 | + PYEXE=/mingw64/bin/python3.exe |
| 192 | + cmake -S . -B build -G Ninja \ |
| 193 | + -DPython_EXECUTABLE="$(cygpath -w "$PYEXE")" \ |
| 194 | + -DNB_TEST_FREE_THREADED=OFF |
| 195 | +
|
| 196 | + - name: Build C++ |
| 197 | + shell: msys2 {0} |
| 198 | + run: cmake --build build -j 2 |
| 199 | + |
| 200 | + - name: Check ABI tag |
| 201 | + shell: msys2 {0} |
| 202 | + run: | |
| 203 | + cd build/tests |
| 204 | + python -c 'import test_functions_ext as t; print(f"ABI tag is \"{t.abi_tag()}\"")' |
| 205 | +
|
| 206 | + - name: Run tests |
| 207 | + shell: msys2 {0} |
| 208 | + run: | |
| 209 | + cd build |
| 210 | + python -m pytest |
| 211 | +
|
| 212 | + intel: |
| 213 | + runs-on: ubuntu-22.04 |
| 214 | + name: "Python ${{ matrix.python }} / Intel ICX" |
| 215 | + strategy: |
| 216 | + fail-fast: false |
| 217 | + matrix: |
| 218 | + python: ['3.12'] |
| 219 | + |
| 220 | + steps: |
| 221 | + - uses: actions/checkout@v4 |
| 222 | + with: |
| 223 | + submodules: true |
| 224 | + |
| 225 | + - name: Setup Python ${{ matrix.python }} |
| 226 | + uses: actions/setup-python@v5 |
| 227 | + with: |
| 228 | + python-version: ${{ matrix.python }} |
| 229 | + cache: 'pip' |
| 230 | + |
| 231 | + - name: Cache Intel oneAPI |
| 232 | + id: cache-oneapi |
| 233 | + uses: actions/cache@v4 |
| 234 | + with: |
| 235 | + path: /opt/intel/oneapi |
| 236 | + key: install-${{ runner.os }}-intel-oneapi-compiler-2025.2 |
| 237 | + |
| 238 | + - name: Add Intel repository |
| 239 | + if: steps.cache-oneapi.outputs.cache-hit != 'true' |
| 240 | + run: | |
| 241 | + wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null |
| 242 | + echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list |
| 243 | + sudo apt-get update |
| 244 | +
|
| 245 | + - name: Install Intel oneAPI compilers |
| 246 | + if: steps.cache-oneapi.outputs.cache-hit != 'true' |
| 247 | + run: | |
| 248 | + sudo apt-get install -y intel-oneapi-compiler-dpcpp-cpp |
| 249 | +
|
| 250 | + - name: Cleanup Intel oneAPI cache |
| 251 | + if: steps.cache-oneapi.outputs.cache-hit != 'true' |
| 252 | + run: | |
| 253 | + sudo rm -rf /opt/intel/oneapi/compiler/*/linux/lib/ia32 |
| 254 | + sudo rm -rf /opt/intel/oneapi/compiler/*/linux/lib/emu |
| 255 | + sudo rm -rf /opt/intel/oneapi/compiler/*/linux/lib/oclfpga |
180 | 256 |
|
181 | 257 | - name: Install the latest CMake |
182 | 258 | uses: lukka/get-cmake@latest |
183 | 259 |
|
184 | 260 | - name: Install PyTest |
185 | 261 | run: | |
186 | | - python -m pip install pytest pytest-github-actions-annotate-failures |
| 262 | + python -m pip install pytest pytest-github-actions-annotate-failures typing_extensions |
187 | 263 |
|
188 | 264 | - name: Configure |
189 | | - run: > |
190 | | - cmake -S . -B build -DNB_TEST_FREE_THREADED=ON |
| 265 | + run: | |
| 266 | + source /opt/intel/oneapi/setvars.sh |
| 267 | + export CC=icx |
| 268 | + export CXX=icpx |
| 269 | + cmake -S . -B build |
191 | 270 |
|
192 | 271 | - name: Build C++ |
193 | | - run: > |
| 272 | + run: | |
| 273 | + source /opt/intel/oneapi/setvars.sh |
194 | 274 | cmake --build build -j 2 |
195 | 275 |
|
196 | 276 | - name: Check ABI tag |
197 | | - run: > |
198 | | - cd build/tests; |
| 277 | + run: | |
| 278 | + source /opt/intel/oneapi/setvars.sh |
| 279 | + cd build/tests |
199 | 280 | python -c 'import test_functions_ext as t; print(f"ABI tag is \"{ t.abi_tag() }\"")' |
200 | 281 |
|
201 | 282 | - name: Run tests |
202 | | - run: > |
203 | | - cd build; |
| 283 | + run: | |
| 284 | + source /opt/intel/oneapi/setvars.sh |
| 285 | + cd build |
204 | 286 | python -m pytest |
0 commit comments