@@ -10,16 +10,44 @@ jobs:
10
10
strategy :
11
11
fail-fast : false
12
12
matrix :
13
- os : [macos-13, macos-14, ubuntu-22.04, ubuntu-24.04]
13
+ os : [macos-13, macos-14, macos-15, ubuntu-22.04, ubuntu-24.04]
14
14
compiler : [ gfortran ]
15
15
version : [ 12, 13, 14 ]
16
- extra_flags : [ -ffree-line-length-0 ]
16
+ extra_flags : [ -g ]
17
+
18
+ exclude :
19
+ - os : ubuntu-22.04
20
+ version : 13 # no package available
21
+ - os : ubuntu-22.04
22
+ version : 14 # no package available
23
+
17
24
include :
25
+ # --- LLVM flang coverage ---
26
+
27
+ - os : macos-13
28
+ compiler : flang
29
+ version : 20
30
+ - os : macos-14
31
+ compiler : flang
32
+ version : 20
33
+ - os : macos-15
34
+ compiler : flang
35
+ version : 20
36
+
37
+ # https://hub.docker.com/r/snowstep/llvm/tags
38
+ - os : ubuntu-24.04
39
+ compiler : flang
40
+ version : latest
41
+ container : snowstep/llvm:noble
42
+ - os : ubuntu-22.04
43
+ compiler : flang
44
+ version : latest
45
+ container : snowstep/llvm:jammy
46
+
18
47
# https://hub.docker.com/r/phhargrove/llvm-flang/tags
19
48
- os : ubuntu-24.04
20
49
compiler : flang
21
50
version : 20
22
- extra_flags : -g
23
51
container : phhargrove/llvm-flang:20.1.0-1
24
52
- os : ubuntu-24.04
25
53
compiler : flang
@@ -30,33 +58,28 @@ jobs:
30
58
# compiler: flang
31
59
# version: new
32
60
# container: gmao/llvm-flang:latest
33
- # extra_flags: -g
61
+
62
+ # --- Intel coverage ---
63
+
34
64
- os : ubuntu-24.04
35
65
compiler : ifx
36
66
version : 2025.1.0
37
67
error_stop_code : 128
38
- extra_flags : -g
39
68
container : intel/fortran-essentials:2025.1.0-0-devel-ubuntu24.04
40
69
# container: intel/oneapi-hpckit:2025.1.0-0-devel-ubuntu24.04
41
70
- os : ubuntu-22.04
42
71
compiler : ifx
43
72
version : 2025.0.0
44
73
error_stop_code : 128
45
- extra_flags : -g
46
74
container : intel/fortran-essentials:2025.0.0-0-devel-ubuntu22.04
47
75
48
- exclude :
49
- - os : ubuntu-22.04
50
- version : 13 # no package available
51
- - os : ubuntu-22.04
52
- version : 14 # no package available
53
-
54
76
container :
55
77
image : ${{ matrix.container }}
56
78
57
79
env :
58
- GCC_VERSION : ${{ matrix.version }}
80
+ COMPILER_VERSION : ${{ matrix.version }}
59
81
FC : ${{ matrix.compiler }}
82
+ FFLAGS : ${{ matrix.extra_flags }}
60
83
FPM_FLAGS : --profile release --verbose
61
84
62
85
steps :
68
91
run : |
69
92
sudo apt-get update
70
93
sudo apt list -a 'gfortran-*'
71
- sudo apt install -y gfortran-${GCC_VERSION} build-essential
72
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCC_VERSION} 100 \
73
- --slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${GCC_VERSION}
94
+ sudo apt install -y gfortran-${COMPILER_VERSION} build-essential
95
+ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${COMPILER_VERSION} 100 \
96
+ --slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${COMPILER_VERSION}
97
+
98
+
99
+ - name : Install Ubuntu Container Dependencies
100
+ if : ${{ contains(matrix.os, 'ubuntu') && matrix.container != '' && !contains(matrix.container, 'phhargrove') }}
101
+ run : |
102
+ set -x
103
+ apt update
104
+ apt install -y build-essential pkg-config make git curl
105
+
106
+ - name : Install macOS Dependencies
107
+ if : contains(matrix.os, 'macos') && matrix.compiler == 'flang'
108
+ run : |
109
+ set -x
110
+ brew update
111
+ brew install llvm@${COMPILER_VERSION} flang
112
+ # workaround issue #228: clang cannot find homebrew flang's C header
113
+ for p in /opt/homebrew /usr/local $(brew --prefix) ; do find $p/Cellar/flang -name ISO_Fortran_binding.h 2>/dev/null || true ; done
114
+ echo "CFLAGS=-I$(dirname $(find $(brew --prefix)/Cellar/flang -name ISO_Fortran_binding.h | head -1)) ${CFLAGS}" >> "$GITHUB_ENV"
115
+ # Prepend homebrew clang to PATH:
116
+ echo "PATH=$(brew --prefix)/opt/llvm/bin:${PATH}" >> "$GITHUB_ENV"
74
117
75
118
- name : Setup Compilers
76
119
run : |
80
123
elif test "$FC" = "ifx" ; then \
81
124
echo "FPM_FC=ifx" >> "$GITHUB_ENV" ; \
82
125
else \
83
- echo "FPM_FC=gfortran-${GCC_VERSION}" >> "$GITHUB_ENV" ; \
126
+ echo "FPM_FC=gfortran-${COMPILER_VERSION}" >> "$GITHUB_ENV" ; \
127
+ echo "FFLAGS=-ffree-line-length-0 $FFLAGS" >> "$GITHUB_ENV" ; \
84
128
fi
85
129
if test -n "${{ matrix.error_stop_code }}" ; then \
86
130
echo "ERROR_STOP_CODE=${{ matrix.error_stop_code }}" >> "$GITHUB_ENV" ; \
@@ -90,12 +134,14 @@ jobs:
90
134
91
135
- name : Setup FPM
92
136
uses : fortran-lang/setup-fpm@main
93
- if : ${{ matrix.os != 'macos-14 ' }}
137
+ if : ${{ !contains( matrix.os, 'macos') || matrix.os == 'macos-13 ' }}
94
138
with :
95
139
github-token : ${{ secrets.GITHUB_TOKEN }}
140
+ fpm-version : latest
96
141
97
142
- name : Build FPM
98
- if : ${{ matrix.os == 'macos-14' }} # no arm64 fpm distro, build from source
143
+ # no macos-arm64 fpm distro, build from source
144
+ if : ${{ contains(matrix.os, 'macos') && matrix.os != 'macos-13' }}
99
145
run : |
100
146
set -x
101
147
curl --retry 5 -LOsS https://github.com/fortran-lang/fpm/releases/download/v0.11.0/fpm-0.11.0.F90
@@ -115,22 +161,22 @@ jobs:
115
161
- name : Build and Test (Assertions OFF)
116
162
run : |
117
163
set -x
118
- fpm test ${FPM_FLAGS} --flag "${{ matrix.EXTRA_FLAGS }} "
119
- fpm run --example false-assertion ${FPM_FLAGS} --flag "${{ matrix.EXTRA_FLAGS }} "
120
- fpm run --example invoke-via-macro ${FPM_FLAGS} --flag "${{ matrix.EXTRA_FLAGS }} "
164
+ fpm test ${FPM_FLAGS} --flag "$FFLAGS "
165
+ fpm run --example false-assertion ${FPM_FLAGS} --flag "$FFLAGS "
166
+ fpm run --example invoke-via-macro ${FPM_FLAGS} --flag "$FFLAGS "
121
167
122
168
- name : Build and Test (Assertions ON)
123
169
env :
124
170
FPM_FLAGS : ${{ env.FPM_FLAGS }} --flag -DASSERTIONS
125
171
run : |
126
172
set -x
127
- fpm test ${FPM_FLAGS} --flag "${{ matrix.EXTRA_FLAGS }} "
128
- ( set +e ; fpm run --example false-assertion ${FPM_FLAGS} --flag "${{ matrix.EXTRA_FLAGS }} " ; test $? = $ERROR_STOP_CODE )
129
- ( set +e ; fpm run --example invoke-via-macro ${FPM_FLAGS} --flag "${{ matrix.EXTRA_FLAGS }} " ; test $? = $ERROR_STOP_CODE )
173
+ fpm test ${FPM_FLAGS} --flag "$FFLAGS "
174
+ ( set +e ; fpm run --example false-assertion ${FPM_FLAGS} --flag "$FFLAGS " ; test $? = $ERROR_STOP_CODE )
175
+ ( set +e ; fpm run --example invoke-via-macro ${FPM_FLAGS} --flag "$FFLAGS " ; test $? = $ERROR_STOP_CODE )
130
176
131
177
- name : Test Assertions w/ Parallel Callbacks
132
178
env :
133
179
FPM_FLAGS : ${{ env.FPM_FLAGS }} --flag -DASSERTIONS --flag -DASSERT_MULTI_IMAGE --flag -DASSERT_PARALLEL_CALLBACKS
134
180
run : |
135
181
set -x
136
- ( set +e ; fpm run --example false-assertion ${FPM_FLAGS} --flag "${{ matrix.EXTRA_FLAGS }} " ; test $? = $ERROR_STOP_CODE )
182
+ ( set +e ; fpm run --example false-assertion ${FPM_FLAGS} --flag "$FFLAGS " ; test $? = $ERROR_STOP_CODE )
0 commit comments