-
Notifications
You must be signed in to change notification settings - Fork 11
41 lines (39 loc) · 1.17 KB
/
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
name: linux
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
SETUP: ['/cvmfs/sw.hsf.org/key4hep/setup.sh', '/cvmfs/sw-nightlies.hsf.org/key4hep/setup.sh']
steps:
- uses: actions/checkout@v3
- uses: cvmfs-contrib/github-action-cvmfs@v3
- name: Start container
run: |
docker run \
-it --name k4_CI \
-v ${{ github.workspace }}:/Package \
-v /cvmfs:/cvmfs:shared \
-d ghcr.io/aidasoft/centos7:latest /bin/bash
- name: Compile
run: |
docker exec k4_CI /bin/bash -c 'source ${{ matrix.SETUP }};
cd Package;
mkdir build install; cd build;
cmake -G Ninja -D CMAKE_INSTALL_PREFIX=$PWD/../install -D CMAKE_BUILD_TYPE=RelWithDebInfo ..;
ninja -k0;
'
- name: Run tests
run: |
docker exec k4_CI /bin/bash -c 'source ${{ matrix.SETUP }};
cd Package/build;
ctest --output-on-failure
'
- name: Install
run: |
docker exec k4_CI /bin/bash -c 'source ${{ matrix.SETUP }};
cd Package/build;
ninja install;
'