forked from AMReX-Codes/amrex
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (53 loc) · 2.27 KB
/
macos.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
name: macos
on: [push, pull_request]
concurrency:
group: ${{ github.ref }}-${{ github.head_ref }}-macos
cancel-in-progress: true
jobs:
# Build libamrex and all tests
tests-macos-universal-nompi:
name: AppleClang Universal w/o MPI [tests-universal]
runs-on: macos-latest
env:
# build universal binaries for M1 "Apple Silicon" and Intel CPUs
CMAKE_OSX_ARCHITECTURES: "arm64;x86_64"
CXXFLAGS: "-fno-operator-names -Werror -Wall -Wextra -Wpedantic -Wnull-dereference -Wfloat-conversion -Wshadow -Woverloaded-virtual -Wextra-semi -Wunreachable-code -Wnon-virtual-dtor -Wno-c++17-extensions -Wno-range-loop-analysis"
# -Wno-range-loop-analysis: Apple clang has a bug in range-loop-analysis
steps:
- uses: actions/checkout@v3
- name: Dependencies
run: .github/workflows/dependencies/dependencies_mac.sh
- name: Build & Install
run: |
cmake -S . -B build \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DAMReX_EB=ON \
-DAMReX_MPI=OFF \
-DAMReX_ENABLE_TESTS=ON \
-DAMReX_PARTICLES=ON
cmake --build build --parallel 2
ctest --test-dir build --output-on-failure
# Build libamrex and all tests
tests-macos:
name: AppleClang@11.0 GFortran@9.3 [tests]
runs-on: macos-latest
env:
CXXFLAGS: "-fno-operator-names -Werror -Wall -Wextra -Wpedantic -Wnull-dereference -Wfloat-conversion -Wshadow -Woverloaded-virtual -Wextra-semi -Wunreachable-code -Wnon-virtual-dtor -Wno-c++17-extensions -Wno-range-loop-analysis"
# -Wno-range-loop-analysis: Apple clang has a bug in range-loop-analysis
steps:
- uses: actions/checkout@v3
- name: Dependencies
run: .github/workflows/dependencies/dependencies_mac.sh
- name: Build & Install
run: |
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DAMReX_EB=ON \
-DAMReX_ENABLE_TESTS=ON \
-DAMReX_PARTICLES=ON
cmake --build build --parallel 2
cmake --build build --target install
ctest --test-dir build --output-on-failure