-
Notifications
You must be signed in to change notification settings - Fork 13
115 lines (96 loc) · 3.01 KB
/
clang-compile-tests.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
name: compile code and tests
on:
push:
branches: [ main, develop, issue103_CI ]
pull_request:
branches: [ main, develop, issue103_CI ]
jobs:
clang-on-mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: clang
run: |
brew extract --version=13.0.1 clang-format homebrew/cask-versions
brew install clang-format@13.0.1
cd core/src
clang-format --dry-run -Werror *cpp include/*hpp
cd -
for component in physics
do
cd $component/src
clang-format --dry-run -Werror *cpp include/*hpp
cd -
done
build-and-tests-on-ubuntu:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: installs
run: |
sudo apt update -y
sudo apt install netcdf-bin libnetcdff-dev libnetcdf-c++4-dev libboost-all-dev libeigen3-dev cmake libhdf5-dev
svn checkout http://forge.ipsl.jussieu.fr/ioserver/svn/XIOS/trunk xios
cp .github/xios_arch/ubuntu.arch xios/arch/arch-GCC_LINUX.path
cp .github/xios_arch/ubuntu.env xios/arch/arch-GCC_LINUX.env
(cd xios && ./make_xios --arch GCC_LINUX --netcdf_lib netcdf4_seq)
- name: make
run: |
cmake -Bbuild -Dxios_DIR="$(pwd)/xios" -DCMAKE_CXX_COMPILER="$(which mpic++)"
cd build
make
- name: run tests
run: |
export XIOS_IODEF_PATH="$(pwd)/../run/iodef.xml"
for component in core physics
do
cd $component/test
for file in $(find test* -maxdepth 0 -type f); do ./$file; done
cd -
done
build-and-tests-on-mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: installs
run: |
brew install netcdf
brew install netcdf-cxx
brew install boost
brew install eigen
brew install cmake
brew install open-mpi
brew install subversion
svn checkout http://forge.ipsl.jussieu.fr/ioserver/svn/XIOS/trunk xios
cp .github/xios_arch/ubuntu.arch xios/arch/arch-GCC_LINUX.path
cp .github/xios_arch/ubuntu.env xios/arch/arch-GCC_LINUX.env
(cd xios && ./make_xios --arch GCC_LINUX --netcdf_lib netcdf4_seq)
- name: make
run: |
cmake -Bbuild -Dxios_DIR="$(pwd)/xios" -DCMAKE_CXX_COMPILER="$(which mpic++)"
cd build
make
- name: run tests
run: |
export XIOS_IODEF_PATH="$(pwd)/../run/iodef.xml"
for component in core physics
do
cd $component/test
for file in $(find test* -maxdepth 0 -type f); do ./$file; done
cd -
done
- name: make
run: |
cmake .
make
- name: run tests
run: |
cd core/test
for file in $(find test* -maxdepth 0 -type f); do ./$file; done
cd -
for component in physics
do
cd $component/test
for file in $(find test* -maxdepth 0 -type f); do ./$file; done
cd -
done