Skip to content

Commit db1d5cb

Browse files
committed
CI: Add more flang coverage
1 parent 699b0ac commit db1d5cb

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/build.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,28 @@ jobs:
2222
version: 14 # no package available
2323

2424
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+
2547
# https://hub.docker.com/r/phhargrove/llvm-flang/tags
2648
- os: ubuntu-24.04
2749
compiler: flang
@@ -36,6 +58,9 @@ jobs:
3658
# compiler: flang
3759
# version: new
3860
# container: gmao/llvm-flang:latest
61+
62+
# --- Intel coverage ---
63+
3964
- os: ubuntu-24.04
4065
compiler: ifx
4166
version: 2025.1.0
@@ -70,6 +95,26 @@ jobs:
7095
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${COMPILER_VERSION} 100 \
7196
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${COMPILER_VERSION}
7297
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"
117+
73118
- name: Setup Compilers
74119
run: |
75120
set -x

0 commit comments

Comments
 (0)