-
Notifications
You must be signed in to change notification settings - Fork 74
162 lines (160 loc) · 4.75 KB
/
main.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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
name: Build application
on: [push, pull_request]
jobs:
ubuntu-gcc-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup environment
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-12 g++-12
sudo apt-get install cppcheck ninja-build
sudo apt-get install mpich libmpich* mpi* openmpi-bin
sudo apt-get install libomp-dev
sudo apt-get install valgrind
- name: Update submodules
run: git submodule update --init --recursive
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ github.job }}
create-symlink: true
- name: CMake configure
run: |
mkdir build
cd build
cmake -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache -G Ninja -D USE_SEQ=ON -D USE_MPI=ON -D USE_OMP=ON -D USE_TBB=ON -D USE_STD=ON -D CMAKE_BUILD_TYPE=RELEASE ..
cd ..
env:
CC: gcc-12
CXX: g++-12
- name: Ninja build
run: |
cd build
ninja
cd ..
env:
CC: gcc-12
CXX: g++-12
- name: Run tests
run: |
export OMP_NUM_THREADS=4
source scripts/run.sh
ubuntu-clang-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup environment
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install clang-15
sudo apt-get install cppcheck ninja-build
sudo apt-get install mpich libmpich* mpi* openmpi-bin
sudo apt-get install libomp-15-dev
sudo apt-get install python3-pip
sudo apt-get install valgrind
- name: Update submodules
run: git submodule update --init --recursive
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ github.job }}
create-symlink: true
- name: CMake configure
run: |
mkdir build
cd build
cmake -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache -G Ninja -D USE_SEQ=ON -D USE_MPI=ON -D USE_OMP=ON -D USE_TBB=ON -D USE_STD=ON -D CMAKE_BUILD_TYPE=RELEASE ..
cd ..
env:
CC: clang-15
CXX: clang++-15
- name: Ninja build
run: |
cd build
ninja
cd ..
env:
CC: clang-15
CXX: clang++-15
- name: Run tests
run: |
export OMP_NUM_THREADS=4
source scripts/run.sh
macos-clang-build:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v1
- name: Setup environment
run: |
brew update-reset
brew install cppcheck ninja mpich llvm
brew install libomp
brew link libomp --overwrite --force
brew install openssl
brew link openssl --overwrite --force
- name: Update submodules
run: git submodule update --init --recursive
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ github.job }}
create-symlink: true
- name: CMake configure
run: |
mkdir build
cd build
cmake -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache -G Ninja -D USE_SEQ=ON -D USE_MPI=OFF -D USE_OMP=ON -D USE_TBB=ON -D USE_STD=ON -D CMAKE_BUILD_TYPE=RELEASE \
-DCMAKE_C_FLAGS="-I$(brew --prefix)/opt/libomp/include" \
-DCMAKE_CXX_FLAGS="-I$(brew --prefix)/opt/libomp/include" ..
- name: Ninja build
run: |
cd build
ninja
cd ..
- name: Run tests
run: |
export OMP_NUM_THREADS=4
source scripts/run.sh
windows-msvc-build:
runs-on: windows-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v1
- name: Add msbuild to PATH
uses: microsoft/[email protected]
- name: Setup MPI
uses: mpi4py/setup-mpi@v1
with:
mpi: msmpi
- name: Download dependencies
run: |
choco install openssl
- name: Update submodules
run: git submodule update --init --recursive
- name: Setup ccache
uses: Chocobo1/setup-ccache-action@v1
with:
windows_compile_environment: msvc
- name: CMake configure
shell: bash
run: |
mkdir build
cd build
cmake -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache -D USE_SEQ=ON -D USE_MPI=ON -D USE_OMP=ON -D USE_TBB=OFF -D USE_STD=ON -D CMAKE_BUILD_TYPE=RELEASE ..
cd ..
- name: MSBuild
shell: bash
run: |
cd build
cmake --build . --config Release --parallel
cd ..
- name: Run tests
run: |
set OMP_NUM_THREADS=4
scripts/run.bat