-
Notifications
You must be signed in to change notification settings - Fork 32
231 lines (213 loc) · 8.58 KB
/
main.yml
File metadata and controls
231 lines (213 loc) · 8.58 KB
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
# Test Combinations of Ubuntu/MacOSX, MPICH/OpenMPI, and UFS/Lustre
name: CI - OS and MPI
permissions:
contents: read
on:
push:
branches: [ master ]
paths-ignore:
- '**/*.md'
- '**/*.txt'
- '**/*.1'
- '**/*.jpg'
- '**/*.png'
- 'docs/*'
- 'test/test_installed/*'
pull_request:
branches: [ master ]
paths-ignore:
- '**/*.md'
- '**/*.txt'
- '**/*.1'
- '**/*.jpg'
- '**/*.png'
- 'docs/*'
- 'test/test_installed/*'
env:
LIBTOOL_VERSION: 2.5.4
MPICH_LATEST: 4.3.2
OPENMPI_LATEST: 5.0.9
jobs:
build:
strategy:
fail-fast: false # This disables the default cancel-on-failure behavior
matrix:
os: [ubuntu-latest, macos-latest]
mpi_vendor: [ MPICH, OpenMPI ]
fstype: [ ufs, mimic_lustre ]
debug_mode: [ debug, nodebug ]
runs-on: ${{ matrix.os }}
timeout-minutes: 120
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4
- name: Install autotools
run: |
set -x
if test ${{ matrix.os }} == ubuntu-latest ; then
sudo apt-get update
sudo apt-get install autoconf
sudo apt-get install automake
sudo apt-get install m4
# sudo apt-get install libtool libtool-bin
wget -q https://ftp.gnu.org/gnu/libtool/libtool-${LIBTOOL_VERSION}.tar.gz
gzip -dc libtool-${LIBTOOL_VERSION}.tar.gz | tar -xf -
cd libtool-${LIBTOOL_VERSION}
./configure --prefix=/usr --silent
sudo make -s LIBTOOLFLAGS=--silent V=1 -j 8 install > qout 2>&1
sudo make -s LIBTOOLFLAGS=--silent V=1 -j 8 distclean >> qout 2>&1
else
brew update
brew install coreutils
brew install autoconf
brew install automake
brew install libtool
export PATH="/opt/homebrew/opt/libtool/libexec/gnubin:${PATH}"
brew list m4 || brew install m4
fi
which autoconf
autoconf --version
which automake
automake --version
which libtool
libtool --version
which m4
m4 --version
- name: Install MPI compiler vendor - ${{ matrix.mpi_vendor }}
run: |
set -x
if test "${{ matrix.os }}" = "macos-latest" ; then
# Must reinstall gcc to get gfortran installed
brew reinstall gcc
which gcc
gcc --version
which gfortran
gfortran --version
fi
if test "${{ matrix.mpi_vendor }}" = "MPICH" ; then
# MPICH versions older than 4.2.2 do not support the MPI large
# count feature.
echo "Install MPICH ${MPICH_LATEST} in ${GITHUB_WORKSPACE}/MPI"
wget -q https://www.mpich.org/static/downloads/${MPICH_LATEST}/mpich-${MPICH_LATEST}.tar.gz
gzip -dc mpich-${MPICH_LATEST}.tar.gz | tar -xf -
cd mpich-${MPICH_LATEST}
./configure --prefix=${GITHUB_WORKSPACE}/MPI \
--silent \
--enable-romio \
--with-file-system=ufs \
--with-device=ch3:sock \
--enable-fortran \
CC=gcc FC=gfortran \
FFLAGS=-fallow-argument-mismatch \
FCFLAGS=-fallow-argument-mismatch
make -s LIBTOOLFLAGS=--silent V=1 -j 8 install > qout 2>&1
make -s LIBTOOLFLAGS=--silent V=1 -j 8 distclean >> qout 2>&1
else # OpenMPI
echo "Install OPENMPI ${OPENMPI_LATEST} in ${GITHUB_WORKSPACE}/MPI"
VER_MAJOR=${OPENMPI_LATEST%.*}
wget -q https://download.open-mpi.org/release/open-mpi/v${VER_MAJOR}/openmpi-${OPENMPI_LATEST}.tar.gz
gzip -dc openmpi-${OPENMPI_LATEST}.tar.gz | tar -xf -
cd openmpi-${OPENMPI_LATEST}
if test "${{ matrix.os }}" = "macos-latest" ; then
# When built on MacOS, additional configure options are required.
EXTRA_OPTS="--with-hwloc=internal --with-pmix=internal --with-libevent=internal"
fi
./configure --prefix=${GITHUB_WORKSPACE}/MPI \
--silent \
--with-io-romio-flags="--with-file-system=ufs" \
${EXTRA_OPTS} \
CC=gcc \
FC=gfortran \
FCFLAGS=-fallow-argument-mismatch
make -s LIBTOOLFLAGS=--silent V=1 -j 8 install > qout 2>&1
make -s LIBTOOLFLAGS=--silent V=1 -j 8 distclean >> qout 2>&1
fi
- name: Clean up git untracked files
run: |
git clean -fx
- name: Build PnetCDF - ${{ matrix.fstype }}
run: |
set -x
cd ${GITHUB_WORKSPACE}
if test ${{ matrix.os }} == macos-latest ; then
export PATH="/opt/homebrew/opt/libtool/libexec/gnubin:${PATH}"
fi
which autoconf
autoconf --version
which automake
automake --version
which libtool
libtool --version
which m4
m4 --version
autoreconf -i
mkdir -p ${GITHUB_WORKSPACE}/pnetcdf_output
if test ${{ matrix.fstype }} == mimic_lustre ; then
export MIMIC_LUSTRE=yes
fi
if test ${{ matrix.debug_mode }} == debug ; then
CONFIG_OPTS="--enable-debug"
else
CONFIG_OPTS="--disable-debug"
fi
./configure --prefix=${GITHUB_WORKSPACE}/PnetCDF \
--enable-option-checking=fatal \
pnc_ac_debug=yes \
--enable-burst_buffering \
--enable-subfiling \
--enable-thread-safe \
--with-pthread \
${CONFIG_OPTS} \
--with-mpi=${GITHUB_WORKSPACE}/MPI \
TESTOUTDIR=${GITHUB_WORKSPACE}/pnetcdf_output
make -s LIBTOOLFLAGS=--silent V=1 -j 8 tests
- name: Print config.log
if: ${{ always() }}
run: |
cat ${GITHUB_WORKSPACE}/config.log
- name: make check
run: |
cd ${GITHUB_WORKSPACE}
make -s LIBTOOLFLAGS=--silent V=1 check
- name: Print test log files
if: ${{ always() }}
run: |
cd ${GITHUB_WORKSPACE}
fname=`find src test examples benchmarks -type f -name "*.log"`
for f in $fname ; do \
bname=`basename $f` ; \
if test "x$bname" != xconfig.log ; then \
echo "-------- dump $f ----------------------------" ; \
cat $f ; \
fi ; \
done
- name: make ptests
run: |
cd ${GITHUB_WORKSPACE}
if test "${{ matrix.mpi_vendor }}" = "OpenMPI" ; then
# OpenMPI hacks when running in parallel on MacOS
export OMPI_MCA_btl_tcp_if_include=lo0
export TMPDIR=${RUNNER_TEMP}
fi
make -s LIBTOOLFLAGS=--silent V=1 ptests
- name: make distcheck
run: |
cd ${GITHUB_WORKSPACE}
make -j 8 distcheck DISTCHECK_CONFIGURE_FLAGS="--silent --with-mpi=${GITHUB_WORKSPACE}/MPI"
- name: make install
run: |
set -x
cd ${GITHUB_WORKSPACE}
prefix_path=${GITHUB_WORKSPACE}/pnetcdf_install
echo "---- test make install prefix=${prefix_path}"
make -s LIBTOOLFLAGS=--silent V=1 install prefix=${prefix_path}
test/tst_install.sh ${prefix_path}
prefix_path="/pnetcdf_install"
destdir_path=${GITHUB_WORKSPACE}/inst
echo "---- test make install prefix=${prefix_path} DESTDIR=${destdir_path}"
make -s LIBTOOLFLAGS=--silent V=1 install prefix=${prefix_path} DESTDIR=${destdir_path}
test/tst_install.sh ${prefix_path} ${destdir_path}
- name: Cleanup
if: ${{ always() }}
run: |
cd ${GITHUB_WORKSPACE}
make -s LIBTOOLFLAGS=--silent V=1 distclean