-
Notifications
You must be signed in to change notification settings - Fork 14
46 lines (41 loc) · 1.68 KB
/
build.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
name: C/C++ CI
on:
workflow_dispatch:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build-and-test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: install thirdparties
run: |
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | sudo apt-key add -
sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main'
sudo apt-get update
sudo apt install -y cmake
sudo apt install -y libboost-filesystem-dev libboost-test-dev libboost-date-time-dev libboost-program-options-dev
sudo apt install -y libhdf5-dev
sudo apt install -y libeigen3-dev
sudo add-apt-repository ppa:rock-core/qt4
sudo apt-get update
sudo apt install -y libqt4-opengl-dev
mkdir -p deps
docker pull itisfoundation/iseg-ubuntu-vtk:8.2
docker create --name vtkcontainer itisfoundation/iseg-ubuntu-vtk:8.2 bash
docker cp vtkcontainer:/work deps/vtk
docker rm vtkcontainer
docker pull itisfoundation/iseg-ubuntu-itk:5.2.1
docker create --name itkcontainer itisfoundation/iseg-ubuntu-itk:5.2.1 bash
docker cp itkcontainer:/work deps/itk
docker rm itkcontainer
- name: configure
run: cmake -H. -BCIBuild -DCMAKE_BUILD_TYPE=Release -DHDF5_ROOT=/usr -DVTK_DIR=`ls -d -1 deps/vtk/lib/cmake/vtk*` -DITK_DIR=`ls -d -1 deps/itk/lib/cmake/ITK*` -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt4 -Wdev
- name: make
run: cmake --build CIBuild -j2
- name: make test
run: |
cd CIBuild
ctest -V