-
Notifications
You must be signed in to change notification settings - Fork 36
70 lines (62 loc) · 2.2 KB
/
build_macOS.yaml
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
name: Build macOS
on:
pull_request:
workflow_dispatch:
jobs:
build:
env:
VERBOSE: 1
runs-on: macos-10.15
strategy:
matrix:
mpi: ['mpich']
compiler: ['clang', 'gcc']
steps:
- name: Update brew packages
run: |
brew update
brew install [email protected]
brew upgrade [email protected]
pip3 install setuptools
pip3 install numpy
pip3 install netCDF4
ssl_ver=$(brew list --formula [email protected] --versions | cut -d " " -f2)
sudo ln -s /usr/local/Cellar/[email protected]/$ssl_ver/lib/libssl.1.1.dylib /usr/local/lib/libssl.dylib
sudo ln -s /usr/local/Cellar/[email protected]/$ssl_ver/lib/libcrypto.1.1.dylib /usr/local/lib/libcrypto.dylib
- name: Get sources
uses: actions/checkout@v3
with:
path: ${{ matrix.compiler }}-${{ matrix.mpi }}
- name: Build
run: |
cd ${{ matrix.compiler }}-${{ matrix.mpi }}
prefix=$GITHUB_WORKSPACE/install-${{ matrix.compiler }}-${{ matrix.mpi }}
if [[ ${{ matrix.compiler }} == "gcc" ]]; then
export CC=/usr/local/bin/gcc-9
export CXX=/usr/local/bin/g++-9
export FC=/usr/local/bin/gfortran-9
elif [[ ${{ matrix.compiler }} == "clang" ]]; then
export CC=clang
export CXX=clang++
export FC=/usr/local/bin/gfortran-9
fi
export SERIAL_CC=${CC}
export SERIAL_CXX=${CXX}
export SERIAL_FC=${FC}
gcc_ver=$( ${CC} -dumpfullversion -dumpversion )
python_ver=$( python3 --version | cut -d " " -f2 | cut -d. -f1-2 )
export HPC_COMPILER="${{ matrix.compiler }}/${gcc_ver}"
export HPC_MPI="${{ matrix.mpi }}/${mpi_ver}"
export HPC_PYTHON="python/${python_ver}"
./build_stack.sh -p $prefix -c config/config_mac.sh -y stack/stack_mac.yaml
- name: Upload logs
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.compiler }}-${{ matrix.mpi }}-log
path: ${{ matrix.compiler }}-${{ matrix.mpi }}/log
- name: Clean disk space of downloaded packages
if: ${{ success() }}
run: |
cd ${{ matrix.compiler }}-${{ matrix.mpi }}
rm -rf pkg