-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (77 loc) · 2.45 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
name: Build|Test|Run
on: [push, pull_request]
jobs:
linux-gcc-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
submodules: 'recursive'
- name: Build Kokkos with OpenMP
shell: bash
run: |
cd 3rdparty/kokkos
mkdir build
cd build
cmake .. \
-DCMAKE_CXX_COMPILER=g++ \
-DCMAKE_C_COMPILER=gcc \
-DKokkos_ENABLE_OPENMP=ON
make -j4
cd ../../..
- name: Build FDTD with GCC
shell: bash
run: |
export CMAKE_BUILD_PARALLEL_LEVEL=4
mkdir build
cmake \
-DCMAKE_C_COMPILER=gcc \
-DCMAKE_CXX_COMPILER=g++ \
-B ${PWD}/build
cmake --build ${PWD}/build --config Release
find ${PWD}/build -name test_FDTD_method
- name: Run tests with GCC
shell: bash
run: |
${PWD}/build/test/test_FDTD_method --gtest_repeat=2 --gtest_break_on_failure
- name: Run kokkos_sample
shell: bash
run: |
find ${PWD}/build -name kokkos_sample
${PWD}/build/PlotScript/src/Release/kokkos_sample
- name: Run sample
shell: bash
run: |
${PWD}/build/PlotScript/src/Release/sample
linux-gcc-build-gpu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
submodules: 'recursive'
- name: Build Kokkos with OpenMP
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y nvidia-cuda-toolkit
sudo apt-get install -y g++-10
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 100
echo 'export PATH=/usr/local/cuda/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
cd 3rdparty/kokkos
mkdir build
cd build
cmake .. \
-DCMAKE_CXX_COMPILER=${PWD}/../bin/nvcc_wrapper \
-DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc \
-DCMAKE_CUDA_HOST_COMPILER=/usr/bin/g++-10 \
-DKokkos_ENABLE_CUDA=ON \
-DKokkos_ARCH_AMPERE80=ON \
-DCMAKE_CXX_STANDARD=17
make -j4
cd ../../..
- name: Run kokkos_sample
shell: bash
run: |
find ${PWD}/build -name kokkos_sample
${PWD}/build/PlotScript/src/Release/kokkos_sample