Debian Codegraph @

.github/workflows/windows.yml

raw
1 name: Windows tests
2
3 on:
4 pull_request:
5 branches:
6 - main
7 - maintenance/**
8 paths-ignore:
9 - '**.pyi'
10 - '**.md'
11 - '**.rst'
12
13 concurrency:
14 group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
15 cancel-in-progress: true
16
17 permissions:
18 contents: read # to fetch code (actions/checkout)
19
20 jobs:
21 clangcl_python64bit_openblas32:
22 name: Clang-cl, x86-64, fast, openblas32
23 runs-on: windows-2022
24 # To enable this job on a fork, comment out:
25 if: github.repository == 'numpy/numpy'
26 steps:
27 - name: Checkout
28 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
29 with:
30 submodules: recursive
31 fetch-tags: true
32 persist-credentials: false
33
34 - name: Setup Python
35 uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
36 with:
37 python-version: "3.14t"
38
39 - name: Install build dependencies from PyPI
40 run: |
41 pip install -r requirements/build_requirements.txt
42
43 - name: Install pkg-config
44 run: |
45 choco install -y --stoponfirstfailure --checksum 6004DF17818F5A6DBF19CB335CC92702 pkgconfiglite
46 echo "PKG_CONFIG_PATH=${{ github.workspace }}/.openblas" >> $env:GITHUB_ENV
47
48 - name: Install NumPy (Clang-cl)
49 run: |
50 "[binaries]","c = 'clang-cl'","cpp = 'clang-cl'","ar = 'llvm-lib'","c_ld = 'lld-link'","cpp_ld = 'lld-link'" | Out-File $PWD/clang-cl-build.ini -Encoding ascii
51 pip install -r requirements/ci_requirements.txt
52 spin build --with-scipy-openblas=32 -j2 -- --vsenv --native-file=$PWD/clang-cl-build.ini
53
54 - name: Meson Log
55 shell: bash
56 if: ${{ failure() }}
57 run: |
58 cat build/meson-logs/meson-log.txt
59
60 - name: Install test dependencies
61 run: |
62 python -m pip install -r requirements/test_requirements.txt
63 python -m pip install threadpoolctl
64
65 - name: Run test suite
66 run: |
67 spin test -- --timeout=600 --durations=10
68
69
70 #=======================================================================================
71 msvc_python32bit_no_openblas:
72 name: MSVC, ${{ matrix.architecture }}, fast, no BLAS
73 runs-on: ${{ matrix.os }}
74 strategy:
75 fail-fast: false
76 matrix:
77 include:
78 - os: windows-2022
79 architecture: x86
80 - os: windows-11-arm
81 architecture: arm64
82 # To enable this job on a fork, comment out:
83 if: github.repository == 'numpy/numpy'
84 steps:
85 - name: Checkout
86 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
87 with:
88 submodules: recursive
89 fetch-tags: true
90 persist-credentials: false
91
92 - name: Setup Python
93 uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
94 with:
95 python-version: '3.11'
96 architecture: ${{ matrix.architecture }}
97
98 - name: Setup MSVC
99 uses: bus1/cabuild/action/msdevshell@e22aba57d6e74891d059d66501b6b5aed8123c4d # v1
100 with:
101 architecture: ${{ matrix.architecture }}
102
103 - name: Build and install
104 run: |
105 python -m pip install . -v -Ccompile-args="-j2" -Csetup-args="-Dallow-noblas=true" 2>&1 | tee build.log
106
107 - name: Check warnings
108 uses: ./.github/check-warnings
109 with:
110 log-file: ./build.log
111 allowlist: ./.github/check-warnings/msvc-allowed-warnings.txt
112 warning-regex: "warning C|Command line warning"
113
114 - name: Install test dependencies
115 run: |
116 python -m pip install -r requirements/test_requirements.txt
117
118 - name: Run test suite (fast)
119 run: |
120 cd tools
121 python -m pytest --pyargs numpy -m "not slow" -n2 --timeout=600 --durations=10
122
123 #=======================================================================================
124 msvc_python64bit_openblas:
125 name: MSVC, x86_64, ${{ matrix.TEST_MODE }}, openblas${{ matrix.BLAS }}
126 runs-on: windows-2022
127 strategy:
128 fail-fast: false
129 matrix:
130 include:
131 - BLAS: 64
132 TEST_MODE: full
133 pyver: '3.14'
134 - BLAS: 32
135 TEST_MODE: fast
136 pyver: '3.11'
137
138 # To enable this job on a fork, comment out:
139 if: github.repository == 'numpy/numpy'
140 steps:
141 - name: Checkout
142 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
143 with:
144 submodules: recursive
145 fetch-tags: true
146 persist-credentials: false
147
148 - name: Setup Python
149 uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
150 with:
151 python-version: ${{ matrix.pyver }}
152
153 - name: pkg-config
154 run: |
155 choco install -y --stoponfirstfailure --checksum 6004DF17818F5A6DBF19CB335CC92702 pkgconfiglite
156
157 - name: Dependencies
158 run: |
159 python -m pip install -r requirements/test_requirements.txt
160
161 - name: Build and install
162 run: |
163 pip install -r requirements/ci_requirements.txt
164 spin config-openblas --with-scipy-openblas=${{ matrix.BLAS }}
165 $env:PKG_CONFIG_PATH="$pwd/.openblas"
166 python -m pip install . -v -Csetup-args="--vsenv" -Csetup-args="-Dallow-noblas=false"
167
168 - name: Run test suite ${{ matrix.TEST_MODE }}
169 run: |
170 cd tools
171 # Get a gfortran onto the path for f2py tests
172 $env:PATH = "c:\\rtools45\\x86_64-w64-mingw32.static.posix\\bin;$env:PATH"
173 If ( "${{ matrix.TEST_MODE }}" -eq "full" ) {
174 python -m pytest --pyargs numpy -rsx -n2 --durations=10
175 } else {
176 python -m pytest --pyargs numpy -m "not slow" -n2 --timeout=600 --durations=10 -rsx
177 }