-
Notifications
You must be signed in to change notification settings - Fork 55
90 lines (75 loc) · 3.13 KB
/
ci.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
name: TiledArray CI
on: [push]
env:
CMAKE_BUILD_PARALLEL_LEVEL : 2
jobs:
MacOS-Build:
strategy:
fail-fast: false
matrix:
os : [ macos-latest, ubuntu-22.04 ]
build_type : [ Release, Debug ]
task_backend: [ Pthreads, PaRSEC ]
include:
- os: ubuntu-22.04
cc: /usr/bin/gcc-12
cxx: /usr/bin/g++-12
- os: macos-latest
cc: clang
cxx: clang++
name: "${{ matrix.os }}: ${{ matrix.cxx }} ${{ matrix.build_type }} ${{ matrix.task_backend }}"
runs-on: ${{ matrix.os }}
env:
CXX : ${{ matrix.cxx }}
CCACHE_DIR : ${{github.workspace}}/build/.ccache
CCACHE_COMPRESS : true
CCACHE_COMPRESSLEVEL : 6
OMPI_MCA_btl_vader_single_copy_mechanism : none
PARSEC_MCA_runtime_bind_threads : 0
BUILD_CONFIG : >
-DMADNESS_TASK_BACKEND=${{ matrix.task_backend }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DMPIEXEC_PREFLAGS='--bind-to;none;--allow-run-as-root'
-DCMAKE_PREFIX_PATH="/usr/local/opt/bison;/usr/local/opt/scalapack"
-DTA_ASSERT_POLICY=TA_ASSERT_THROW
-DENABLE_SCALAPACK=ON
steps:
- uses: actions/checkout@v2
- name: Host system info
shell: bash
run: cmake -P ${{github.workspace}}/ci/host_system_info.cmake
- name: Install prerequisite MacOS packages
if: ${{ matrix.os == 'macos-latest' }}
run: |
brew install ninja boost eigen open-mpi bison scalapack ccache
echo "MPIEXEC=/opt/homebrew/bin/mpiexec" >> $GITHUB_ENV
- name: Install prerequisites Ubuntu packages
if: ${{ matrix.os == 'ubuntu-22.04' }}
run: |
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null
sudo apt-add-repository "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main"
sudo apt-get update
sudo apt-get -y install ninja-build g++-12 liblapack-dev libboost-dev libboost-serialization-dev libboost-random-dev libeigen3-dev openmpi-bin libopenmpi-dev libtbb-dev ccache flex bison libscalapack-mpi-dev cmake doxygen
sudo ln -s /usr/lib/x86_64-linux-gnu/libscalapack-openmpi.so /usr/lib/x86_64-linux-gnu/libscalapack.so
echo "MPIEXEC=/usr/bin/mpiexec" >> $GITHUB_ENV
- name: Setup ccache
uses: hendrikmuhs/[email protected]
with:
key: ccache-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.task_backend }}
- name: "Configure build: ${{ env.BUILD_CONFIG }}"
shell: bash
run: |
set -x;
cmake -B${{github.workspace}}/build $BUILD_CONFIG || (cat CMakeFiles/CMakeConfigureLog.yaml)
- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
run: |
ccache -p && ccache -z && cmake --build . --target tiledarray ta_test examples && ccache -s
- name: Test
working-directory: ${{github.workspace}}/build
shell: bash
#run: ctest -C $${{matrix.build_type}}
run: |
source ${{github.workspace}}/ci/openmpi.env
cmake --build . --target check-tiledarray