-
Notifications
You must be signed in to change notification settings - Fork 21
81 lines (66 loc) · 1.97 KB
/
pr_validation.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
name: PR Validation
on:
workflow_dispatch:
pull_request:
branches: [trunk]
types: [opened, ready_for_review]
env:
LDMX_DOCKER_TAG: ldmx/dev:latest
LDMX_NUM_EVENTS: 10000
jobs:
compile-ldmx-sw:
runs-on: ubuntu-latest
outputs:
job_matrix: ${{steps.gen-mat.outputs.job_matrix}}
steps:
- name: Checkout ldmx-sw
uses: actions/checkout@v4
with:
submodules: 'recursive'
fetch-depth: 0
- name: Compile and Install ldmx-sw
uses: ./.github/actions/setup
- name: Git Gold Histograms from trunk
run: git checkout origin/trunk -- .github/validation_samples/*/gold.root .github/actions/validate/gold_label
shell: bash
- name: Package ldmx-sw Into Artifact
run: tar cf ldmx-sw-package.tar install/ .github/
- name: Upload ldmx-sw Package
uses: actions/upload-artifact@v3
with:
name: ldmx-sw-build-${{ github.sha }}
path: ldmx-sw-package.tar
- name: Generate Job Matrix
id: gen-mat
uses: ./.github/actions/generate-matrix
validation:
needs: compile-ldmx-sw
runs-on: ubuntu-latest
env:
LDMX_RUN_NUMBER: ${{matrix.run}}
strategy:
matrix: ${{fromJson(needs.compile-ldmx-sw.outputs.job_matrix)}}
fail-fast: false
steps:
- name: Download ldmx-sw Package
uses: actions/download-artifact@v4
with:
name: ldmx-sw-build-${{ github.sha }}
- name: Unpack ldmx-sw Build
run: |
cd ${GITHUB_WORKSPACE}
tar xf ldmx-sw-package.tar
- name: Run Validation
id: validation
uses: ./.github/actions/validate
with:
sample: ${{matrix.sample}}
- name: Upload Validation Plots
uses: actions/upload-artifact@v3
with:
name: ${{matrix.sample}}-pr-validation
path: ${{ steps.validation.outputs.plots }}
- name: Did any validation plots fail?
uses: ./.github/actions/check
with:
plots: ${{ steps.validation.outputs.plots }}