-
Notifications
You must be signed in to change notification settings - Fork 53
108 lines (98 loc) · 3.81 KB
/
netcdf_hdf5_no_pnetcdf_ncint_mpich.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
name: netcdf_hdf5_no_pnetcdf_ncint_mpich
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
env:
CPPFLAGS: "-I${GITHUB_WORKSPACE}/mpich/include"
LDFLAGS: "-L${GITHUB_WORKSPACE}/mpich/lib "
# Note issue https://github.com/NCAR/ParallelIO/issues/1889 netcdf integration currently only works with netcdf 4.7.4
NETCDF_C_VERSION: v4.9.2
NETCDF_FORTRAN_VERSION: v4.6.1
MPICH_VERSION: v4.1.2
HDF5_VERSION: hdf5_1_12_2
FFLAGS: "-fallow-argument-mismatch"
FCFLAGS: "-fallow-argument-mismatch"
steps:
- uses: actions/checkout@v3
- name: Installs
run: |
sudo apt-get install doxygen graphviz wget gfortran libjpeg-dev libz-dev libcurl4-gnutls-dev
- name: cache-mpich
id: cache-mpich
uses: actions/cache@v3
with:
path: ~/work/ParallelIO/ParallelIO/mpich
key: mpich-${{ runner.os }}-${{ env.MPICH_VERSION }}
- name: build-mpich
if: steps.cache-mpich.outputs.cache-hit != 'true'
uses: ./.github/actions/buildmpich
with:
install_prefix: ${GITHUB_WORKSPACE}/mpich
mpich_version: ${{ env.MPICH_VERSION }}
- name: cache-hdf5
id: cache-hdf5
uses: actions/cache@v3
with:
path: ~/work/ParallelIO/ParallelIO/hdf5
key: hdf5-${{ runner.os }}-${{ env.HDF5_VERSION }}-mpich-${{ env.MPICH_VERSION }}
- name: build-hdf5
if: steps.cache-hdf5.outputs.cache-hit != 'true'
uses: ./.github/actions/buildhdf5
with:
install_prefix: $GITHUB_WORKSPACE/hdf5
enable_parallel: True
hdf5_version: ${{ env.HDF5_VERSION }}
mpi_path: $GITHUB_WORKSPACE/mpich
- name: cache-netcdf
id: cache-netcdf
uses: actions/cache@v3
with:
path: ~/work/ParallelIO/ParallelIO/netcdf
key: netcdf-${{ runner.os }}-${{ env.NETCDF_C_VERSION }}-${{ env.NETCDF_FORTRAN_VERSION }}-mpich-${{ env.MPICH_VERSION }}-hdf5-${{ env.HDF5_VERSION }}
- name: Prep Netcdf
run: |
export CC=mpicc
export FC=mpifort
export PATH="${GITHUB_WORKSPACE}/hdf5/bin:${GITHUB_WORKSPACE}/mpich/bin:${GITHUB_WORKSPACE}/netcdf/bin:$PATH"
export CPPFLAGS="$CPPFLAGS -I${GITHUB_WORKSPACE}/hdf5/include -I${GITHUB_WORKSPACE}/netcdf/include"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${GITHUB_WORKSPACE}/hdf5/lib:/usr/lib/x86_64-linux-gnu/"
export LDFLAGS="$LDFLAGS -L${GITHUB_WORKSPACE}/hdf5/lib -L${GITHUB_WORKSPACE}/netcdf/lib -L/usr/lib/x86_64-linux-gnu/ -lcurl"
printenv >> $GITHUB_ENV
- name: Build NetCDF C
if: steps.cache-netcdf.outputs.cache-hit != 'true'
uses: ./.github/actions/buildnetcdf
with:
netcdf_version: ${{ env.NETCDF_C_VERSION }}
install_prefix: ${GITHUB_WORKSPACE}/netcdf
- name: cache-netcdf-fortran
id: cache-netcdf-fortran
uses: actions/cache@v3
with:
path: ~/netcdf-fortran
key: netcdf-fortran-${{ runner.os }}-${{ env.NETCDF_FORTRAN_VERSION }}-mpich-${{ env.MPICH_VERSION }}-hdf5-${{ env.HDF5_VERSION }}
- name: Build NetCDF Fortran
if: steps.cache-netcdf.outputs.cache-hit != 'true'
uses: ./.github/actions/buildnetcdff
with:
netcdf_fortran_version: ${{ env.NETCDF_FORTRAN_VERSION }}
install_prefix: ${GITHUB_WORKSPACE}/netcdf
netcdf_c_path: ${GITHUB_WORKSPACE}/netcdf
- name: Build ParallelIO with autotools
uses: ./.github/actions/parallelio_autotools
with:
enable_fortran: True
enable_netcdf_integration: True
src_path: ${GITHUB_WORKSPACE}
parallelio_version: ${{ env.GITHUB_SHA }}
- name: make check
run: |
cd $GITHUB_WORKSPACE
make -j check
# - name: Setup tmate session
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3