@@ -18,32 +18,32 @@ concurrency:
18
18
cancel-in-progress : true
19
19
20
20
jobs :
21
- get_commit_message :
22
- name : Get commit message
21
+ get_commit_tags :
22
+ name : Get commit tags
23
23
runs-on : ubuntu-latest
24
+ # To enable this workflow on a fork, comment out:
24
25
if : " github.repository == 'numpy/numpy'"
25
26
outputs :
26
27
message : ${{ steps.commit_message.outputs.message }}
27
28
steps :
28
29
- name : Checkout project
29
30
uses : actions/checkout@v4
30
- # Gets the correct commit message for pull request
31
31
with :
32
32
ref : ${{ github.event.pull_request.head.sha }}
33
33
- name : Get commit message
34
34
id : commit_message
35
35
run : |
36
36
set -xe
37
- COMMIT_MSG =$(git log --no-merges -1 --oneline )
38
- echo "message=$COMMIT_MSG " >> $GITHUB_OUTPUT
37
+ COMMIT_TAGS =$(git log --format=%B -n 1 | grep -o '\[[^]]*\]' | tr '\n' ' ' | xargs || true )
38
+ echo "message=$COMMIT_TAGS " >> $GITHUB_OUTPUT
39
39
echo github.ref ${{ github.ref }}
40
-
41
40
test_f2py_rtools :
42
41
name : cp311 (meson) f2py rtools
43
42
runs-on : windows-2019
44
- needs : get_commit_message
43
+ needs : get_commit_tags
45
44
if : >-
46
- contains(needs.get_commit_message.outputs.message, '[winci f2py]') ||
45
+ contains(needs.get_commit_tags.outputs.message, '[winci f2py]') ||
46
+ contains(needs.get_commit_tags.outputs.message, '[f2py winci]') ||
47
47
github.event_name == 'schedule' ||
48
48
github.event_name == 'workflow_dispatch' ||
49
49
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && ( ! endsWith(github.ref, 'dev0')))
@@ -59,19 +59,32 @@ jobs:
59
59
architecture : ' x64'
60
60
cache : ' pip'
61
61
cache-dependency-path : ' environment.yml'
62
+ - name : Setup Cache for Rtools
63
+ id : cache-rtools
64
+ uses : actions/cache@v3
65
+ with :
66
+ path : C:\rtools43
67
+ key : ${{ runner.os }}-rtools43-${{ hashFiles('**/rtools43-cache-key') }}
68
+ restore-keys : |
69
+ ${{ runner.os }}-rtools43-
62
70
# NumPy needs min GCC 8.2 so rtools >= 4.3
71
+ # 4.4.6104 is already present on windows-2019
63
72
# RTools Ver <-> GCC Ver
64
73
# RTools 4.0 <-> GCC 8
65
74
# RTools 4.3 <-> GCC 12
66
75
# RTools 4.4 <-> GCC 13
67
- - name : Install rtools (mingw-w64)
76
+ - name : Install rtools (mingw-w64) if not cached
77
+ if : steps.cache-rtools.outputs.cache-hit != 'true'
68
78
run : |
69
- choco install rtools -y --no-progress --force --version=4.4.6104
79
+ Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1
70
80
choco install -y --stoponfirstfailure --checksum 6004DF17818F5A6DBF19CB335CC92702 pkgconfiglite
81
+ choco install rtools -y --no-progress --force --version=4.3.5550
82
+ echo "c:\rtools43\mingw64\bin;" >> $env:GITHUB_PATH
71
83
- name : pip-packages
72
84
run : |
73
85
python -m pip install -r requirements/f2pyCI_requirements.txt
74
86
- name : Build and test # Fastest build, no BLAS or SIMD
75
87
run : |
76
- spin build -j2 -- -Dallow-noblas=true -Dcpu-baseline=none -Dcpu-dispatch=none
77
- spin test -t numpy.f2py -m full -- -vvvvvv
88
+ $env:PATH="C:\\rtools43\\mingw64\\bin;$env:PATH"
89
+ python -mspin build -j2 -- -Dallow-noblas=true -Dcpu-baseline=none -Dcpu-dispatch=none
90
+ python -mspin test -t numpy.f2py -m full -- -vvvvvv
0 commit comments