-
Notifications
You must be signed in to change notification settings - Fork 18
164 lines (154 loc) · 6.14 KB
/
c-cpp.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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
name: run superbuild and test
on:
push:
branches: [ master ]
paths-ignore:
- 'docker/Dockerfile'
- 'docker/*yml'
- '**.md'
- 'VirtualBox/**'
- '.github/workflows/*docker*'
- 'CITATION.cff'
- '.mailmap'
- 'NOTICE.txt'
- 'LICENSE.txt'
pull_request:
branches: [ master ]
paths-ignore:
- 'docker/Dockerfile'
- 'docker/*yml'
- '**.md'
- 'VirtualBox/**'
- '.github/workflows/*docker*'
- 'CITATION.cff'
- '.mailmap'
- 'NOTICE.txt'
- 'LICENSE.txt'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
compiler: gcc
compiler_version: 9
BUILD_TYPE: "Release"
EXTRA_BUILD_FLAGS: "-DUSE_ITK=ON -DBUILD_CIL=ON -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"
DEVEL_BUILD: "OFF"
- os: ubuntu-latest
compiler: gcc
compiler_version: 9
BUILD_TYPE: "Release"
EXTRA_BUILD_FLAGS: "-DUSE_ITK=ON -DBUILD_CIL=ON -DUSE_SYSTEM_ACE=ON -DUSE_SYSTEM_Armadillo=ON -DUSE_SYSTEM_Boost=ON -DUSE_SYSTEM_FFTW3=OFF -DUSE_SYSTEM_HDF5=OFF -DBUILD_siemens_to_ismrmrd=ON -DUSE_SYSTEM_SWIG=OFF"
DEVEL_BUILD: "OFF"
#- os: ubuntu-latest
# compiler: gcc
# compiler_version: 9
# BUILD_TYPE: "Release"
# EXTRA_BUILD_FLAGS: "-DUSE_ITK=ON -DBUILD_CIL=ON -DUSE_SYSTEM_ACE=ON -DUSE_SYSTEM_Armadillo=ON -DUSE_SYSTEM_Boost=OFF -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DBUILD_siemens_to_ismrmrd=ON -DUSE_SYSTEM_SWIG=ON"
# DEVEL_BUILD: "OFF"
- os: ubuntu-latest
compiler: gcc
compiler_version: 9
BUILD_TYPE: "Release"
EXTRA_BUILD_FLAGS: "-DUSE_ITK=ON -DBUILD_CIL=ON -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 -DUSE_SYSTEM_GTest=OFF"
DEVEL_BUILD: "OFF"
- os: ubuntu-latest
compiler: gcc
compiler_version: 11
BUILD_TYPE: "Release"
EXTRA_BUILD_FLAGS: "-DUSE_ITK=ON -DBUILD_CIL=ON -DUSE_SYSTEM_ACE=ON -DUSE_SYSTEM_Armadillo=OFF -DUSE_SYSTEM_Boost=ON -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DBUILD_siemens_to_ismrmrd=ON -DUSE_SYSTEM_SWIG=ON -DUSE_ROOT:BOOL=ON"
DEVEL_BUILD: "ON"
- os: ubuntu-latest
compiler: gcc
compiler_version: 11
BUILD_TYPE: "Release"
EXTRA_BUILD_FLAGS: "-DUSE_ITK=ON -DBUILD_CIL=ON -DUSE_SYSTEM_ACE=ON -DUSE_SYSTEM_Armadillo=OFF -DUSE_SYSTEM_Boost=ON -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DBUILD_siemens_to_ismrmrd=ON -DUSE_SYSTEM_SWIG=ON -DUSE_ROOT:BOOL=ON"
DEVEL_BUILD: "OFF"
# let's run all of them, as opposed to aborting when one fails
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: disk space
shell: bash
run: |
case ${{matrix.os}} in
(ubuntu* | macOS*)
sudo .github/workflows/GHA_increase_disk_space.sh
;;
(windows*)
# no idea what to do here
;;
esac
- name: install_dependencies
run:
cd 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/[email protected]
with:
key: ${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.compiler_version }}-${{ matrix.BUILD_TYPE }}
max-size: "900M"
- 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
env:
EXTRA_BUILD_FLAGS: ${{ matrix.EXTRA_BUILD_FLAGS }}
CMAKE_BUILD_TYPE: ${{ matrix.CMAKE_BUILD_TYPE }}
DEVEL_BUILD: "-DDEVEL_BUILD=${{ matrix.DEVEL_BUILD }}"
run: |
set -ex;
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
export superbuild=`pwd`;
export BUILD_FLAGS="-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=~/install -DPYVER=3 -DUSE_SYSTEM_RocksDB=OFF -DBUILD_TESTING_Gadgetron:BOOL=ON";
mkdir -p build/;
cd build;
source ~/virtualenv/bin/activate;
cmake -S ${GITHUB_WORKSPACE} ${BUILD_FLAGS} ${EXTRA_BUILD_FLAGS} ${DEVEL_BUILD};
- name: build
shell: bash
run: |
cd ${GITHUB_WORKSPACE}/build;
source ~/virtualenv/bin/activate;
cmake --build . -j 2;
# Enable tmate debugging of manually-triggered workflows if the input option was provided
- name: Setup tmate session if triggered
uses: mxschmitt/action-tmate@v3
timeout-minutes: 15
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }}
- name: Upload build log files for debugging
uses: actions/upload-artifact@v3
if: failure()
with:
name: build_log_files-${{ matrix.os }}-${{ matrix.compiler }}${{ matrix.compiler_version }}-${{ matrix.BUILD_TYPE }}-DEVEL=${{ matrix.DEVEL_BUILD }}-run=${{ github.run_number }}-id=${{ github.run_id }}
path: ${{ github.workspace }}/build/**/*.log
retention-days: 7
- name: tests
shell: bash
run:
bash docker/ctest_sirf.sh