-
Notifications
You must be signed in to change notification settings - Fork 2
140 lines (106 loc) · 3.74 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
env:
BUILD_DIR_PREFIX: _build
jobs:
gnu-openmpi:
runs-on: ubuntu-latest
steps:
- name: Check-out code
uses: actions/checkout@v4
- name: Setup GNU compiler
uses: fortran-lang/setup-fortran@v1
with:
compiler: gcc
version: 13
- name: Setup OpenMPI
run: |
sudo apt-get update
sudo apt-get install -y openmpi-common openmpi-bin libopenmpi-dev
- name: Setup GNU/OpenMPI environment
run: |
echo "FC=${{ env.FC }}" >> ${GITHUB_ENV}
echo "FPM_FC=${{ env.FC }}" >> ${GITHUB_ENV}
- name: Setup build tools
run: |
pip install cookiecutter cmake meson ninja fpm
- name: Test CMake serial
run: |
./test/runners/test.cmake-serial.sh ${BUILD_DIR_PREFIX}_cmake_serial
# # CMake can not detect OpenMPI on Ubuntu 22.04 due to broken CMake export file
# - name: Test CMake MPI
# run: |
# ./test/runners/test.cmake-mpi.sh ${BUILD_DIR_PREFIX}_cmake_mpi
- name: Test Fpm serial
run: |
./test/runners/test.fpm-serial.sh ${BUILD_DIR_PREFIX}_fpm_serial
- name: Test Fpm MPI
run: |
./test/runners/test.fpm-mpi.sh ${BUILD_DIR_PREFIX}_fpm_mpi
- name: Test Meson serial
run: |
./test/runners/test.meson-serial.sh ${BUILD_DIR_PREFIX}_meson_serial
- name: Test Meson MPI
run: |
./test/runners/test.meson-serial.sh ${BUILD_DIR_PREFIX}_meson_mpi
intel-impi:
runs-on: ubuntu-latest
steps:
- name: Check-out code
uses: actions/checkout@v4
- name: Setup Intel/IntelMPI toolchain
uses: rscohn2/setup-oneapi@v0
with:
components: |
ifx
impi
- name: Setup Intel/IntelMPI environment
run: |
source /opt/intel/oneapi/setvars.sh
printenv >> ${GITHUB_ENV}
echo "FC=ifx" >> ${GITHUB_ENV}
echo "FPM_FC=ifx" >> ${GITHUB_ENV}
- name: Setup build tools
run: |
pip install cookiecutter cmake meson ninja fpm
- name: Test CMake serial
run: |
./test/runners/test.cmake-serial.sh ${BUILD_DIR_PREFIX}_cmake_serial
- name: Test CMake MPI
run: |
./test/runners/test.cmake-mpi.sh ${BUILD_DIR_PREFIX}_cmake_mpi
- name: Test CMake coarray
run: >
FFLAGS_COARRAY="-coarray"
LDFLAGS_COARRAY="-coarray"
./test/runners/test.cmake-coarray.sh ${BUILD_DIR_PREFIX}_cmake_coarray
- name: Test Fpm serial
run: |
./test/runners/test.fpm-serial.sh ${BUILD_DIR_PREFIX}_fpm_serial
- name: Test Fpm MPI
# Workaround for IntelMPI: FPM uses compiler flags (-standard-semantics) which makes
# compiled binary incompatible with IntelMPI. Overriding with some dummy flags.
run: |
FPM_FFLAGS="-stand f18" ./test/runners/test.fpm-mpi.sh ${BUILD_DIR_PREFIX}_fpm_mpi
- name: Test Fpm coarray
run: >
FPM_FFLAGS="-coarray"
FPM_LDFLAGS="-coarray"
./test/runners/test.fpm-coarray.sh ${BUILD_DIR_PREFIX}_fpm_coarray
- name: Test Meson serial
run: |
./test/runners/test.meson-serial.sh ${BUILD_DIR_PREFIX}_meson_serial
# # Meson can not detect IntelMPI properly
# - name: Test Meson MPI
# run: |
# ./test/runners/test.meson-mpi.sh ${BUILD_DIR_PREFIX}_meson_mpi
- name: Test Meson coarray
run: >
FFLAGS_COARRAY="-coarray"
LDFLAGS_COARRAY="-coarray"
./test/runners/test.meson-coarray.sh ${BUILD_DIR_PREFIX}_meson_coarray