forked from AMReX-Codes/amrex
-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (84 loc) · 3.67 KB
/
clang.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
# -Wno-c++17-extensions: Clang complains about nodiscard if the standard is not set to c++17.
name: Linux Clang
on: [push, pull_request]
concurrency:
group: ${{ github.ref }}-${{ github.head_ref }}-linux-clang
cancel-in-progress: true
jobs:
# Build and install libamrex as AMReX CMake project
# Note: this is an intentional "minimal" build that does not enable (many) options
library_clang:
name: [email protected] C++14 SP NOMPI Debug [lib]
runs-on: ubuntu-18.04
env: {CXXFLAGS: "-fno-operator-names -Werror -Wall -Wextra -Wpedantic -Wnull-dereference -Wfloat-conversion -Wshadow -Woverloaded-virtual -Wextra-semi -Wunreachable-code -Wno-c++17-extensions"}
steps:
- uses: actions/checkout@v2
- name: Dependencies
run: .github/workflows/dependencies/dependencies_clang6.sh
- name: Build & Install
run: |
mkdir build
cd build
cmake .. \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_INSTALL_PREFIX=/tmp/my-amrex \
-DAMReX_EB=ON \
-DAMReX_FORTRAN=ON \
-DAMReX_MPI=OFF \
-DAMReX_PARTICLES=ON \
-DAMReX_PLOTFILE_TOOLS=ON \
-DAMReX_PRECISION=SINGLE \
-DAMReX_PARTICLES_PRECISION=SINGLE \
-DCMAKE_CXX_STANDARD=14 \
-DCMAKE_C_COMPILER=$(which clang) \
-DCMAKE_CXX_COMPILER=$(which clang++) \
-DCMAKE_Fortran_COMPILER=$(which gfortran)
make -j 2
make install
make test_install
export PATH=/tmp/my-amrex/bin:$PATH
which fcompare
ctest --output-on-failure
tests_clang:
name: [email protected] C++14 SP Particles DP Mesh Debug [tests]
runs-on: ubuntu-18.04
env: {CXXFLAGS: "-fno-operator-names -Werror -Wall -Wextra -Wpedantic -Wnull-dereference -Wfloat-conversion -Wshadow -Woverloaded-virtual -Wextra-semi -Wunreachable-code -Wno-c++17-extensions -O1"}
# It's too slow with -O0
steps:
- uses: actions/checkout@v2
- name: Dependencies
run: .github/workflows/dependencies/dependencies_clang6.sh
- name: Build & Install
run: |
mkdir build
cd build
cmake .. \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DAMReX_EB=ON \
-DAMReX_ENABLE_TESTS=ON \
-DAMReX_FORTRAN=ON \
-DAMReX_MPI=OFF \
-DAMReX_PARTICLES=ON \
-DAMReX_PRECISION=DOUBLE \
-DAMReX_PARTICLES_PRECISION=SINGLE \
-DCMAKE_CXX_STANDARD=14 \
-DCMAKE_C_COMPILER=$(which clang) \
-DCMAKE_CXX_COMPILER=$(which clang++) \
-DCMAKE_Fortran_COMPILER=$(which gfortran)
make -j 2
ctest --output-on-failure -E GhostsAndVirtuals
# Build 2D libamrex with configure
configure-2d:
name: [email protected] NOMPI Release [configure 2D]
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Dependencies
run: .github/workflows/dependencies/dependencies_clang6.sh
- name: Build & Install
run: |
./configure --dim 2 --with-fortran no --comp llvm --with-mpi no
make -j2 WARN_ALL=TRUE WARN_ERROR=TRUE XTRA_CXXFLAGS="-fno-operator-names -Wno-c++17-extensions"
make install