-
Notifications
You must be signed in to change notification settings - Fork 7
104 lines (97 loc) · 4.88 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
name: OpenFPM_CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test_build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
fail-fast: false
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up Homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Cache Homebrew dependencies
uses: actions/cache@v2
with:
path: |
~/Library/Caches/Homebrew
/home/linuxbrew/.cache/Homebrew
$HOME/.ccache
key: ${{ runner.os }}-homebrew-${{ hashFiles('**/*.rb') }}
restore-keys: |
${{ runner.os }}-homebrew-
- name: Install dependencies
run: |
brew install cmake ccache petsc boost vc eigen hdf5-mpi
brew install abhinavsns/homebrew-openfpm/parmetis
brew install abhinavsns/homebrew-openfpm/libhilbert
brew install abhinavsns/homebrew-openfpm/blitz
brew install abhinavsns/homebrew-openfpm/algoim
- name: Configure with CMake
run: |
export CCACHE_DIR="$HOME/.ccache"
mkdir -p "$CCACHE_DIR"
mkdir -p build
cd build
export CXX=mpic++
echo "cmake .. -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_INSTALL_PREFIX=$HOME/openfpmInstall -DLD_FLAGS='-Wl,-ld_classic' -DDYLD_LIBRARY_PATH=$(brew --prefix suitesparse)/lib:$(brew --prefix metis)/lib -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=Release -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_VERBOSE_MAKEFILE=ON -DFETCHCONTENT_FULLY_DISCONNECTED=ON -Wno-dev -DBUILD_TESTING=OFF -DCMAKE_OSX_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -DCMAKE_BUILD_TYPE=Release -DSE_CLASS1=OFF -DSE_CLASS2=OFF -DSE_CLASS3=OFF -DTEST_COVERAGE=OFF -DSCAN_COVERTY=OFF -DTEST_PERFORMANCE=OFF -DENABLE_ASAN=OFF -DENABLE_NUMERICS=ON -DENABLE_GARBAGE_INJECTOR=OFF -DENABLE_VCLUSTER_GARBAGE_INJECTOR=OFF -DMPI_VENDOR=openmpi -DMPI_ROOT=$(brew --prefix petsc) -DPETSC_ROOT=$(brew --prefix petsc) -DBOOST_ROOT=$(brew --prefix boost) -DBoost_NO_BOOST_CMAKE=ON -DHDF5_ROOT=$(brew --prefix hdf5-mpi) -DLIBHILBERT_ROOT=$(brew --prefix libhilbert) -DBLITZ_ROOT=$(brew --prefix blitz) -DALGOIM_ROOT=$(brew --prefix algoim) -DPARMETIS_ROOT=$(brew --prefix parmetis) -DMETIS_ROOT=$(brew --prefix metis) -DOPENBLAS_ROOT=$(brew --prefix openblas) -DSUITESPARSE_ROOT=$(brew --prefix suite-sparse) -DEIGEN3_ROOT=$(brew --prefix eigen) -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache"
cmake .. -DCMAKE_CXX_COMPILER=mpic++ \
-DLD_FLAGS='-Wl,-ld_classic' \
-DDYLD_LIBRARY_PATH=/Users/abhinav/repos/openfpm/dep_ofp64/SUITESPARSE/lib:/Users/abhinav/repos/openfpm/dep_ofp64/METIS/lib \
-DCMAKE_INSTALL_PREFIX=/Users/abhinav/repos/openfpm/install5 \
-DCMAKE_BUILD_TYPE=RELEASE \
-DSE_CLASS1=OFF \
-DSE_CLASS2=OFF \
-DSE_CLASS3=OFF \
-DTEST_COVERAGE=OFF \
-DSCAN_COVERTY=OFF \
-DTEST_PERFORMANCE=OFF \
-DENABLE_ASAN=OFF \
-DENABLE_NUMERICS=ON \
-DENABLE_GARBAGE_INJECTOR=OFF \
-DENABLE_VCLUSTER_GARBAGE_INJECTOR=OFF \
-DCUDA_ON_BACKEND=NONE
-DMPI_ROOT=$(brew --prefix petsc) \
-DPETSC_ROOT=$(brew --prefix petsc) \
-DBOOST_ROOT=$(brew --prefix boost) \
-DBoost_NO_BOOST_CMAKE=ON \
-DHDF5_ROOT=$(brew --prefix hdf5-mpi) \
-DLIBHILBERT_ROOT=$(brew --prefix libhilbert) \
-DBLITZ_ROOT=$(brew --prefix blitz) \
-DALGOIM_ROOT=$(brew --prefix algoim) \
-DPARMETIS_ROOT=$(brew --prefix parmetis) \
-DMETIS_ROOT=$(brew --prefix metis) \
-DOPENBLAS_ROOT=$(brew --prefix openblas) \
-DSUITESPARSE_ROOT=$(brew --prefix suite-sparse) \
-DEIGEN3_ROOT=$(brew --prefix eigen) \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_COMPILER_LAUNCHER=ccache
- name: Build and install
run: make install
# - name: Single-core Test
# run: |
# export CC=gcc-12
# export CXX=g++-12
# source $HOME/openfpm_vars
# export OMP_NUM_THREADS=1
# ./run.sh $(pwd) unused 1 pdata 0 ${{ github.ref }}
# cd openfpm_numerics
# ./run.sh $(pwd) unused 1 0 0 numerics ${{ github.ref }}
# - name: Multi-core Test
# run: |
# export CC=gcc-12
# export CXX=g++-12
# source $HOME/openfpm_vars
# export OMP_NUM_THREADS=1
# mpirun --allow-run-as-root -np 2 ./build/src/pdata
# echo "RUN numerics test"
# cd openfpm_numerics
# mpirun --allow-run-as-root -np 2 ../build/openfpm_numerics/src/numerics