forked from JeffersonLab/clas12root
-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (54 loc) · 1.87 KB
/
main.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
name: C++ CI Testing
on: pull_request
jobs:
build_and_test:
runs-on: ubuntu-latest
container: rootproject/root:${{ matrix.version }}
strategy:
matrix:
version: [6.28.12-ubuntu22.04]
steps:
- name: system dependancies
run: |
apt update
apt -y install git scons python2
- name: checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
path: .
- name: set env vars
run: |
echo "CLAS12ROOT=$GITHUB_WORKSPACE" >> $GITHUB_ENV
echo "HIPO=$GITHUB_WORKSPACE/hipo" >> $GITHUB_ENV
echo "CCDB_HOME=$GITHUB_WORKSPACE/ccdb" >> $GITHUB_ENV
echo "RCDB_HOME=$GITHUB_WORKSPACE/rcdb" >> $GITHUB_ENV
echo "QADB=$GITHUB_WORKSPACE/clas12-qadb" >> $GITHUB_ENV
- name: set paths
run: |
echo "PYTHONPATH=$CCDB_HOME/python:$RCDB_HOME/python:$PYTHONPATH" >> $GITHUB_ENV
echo "PATH=$PWD/bin:$CCDB_HOME:$CCDB_HOME/bin:$RCDB_HOME/bin:$RCDB_HOME/cpp/bin:$PATH" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=$RCDB_HOME/cpp/lib:$CCDB_HOME/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
- name: checkout hipo
uses: actions/checkout@v4
with:
repository: gavalian/hipo
ref: 4.0.1 # if you want to use a fixed tag; remove if you want to use `main`
path: ${HIPO}
- name: build hipo
run: |
cmake -S $HIPO -B $HIPO --install-prefix $HIPO
cmake --build $HIPO
cmake --install $HIPO
- name: build ccdb
run: |
cd $CCDB_HOME
bash environment.bash
/usr/bin/env python2 $(which scons)
- name: build clas12root
run: |
./installC12Root
- name: run example on data file
run: |
export CLAS12ROOT=$PWD
./bin/clas12root -q ./tests/read_file.C