-
Notifications
You must be signed in to change notification settings - Fork 19
150 lines (137 loc) · 5.17 KB
/
ubuntu.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
name: 🐧 Ubuntu
on: [push, pull_request]
concurrency:
group: ${{ github.ref }}-${{ github.head_ref }}-linux
cancel-in-progress: true
jobs:
# Build and install libamrex as AMReX CMake project
gcc7:
name: [email protected]
runs-on: ubuntu-20.04
env:
CC: gcc-7
CXX: g++-7
CXXFLAGS: "-Werror -Wshadow -Woverloaded-virtual -Wunreachable-code -fno-operator-names -Wno-array-bounds"
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.9'
- name: Dependencies
run: .github/workflows/dependencies/gcc7.sh
- name: Build & Install
run: |
python3 -m pip install -U pip setuptools wheel pytest
AMREX_MPI=ON python3 -m pip install -v .
python3 -c "import amrex.space1d as amr; print(amr.__version__)"
python3 -c "import amrex.space2d as amr; print(amr.__version__)"
python3 -c "import amrex.space3d as amr; print(amr.__version__)"
- name: Unit tests
run: |
mpiexec -np 1 python3 -m pytest tests/
gcc10:
name: [email protected]
runs-on: ubuntu-22.04
env: {CXXFLAGS: "-Werror -Wno-error=deprecated-declarations -Wshadow -Woverloaded-virtual -Wunreachable-code -fno-operator-names"}
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v3
- name: Dependencies
run: .github/workflows/dependencies/dependencies_gcc10.sh
- name: Build & Install
run: |
export CC=$(which gcc-10)
export CXX=$(which g++-10)
python3 -m pip install -U pip setuptools wheel
python3 -m pip install -U cmake
python3 -m pip install -U pytest mpi4py
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DBUILD_SHARED_LIBS=ON \
-DAMReX_MPI=ON \
-DAMReX_SPACEDIM="1;2;3"
cmake --build build --target pip_install -j 2
- name: Unit tests
run: |
ctest --test-dir build --output-on-failure
- name: Unit tests as installed
run: |
sudo cp build/lib/libamrex_*.so /usr/lib/
rm -rf build
python3 -m pytest tests
clang6:
name: [email protected] w/o MPI
runs-on: ubuntu-20.04
env: {CXXFLAGS: "-Werror -Wshadow -Woverloaded-virtual -Wextra-semi -Wunreachable-code -fno-operator-names -Wno-pass-failed"}
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v3
- name: Dependencies
run: .github/workflows/dependencies/dependencies_clang6.sh
- name: Build & Install
run: |
export CC=$(which clang-6.0)
export CXX=$(which clang++-6.0)
python3 -m pip install -U pip pytest
python3 -m pip install -v .
python3 -c "import amrex.space1d as amr; print(amr.__version__)"
python3 -c "import amrex.space2d as amr; print(amr.__version__)"
python3 -c "import amrex.space3d as amr; print(amr.__version__)"
- name: Unit tests
run: |
python3 -m pytest tests/
clang14:
name: [email protected] w/ libc++ w/ MPI
runs-on: ubuntu-22.04
env:
CXXFLAGS: "-Werror -Wshadow -Woverloaded-virtual -Wextra-semi -Wunreachable-code -fno-operator-names -Wno-pass-failed -stdlib=libc++"
LDFLAGS: "-fuse-ld=lld"
CXX: "clang++"
CC: "clang"
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v3
- name: Dependencies
run: .github/workflows/dependencies/dependencies_clang14_libcpp.sh
- name: Build & Install
run: |
python3 -m pip install -U pip pytest
python3 -m pip install -v .
python3 -c "import amrex.space1d as amr; print(amr.__version__)"
python3 -c "import amrex.space2d as amr; print(amr.__version__)"
python3 -c "import amrex.space3d as amr; print(amr.__version__)"
- name: Unit tests
run: |
python3 -m pytest tests/
nvcc11:
runs-on: ubuntu-20.04
env: {CXXFLAGS: "-fno-operator-names"}
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v3
- name: Dependencies
run: .github/workflows/dependencies/dependencies_nvcc11.sh
- name: Build & Install
run: |
export PATH=/usr/local/nvidia/bin:/usr/local/cuda/bin:${PATH}
export LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64:/usr/local/cuda/lib64:${LD_LIBRARY_PATH}
which nvcc || echo "nvcc not in PATH!"
export CC=$(which gcc)
export CXX=$(which g++)
export CUDAHOSTCXX=$(which g++)
python3 -m pip install -U pip setuptools wheel
python3 -m pip install -U cmake
cmake -S . -B build \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DAMReX_GPU_BACKEND=CUDA \
-DAMReX_SPACEDIM="1;2;3" \
-DCMAKE_CUDA_STANDARD=17 \
-DCMAKE_CXX_STANDARD=17 \
-DAMReX_CUDA_ARCH=8.0 \
-DAMReX_CUDA_ERROR_CROSS_EXECUTION_SPACE_CALL=ON \
-DAMReX_CUDA_ERROR_CAPTURE_THIS=ON
cmake --build build --target pip_install -j 2