-
Notifications
You must be signed in to change notification settings - Fork 29
147 lines (139 loc) · 4.67 KB
/
build-test.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
name: Build-test CI
on:
push:
branches: [ master ]
paths-ignore:
- '**.md'
- LICENSE.txt
- NOTICE.txt
- .mailmap
- CITATION.cff
pull_request:
branches: [ master ]
paths-ignore:
- '**.md'
- LICENSE.txt
- NOTICE.txt
- .mailmap
- CITATION.cff
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
# remove Ubuntu 20.04 until #1179
# - os: ubuntu-20.04
# compiler: gcc
# compiler_version: 8
# DEVEL_BUILD: "OFF"
# EXTRA_BUILD_FLAGS: "-DUSE_ITK=ON"
# CMAKE_BUILD_TYPE: "Release"
- os: ubuntu-latest
compiler: gcc
compiler_version: 9
DEVEL_BUILD: "OFF"
EXTRA_BUILD_FLAGS: "-DUSE_ITK=ON"
CMAKE_BUILD_TYPE: "Release"
- os: ubuntu-latest
compiler: gcc
compiler_version: 9
DEVEL_BUILD: "ON"
EXTRA_BUILD_FLAGS: "-DUSE_ITK=ON"
CMAKE_BUILD_TYPE: "Release"
# need to upgrade Gadgetron before we can enable gcc 10
#- os: ubuntu-latest
# compiler: gcc
# compiler_version: 10
# DEVEL_BUILD: "ON"
# EXTRA_BUILD_FLAGS: "-DUSE_ITK=ON"
# CMAKE_BUILD_TYPE: "Release"
# let's run all of them, as opposed to aborting when one fails
fail-fast: false
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: install_dependencies
run:
cd ${GITHUB_WORKSPACE};
git clone https://github.com/SyneRBI/SIRF-SuperBuild --recursive -b master;
cd SIRF-SuperBuild/docker;
sudo bash raw-ubuntu.sh;
sudo bash build_essential-ubuntu.sh;
sudo bash build_python-ubuntu.sh;
sudo bash build_gadgetron-ubuntu.sh;
sudo bash build_system-ubuntu.sh;
PYTHON_EXECUTABLE=python3 PYTHON_INSTALL_DIR=~/virtualenv bash user_python-ubuntu.sh;
- name: ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ matrix.os }}-${{ matrix.CMAKE_BUILD_TYPE }}-${{ matrix.DEVEL_BUILD }}
- name: set_compiler_variables
shell: bash
run: |
set -ex
if test 'XX${{ matrix.compiler }}' = 'XXclang'; then
CC="clang"
CXX="clang++"
elif test 'XX${{ matrix.compiler }}' = 'XXgcc'; then
CC="gcc"
CXX="g++"
fi
if test 'XX${{ matrix.compiler_version }}' != 'XX'; then
CC=${CC}-${{ matrix.compiler_version }}
CXX=${CXX}-${{ matrix.compiler_version }}
sudo apt install -yq ${CXX} ${CC}
fi
export CC CXX
# make available to jobs below
echo CC="$CC" >> $GITHUB_ENV
echo CXX="$CXX" >> $GITHUB_ENV
- name: configure
shell: bash
run: |
set -ex;
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
cmake --version
#echo "cmake flags ${{ matrix.CMAKE_BUILD_TYPE }} ${{ matrix.EXTRA_BUILD_FLAGS }}"
BUILD_FLAGS="-DCMAKE_BUILD_TYPE=${{ matrix.CMAKE_BUILD_TYPE }} -DUSE_SYSTEM_ACE=ON -DUSE_SYSTEM_Armadillo=ON -DUSE_SYSTEM_Boost=ON -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DBUILD_siemens_to_ismrmrd=ON -DUSE_SYSTEM_SWIG=ON -DCMAKE_INSTALL_PREFIX=~/install -DPYVER=3";
BUILD_FLAGS="$BUILD_FLAGS -DSIRF_SOURCE_DIR:PATH=${GITHUB_WORKSPACE} -DDISABLE_GIT_CHECKOUT_SIRF=ON"
# only test SIRF (others are tested in the SIRF-SuperBuild action)
BUILD_FLAGS="$BUILD_FLAGS -DBUILD_TESTING_GADGETRON=OFF -DBUILD_TESTING_ISMRMRD=OFF"
DEVEL_BUILD="-DDEVEL_BUILD=${{ matrix.DEVEL_BUILD }}"
mkdir -p build/;
cd build;
source ~/virtualenv/bin/activate;
cmake -S ../SIRF-SuperBuild ${BUILD_FLAGS} ${{ matrix.EXTRA_BUILD_FLAGS }} ${DEVEL_BUILD};
- name: build
shell: bash
run:
cd ${GITHUB_WORKSPACE}/build;
source ~/virtualenv/bin/activate;
source ~/install/bin/env_sirf.sh;
cmake --build . -j 2;
- name: tests
shell: bash
run:
bash -v ${GITHUB_WORKSPACE}/SIRF-SuperBuild/docker/ctest_sirf.sh
- name: Coverage
shell: bash
run: |
pwd
source ~/virtualenv/bin/activate
coverage combine .coverage-*
coverage report
- name: Coveralls
uses: AndreMiras/coveralls-python-action@develop
with:
parallel: true
flag-name: python test
debug: true
coveralls_finish:
needs: build
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: AndreMiras/coveralls-python-action@develop
with:
parallel-finished: true