@@ -20,23 +20,66 @@ jobs:
20
20
fail-fast : false
21
21
matrix :
22
22
os : [ubuntu-22.04, ubuntu-20.04, macos-12, macos-11, windows-2022, windows-2019]
23
- compiler : [gcc]
24
- version : [12, 11, 10, 9, 8, 7, 6, 5]
23
+ toolchain :
24
+ - {compiler: gcc, version: 12}
25
+ - {compiler: gcc, version: 11}
26
+ - {compiler: gcc, version: 10}
27
+ - {compiler: gcc, version: 9}
28
+ - {compiler: gcc, version: 8}
29
+ - {compiler: gcc, version: 7}
30
+ - {compiler: gcc, version: 6}
31
+ # {compiler: gcc, version: 5}
32
+ include :
33
+ - {os: ubuntu-22.04, toolchain: {compiler: intel, version: '2023.1'}}
34
+ # {os: ubuntu-22.04, toolchain: {compiler: intel, version: '2023.0'}}
35
+ - {os: ubuntu-22.04, toolchain: {compiler: intel, version: '2022.2.1'}}
36
+ # {os: ubuntu-22.04, toolchain: {compiler: intel, version: '2022.2'}}
37
+ # {os: ubuntu-22.04, toolchain: {compiler: intel, version: '2022.1'}}
38
+ # {os: ubuntu-22.04, toolchain: {compiler: intel, version: '2022.0'}}
39
+ - {os: ubuntu-22.04, toolchain: {compiler: intel, version: '2021.4'}}
40
+ # {os: ubuntu-22.04, toolchain: {compiler: intel, version: '2021.3'}}
41
+ # {os: ubuntu-22.04, toolchain: {compiler: intel, version: '2021.2'}}
42
+ # {os: ubuntu-22.04, toolchain: {compiler: intel, version: '2021.1.2'}}
43
+ # {os: ubuntu-22.04, toolchain: {compiler: intel, version: '2021.1'}}
44
+
45
+ - {os: ubuntu-22.04, toolchain: {compiler: intel-classic, version: '2021.9'}}
46
+ # {os: ubuntu-22.04, toolchain: {compiler: intel-classic, version: '2021.8'}}
47
+ - {os: ubuntu-22.04, toolchain: {compiler: intel-classic, version: '2021.7.1'}}
48
+ # {os: ubuntu-22.04, toolchain: {compiler: intel-classic, version: '2021.7'}}
49
+ # {os: ubuntu-22.04, toolchain: {compiler: intel-classic, version: '2021.6'}}
50
+ # {os: ubuntu-22.04, toolchain: {compiler: intel-classic, version: '2021.5'}}
51
+ - {os: ubuntu-22.04, toolchain: {compiler: intel-classic, version: '2021.4'}}
52
+ # {os: ubuntu-22.04, toolchain: {compiler: intel-classic, version: '2021.3'}}
53
+ # {os: ubuntu-22.04, toolchain: {compiler: intel-classic, version: '2021.2'}}
54
+ # {os: ubuntu-22.04, toolchain: {compiler: intel-classic, version: '2021.1.2'}}
55
+ # {os: ubuntu-22.04, toolchain: {compiler: intel-classic, version: '2021.1'}}
56
+
57
+ - {os: macos-12, toolchain: {compiler: intel-classic, version: '2021.9'}}
58
+ # {os: macos-12, toolchain: {compiler: intel-classic, version: '2021.8'}}
59
+ - {os: macos-12, toolchain: {compiler: intel-classic, version: '2021.7.1'}}
60
+ # {os: macos-12, toolchain: {compiler: intel-classic, version: '2021.7'}}
61
+ # {os: macos-12, toolchain: {compiler: intel-classic, version: '2021.6'}}
62
+ # {os: macos-12, toolchain: {compiler: intel-classic, version: '2021.5'}}
63
+ - {os: macos-12, toolchain: {compiler: intel-classic, version: '2021.4'}}
64
+ # {os: macos-12, toolchain: {compiler: intel-classic, version: '2021.3'}}
65
+ # {os: macos-12, toolchain: {compiler: intel-classic, version: '2021.2'}}
66
+ # {os: macos-12, toolchain: {compiler: intel-classic, version: '2021.1'}}
67
+
25
68
steps :
26
69
27
70
- name : Checkout repository
28
71
uses : actions/checkout@v3
29
72
30
73
- name : Setup Fortran
31
- continue-on-error : true
74
+ continue-on-error : ${{ matrix.toolchain.compiler == 'gcc' }}
32
75
id : setup-fortran
33
76
uses : ./
34
77
with :
35
- compiler : ${{ matrix.compiler }}
36
- version : ${{ matrix.version }}
78
+ compiler : ${{ matrix.toolchain. compiler }}
79
+ version : ${{ matrix.toolchain. version }}
37
80
38
81
- name : Check compiler version
39
- if : steps.setup-fortran.outcome == 'success'
82
+ if : ${{ steps.setup-fortran.outcome == 'success' }}
40
83
shell : bash
41
84
env :
42
85
FC : ${{ steps.setup-fortran.outputs.fc }}
@@ -48,14 +91,14 @@ jobs:
48
91
echo $fcv
49
92
echo $ccv
50
93
51
- fcv=$(echo "${ fcv##*)} " | xargs )
52
- ccv=$(echo "${ ccv##*)} " | xargs )
94
+ fcv=$(echo "$fcv" | grep -woE '[0123456789.]+' | head -n 1 )
95
+ ccv=$(echo "$ccv" | grep -woE '[0123456789.]+' | head -n 1 )
53
96
54
- [[ $fcv == ${{ matrix.version }}* ]] || (echo "unexpected Fortran compiler version: $fcv"; exit 1)
55
- [[ $ccv == ${{ matrix.version }}* ]] || (echo "unexpected C compiler version: $ccv"; exit 1)
97
+ [[ $fcv == ${{ matrix.toolchain. version }}* ]] || (echo "unexpected Fortran compiler version: $fcv"; exit 1)
98
+ [[ $ccv == ${{ matrix.toolchain. version }}* ]] || (echo "unexpected C compiler version: $ccv"; exit 1)
56
99
57
100
- name : Test compile program (bash)
58
- if : steps.setup-fortran.outcome == 'success'
101
+ if : ${{ steps.setup-fortran.outcome == 'success' }}
59
102
shell : bash
60
103
env :
61
104
FC : ${{ steps.setup-fortran.outputs.fc }}
66
109
[[ "$output" == *"hello world"* ]] && echo "$output" || (echo "Unexpected output: $output"; exit 1)
67
110
68
111
- name : Test compile program (Powershell Core)
69
- if : steps.setup-fortran.outcome == 'success' && runner.os == 'Windows'
112
+ if : ${{ steps.setup-fortran.outcome == 'success' && runner.os == 'Windows' }}
70
113
shell : pwsh
71
114
env :
72
115
FC : ${{ steps.setup-fortran.outputs.fc }}
83
126
}
84
127
85
128
- name : Test compile program (Powershell Desktop)
86
- if : steps.setup-fortran.outcome == 'success' && runner.os == 'Windows'
129
+ if : ${{ steps.setup-fortran.outcome == 'success' && runner.os == 'Windows' }}
87
130
shell : powershell
88
131
env :
89
132
FC : ${{ steps.setup-fortran.outputs.fc }}
@@ -100,7 +143,7 @@ jobs:
100
143
}
101
144
102
145
- name : Test compile program (cmd)
103
- if : steps.setup-fortran.outcome == 'success' && runner.os == 'Windows'
146
+ if : ${{ steps.setup-fortran.outcome == 'success' && runner.os == 'Windows' }}
104
147
shell : cmd
105
148
env :
106
149
FC : ${{ steps.setup-fortran.outputs.fc }}
@@ -126,10 +169,11 @@ jobs:
126
169
fi
127
170
128
171
mkdir compat
129
- prefix="${{ matrix.os }},${{ matrix.compiler }},${{ matrix.version }}"
172
+ prefix="${{ matrix.os }},${{ matrix.toolchain. compiler }},${{ matrix.toolchain .version }}"
130
173
echo "$prefix,$support" >> "compat/${prefix//,/_}.csv"
131
174
132
175
- name : Upload compatibility report
176
+ if : ${{ matrix.toolchain.compiler == 'gcc' }}
133
177
uses : actions/upload-artifact@v3
134
178
with :
135
179
name : compat
@@ -206,7 +250,7 @@ jobs:
206
250
fi
207
251
208
252
- name : Update README
209
- if : steps.diff.outputs.diff == 'true' && github.event_name == 'push'
253
+ if : ${{ steps.diff.outputs.diff == 'true' && github.event_name == 'push' }}
210
254
shell : python
211
255
run : |
212
256
import re
@@ -220,12 +264,12 @@ jobs:
220
264
readme_path.open('w').write(r.sub(chunk, readme))
221
265
222
266
- name : Print README diff
223
- if : steps.diff.outputs.diff == 'true' && github.event_name == 'push'
267
+ if : ${{ steps.diff.outputs.diff == 'true' && github.event_name == 'push' }}
224
268
run : |
225
269
git diff README.md
226
270
227
271
- name : Create pull request
228
- if : steps.diff.outputs.diff == 'true' && github.event_name == 'push'
272
+ if : ${{ steps.diff.outputs.diff == 'true' && github.event_name == 'push' }}
229
273
env :
230
274
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
231
275
run : |
0 commit comments