-
Notifications
You must be signed in to change notification settings - Fork 6
85 lines (82 loc) · 2.38 KB
/
tests.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
name: Automated tests
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
name: Build default geometry
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup
run: pip install .
- name: Build defaul gdml
run: ./build_hall.sh
- name: Upload default geometry
uses: actions/upload-artifact@v4
with:
name: Default Geometry
path: |
nd_hall_with_lar_tms_sand.gdml
anti_fiducial_nd_hall_with_lar_tms_sand.gdml
if-no-files-found: error
check_overlaps:
name: Check geometry for overlaps
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- name: Install ROOT
run: sudo snap install root-framework
- name: Download default geometry
uses: actions/download-artifact@v4
with:
name: Default Geometry
- name: Debug artifact
run: |
ls -l
head nd_hall_with_lar_tms_sand.gdml
- name: Run standard overlap check
run: |
root -q -b 'checkOverlaps.C("nd_hall_with_lar_tms_sand.gdml", 0)' 2>&1 | tee check.log
grep "Number of illegal overlaps/extrusions : 0" check.log
- name: Run sampling overlap check
run: |
root -q -b 'checkOverlaps.C("nd_hall_with_lar_tms_sand.gdml", 1)' 2>&1 | tee check.log
grep "Number of illegal overlaps/extrusions : 0" check.log
put_online:
name: Put geometries online for visual inspection
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- name: Install ROOT
run: sudo snap install root-framework
- name: Download default geometry
uses: actions/download-artifact@v4
with:
name: Default Geometry
- name: Convert gdml files to root
run: |
for F in *.gdml
do
root "gdml2root.C(\"$F\", \"jsroot/${F%.gdml}.root\")"
done
- name: Replace heading in html
run: |
sed -i -e "s|master|$GITHUB_REF_NAME|" jsroot/index.htm
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
# Upload jsroot folder
path: 'jsroot'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2