-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (53 loc) · 1.55 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
47
48
49
50
51
52
53
54
55
on:
pull_request:
branches:
- master
- develop
- feat-filter
env:
BUILD_TYPE: Debug
jobs:
Orthanc-TMI:
runs-on: ubuntu-20.04
steps:
- name: Install dependencies
run: |
sudo apt-get update
echo "update done";echo
sudo apt-get install -y software-properties-common lsb-release
echo;echo
sudo apt-get install \
postgresql \
postgresql-contrib
echo "postgresql packages installed";echo
sudo apt-get install \
gcc \
ninja-build \
cmake \
libpq5 \
libpq-dev
- name: Clone Orthanc-TMI
uses: actions/checkout@v2
with:
submodules: true
- name: Build
run: |
cmake \
-S . \
-B build \
-G Ninja
ninja -C build data-anonymizer
ninja -C build all-tests
- name: Launch Docker
run: |
cd .github
docker-compose down
docker-compose up -d && sleep 5s
- name: Check Docker Status
run: |
status=$(docker ps --all --filter name=orthanc-server --format '{{.Status}}')
echo Orthanc Docker Container: $status
if echo $status | grep Up &>/dev/null; then :; else docker logs orthanc-server && exit 1; fi
- name: Run Unit Tests
run: |
build/bin/all-tests --gtest_output=xml:build/