8000 CI, MAINT: use `fetch-tags: true`, dequote conditions · numpy/numpy@b519d70 · GitHub
[go: up one dir, main page]

Skip to content

Commit b519d70

Browse files
CI, MAINT: use fetch-tags: true, dequote conditions
This commit performs the following changes: 1. It uses the fetch-tags: true input for the GitHub Actions checkout step for all of the workflows 2. It de-quotes the condition for disabling jobs on forks, wherever applicable – it removes some JSON schema warnings emitted in Visual Studio Code. 3. In some locations, comments have been added that prompt users to comment out the condition in point 2 to run it on their forks. [skip circle] [skip cirrus] [skip azp]
1 parent a53b0b3 commit b519d70

File tree

12 files changed

+71
-61
lines changed

12 files changed

+71
-61
lines changed

.github/workflows/cygwin.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# To enable this workflow on a fork, comment out:
2-
#
3-
# if: github.repository == 'numpy/numpy'
41
name: Test on Cygwin
52
on:
63
pull_request:
@@ -18,14 +15,15 @@ permissions:
1815
jobs:
1916
cygwin_build_test:
2017
runs-on: windows-latest
21-
if: "github.repository == 'numpy/numpy'"
18+
# To enable this workflow on a fork, comment out:
19+
if: github.repository == 'numpy/numpy'
2220
steps:
2321
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2422
with:
2523
submodules: recursive
26-
fetch-depth: 0
24+
fetch-tags: true
2725
- name: Install Cygwin
28-
uses: egor-tensin/setup-cygwin@d2c752bab416d4b0662591bd366fc2686297c82d #v4
26+
uses: egor-tensin/setup-cygwin@d2c752bab416d4b0662591bd366fc2686297c82d # v4
2927
with:
3028
platform: x86_64
3129
install-dir: 'C:\tools\cygwin'

.github/workflows/labeler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ permissions: {}
88
jobs:
99
pr-labeler:
1010
runs-on: ubuntu-latest
11-
permissions:
11+
permissions:
1212
pull-requests: write # to add labels
1313
steps:
1414
- name: Label the PR

.github/workflows/linux.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,15 @@ permissions:
2828

2929
jobs:
3030
lint:
31+
# To enable this job and subsequent jobs on a fork, comment out:
3132
if: github.repository == 'numpy/numpy' && github.event_name != 'push'
3233
runs-on: ubuntu-latest
3334
continue-on-error: true
3435
steps:
3536
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
3637
with:
3738
submodules: recursive
38-
fetch-depth: 0
39+
fetch-tags: true
3940
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
4041
with:
4142
python-version: '3.9'
@@ -47,15 +48,16 @@ jobs:
4748
python tools/linter.py --branch origin/${{ github.base_ref }}
4849

4950
smoke_test:
50-
if: "github.repository == 'numpy/numpy'"
51+
# To enable this job on a fork, comment out:
52+
if: github.repository == 'numpy/numpy'
5153
runs-on: ubuntu-latest
5254
env:
5355
MESON_ARGS: "-Dallow-noblas=true -Dcpu-baseline=none -Dcpu-dispatch=none"
5456
steps:
5557
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
5658
with:
5759
submodules: recursive
58-
fetch-depth: 0
60+
fetch-tags: true
5961
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
6062
with:
6163
python-version: '3.9'
@@ -69,7 +71,7 @@ jobs:
6971
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
7072
with:
7173
submodules: recursive
72-
fetch-depth: 0
74+
fetch-tags: true
7375
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
7476
with:
7577
python-version: 'pypy3.9-v7.3.12'
@@ -87,7 +89,7 @@ jobs:
8789
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
8890
with:
8991
submodules: recursive
90-
fetch-depth: 0
92+
fetch-tags: true
9193
- name: Install debug Python
9294
run: |
9395
sudo apt-get update
@@ -116,7 +118,7 @@ jobs:
116118
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
117119
with:
118120
submodules: recursive
119-
fetch-depth: 0
121+
fetch-tags: true
120122
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
121123
with:
122124
python-version: '3.9'
@@ -153,7 +155,7 @@ jobs:
153155
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
154156
with:
155157
submodules: recursive
156-
fetch-depth: 0
158+
fetch-tags: true
157159
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
158160
with:
159161
python-version: '3.9'
@@ -184,7 +186,7 @@ jobs:
184186
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
185187
with:
186188
submodules: recursive
187-
fetch-depth: 0
189+
fetch-tags: true
188190
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
189191
with:
190192
python-version: '3.11'
@@ -218,7 +220,7 @@ jobs:
218220
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
219221
with:
220222
submodules: recursive
221-
fetch-depth: 0
223+
fetch-tags: true
222224
- name: Checkout array-api-tests
223225
uses: actions/checkout@v4
224226
with:
@@ -256,7 +258,7 @@ jobs:
256258
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
257259
with:
258260
submodules: recursive
259-
fetch-depth: 0
261+
fetch-tags: true
260262
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
261263
with:
262264
python-version: '3.11'

.github/workflows/linux_blas.yml

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ permissions:
5454

5555
jobs:
5656
openblas32_stable_nightly:
57-
if: "github.repository == 'numpy/numpy'"
57+
# To enable this workflow on a fork, comment out:
58+
if: github.repository == 'numpy/numpy'
5859
runs-on: ubuntu-latest
5960
strategy:
6061
matrix:
@@ -66,7 +67,7 @@ jobs:
6667
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
6768
with:
6869
submodules: recursive
69-
fetch-depth: 0
70+
fetch-tags: true
7071
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
7172
with:
7273
python-version: '3.11'
@@ -116,7 +117,7 @@ jobs:
116117
117118
118119
openblas_no_pkgconfig_fedora:
119-
if: "github.repository == 'numpy/numpy'"
120+
if: github.repository == 'numpy/numpy'
120121
runs-on: ubuntu-latest
121122
container: fedora:39
122123
name: "OpenBLAS (Fedora, no pkg-config, LP64/ILP64)"
@@ -128,7 +129,7 @@ jobs:
128129
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
129130
with:
130131
submodules: recursive
131-
fetch-depth: 0
132+
fetch-tags: true
132133

133134
- name: Install dependencies
134135
run: |
@@ -151,7 +152,7 @@ jobs:
151152

152153

153154
flexiblas_fedora:
154-
if: "github.repository == 'numpy/numpy'"
155+
if: github.repository == 'numpy/numpy'
155156
runs-on: ubuntu-latest
156157
container: fedora:39
157158
name: "FlexiBLAS (LP64, ILP64 on Fedora)"
@@ -163,7 +164,7 @@ jobs:
163164
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
164165
with:
165166
submodules: recursive
166-
fetch-depth: 0
167+
fetch-tags: true
167168

168169
- name: Install dependencies
169170
run: |
@@ -186,14 +187,14 @@ jobs:
186187

187188

188189
o F438 penblas_cmake:
189-
if: "github.repository == 'numpy/numpy'"
190+
if: github.repository == 'numpy/numpy'
190191
runs-on: ubuntu-latest
191192
name: "OpenBLAS with CMake"
192193
steps:
193194
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
194195
with:
195196
submodules: recursive
196-
fetch-depth: 0
197+
fetch-tags: true
197198
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
198199
with:
199200
python-version: '3.11'
@@ -214,14 +215,14 @@ jobs:
214215

215216

216217
netlib-debian:
217-
if: "github.repository == 'numpy/numpy'"
218+
if: github.repository == 'numpy/numpy'
218219
runs-on: ubuntu-latest
219220
name: "Debian libblas/liblapack"
220221
steps:
221222
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
222223
with:
223224
submodules: recursive
224-
fetch-depth: 0
225+
fetch-tags: true
225226
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
226227
with:
227228
python-version: '3.11'
@@ -243,7 +244,7 @@ jobs:
243244
244245
245246
netlib-split:
246-
if: "github.repository == 'numpy/numpy'"
247+
if: github.repository == 'numpy/numpy'
247248
runs-on: ubuntu-latest
248249
container: opensuse/tumbleweed
249250
name: "OpenSUSE Netlib BLAS/LAPACK"
@@ -257,7 +258,7 @@ jobs:
257258
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
258259
with:
259260
submodules: recursive
260-
fetch-depth: 0
261+
fetch-tags: true
261262

262263
- name: Install PyPI dependencies
263264
run: |
@@ -274,14 +275,14 @@ jobs:
274275
275276
276277
mkl:
277-
if: "github.repository == 'numpy/numpy'"
278+
if: github.repository == 'numpy/numpy'
278279
runs-on: ubuntu-latest
279280
name: "MKL (LP64, ILP64, SDL)"
280281
steps:
281282
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
282283
with:
283284
submodules: recursive
284-
fetch-depth: 0
285+
fetch-tags: true
285286
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
286287
with:
287288
python-version: '3.11'
@@ -337,14 +338,14 @@ jobs:
337338
run: spin test -- numpy/linalg
338339

339340
blis:
340-
if: "github.repository == 'numpy/numpy'"
341+
if: github.repository == 'numpy/numpy'
341342
runs-on: ubuntu-latest
342343
name: "BLIS"
343344
steps:
344345
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
345346
with:
346347
submodules: recursive
347-
fetch-depth: 0
348+
fetch-tags: true
348349
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
349350
with:
350351
python-version: '3.11'
@@ -373,14 +374,14 @@ jobs:
373374
run: spin test -- numpy/linalg
374375

375376
atlas:
376-
if: "github.repository == 'numpy/numpy'"
377+
if: github.repository == 'numpy/numpy'
377378
runs-on: ubuntu-latest
378379
name: "ATLAS"
379380
steps:
380381
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
381382
with:
382383
submodules: recursive
383-
fetch-depth: 0
384+
fetch-tags: true
384385
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
385386
with:
386387
python-version: '3.11'

.github/workflows/linux_compiler_sanitizers.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,14 @@ permissions:
2222

2323
jobs:
2424
gcc_sanitizers:
25-
if: "github.repository == 'numpy/numpy'"
25+
# To enable this workflow on a fork, comment out:
26+
if: github.repository == 'numpy/numpy'
2627
runs-on: ubuntu-latest
2728
steps:
2829
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2930
with:
3031
submodules: recursive
31-
fetch-depth: 0
32+
fetch-tags: true
3233
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
3334
with:
3435
python-version: ${{ env.PYTHON_VERSION }}

.github/workflows/linux_musl.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ permissions:
1919
jobs:
2020
musllinux_x86_64:
2121
runs-on: ubuntu-latest
22-
if: "github.repository == 'numpy/numpy'"
22+
# To enable this workflow on a fork, comment out:
23+
if: github.repository == 'numpy/numpy'
2324
container:
2425
# Use container used for building musllinux wheels
2526
# it has git installed, all the pythons, etc
@@ -34,11 +35,11 @@ jobs:
3435
# actions/checkout is used for the clone step in a container
3536
3637
git config --global --add safe.directory $PWD
37-
38+
3839
if [ $GITHUB_EVENT_NAME != pull_request ]; then
3940
git clone --recursive --branch=$GITHUB_REF_NAME https://github.com/${GITHUB_REPOSITORY}.git $GITHUB_WORKSPACE
4041
git reset --hard $GITHUB_SHA
41-
else
42+
else
4243
git clone --recursive https://github.com/${GITHUB_REPOSITORY}.git $GITHUB_WORKSPACE
4344
git fetch origin $GITHUB_REF:my_ref_name
4445
git checkout $GITHUB_BASE_REF

.github/workflows/linux_qemu.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ permissions:
2828

2929
jobs:
3030
linux_qemu:
31-
if: "github.repository == 'numpy/numpy'"
31+
# To enable this workflow on a fork, comment out:
32+
if: github.repository == 'numpy/numpy'
3233
runs-on: ubuntu-22.04
3334
continue-on-error: true
3435
strategy:
@@ -94,7 +95,7 @@ jobs:
9495
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
9596
with:
9697
submodules: recursive
97-
fetch-depth: 0
98+
fetch-tags: true
9899

99100
- name: Initialize binfmt_misc for qemu-user-static
100101
run: |

0 commit comments

Comments
 (0)
0