-
Notifications
You must be signed in to change notification settings - Fork 21
123 lines (106 loc) · 3.25 KB
/
new_pre_release.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
name: New Pre-Release for Validation
on:
workflow_dispatch:
inputs:
branch:
description: 'Git Reference to Tag and Make Validation Plots'
required: true
default: trunk
tag:
description: 'Name for Pre-Release Tag'
required: true
env:
LDMX_DOCKER_TAG: ldmx/dev:latest
LDMX_NUM_EVENTS: 20000
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'
ref: ${{ github.event.inputs.branch }}
- name: Install just
uses: extractions/setup-just@v2
with:
just-version: 1.26.0
- name: Compile and Install ldmx-sw
run: |
just install-denv init configure-force-error
just build
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@v4
with:
name: ldmx-sw-build-${{ github.sha }}
path: ldmx-sw-package.tar
- name: Generate Job Matrix
id: gen-mat
uses: ./.github/actions/generate-matrix
with:
num_runs_per_sample: 5
generate-samples:
needs: compile-ldmx-sw
runs-on: ubuntu-latest
env:
LDMX_RUN_NUMBER: ${{matrix.run}}
strategy:
matrix: ${{fromJson(needs.compile-ldmx-sw.outputs.job_matrix)}}
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 ${{matrix.sample}} ${{matrix.run}}
id: validation
uses: ./.github/actions/validate
with:
sample: ${{matrix.sample}}
no_comp: true
- name: Upload Histogram File
uses: actions/upload-artifact@v4
with:
name: ${{matrix.sample}}-${{matrix.run}}-hists
path: ${{steps.validation.outputs.hists}}
create-pre-release:
needs: [generate-samples]
runs-on: ubuntu-latest
steps:
- name: Download Generated Histograms
uses: actions/download-artifact@v4
with:
path: '.'
- name: Unpack ldmx-sw Package (for bash env)
run: |
cd ${GITHUB_WORKSPACE}
tar xf ldmx-sw-build-${GITHUB_SHA}/ldmx-sw-package.tar
- name: Package Histograms together for Release
id: packaging
run: |
source ${GITHUB_WORKSPACE}/.github/actions/common.sh
mkdir hists-out
_hists=$(pwd)/hists-out
set_output hists "${_hists}/*"
for s in inclusive ecal_pn it_pileup; do
ldmx hadd ${_hists}/${s}.root ${s}-*-hists/*
done
shell: bash
- name: Make Pre-Release with Histograms
uses: ncipollo/release-action@v1
with:
artifacts: ${{steps.packaging.outputs.hists}}
bodyFile: ${{github.workspace}}/.github/workflows/body_new_pre_release.md
name: ${{ github.event.inputs.tag }} Validation
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.event.inputs.tag }}
commit: ${{ github.event.inputs.branch }}
prerelease: true