-
Notifications
You must be signed in to change notification settings - Fork 0
145 lines (141 loc) · 5.17 KB
/
hep-forge.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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
name: HEP Docker Image CI
on:
push:
branches: [ "master" ]
paths:
- hep-forge/Dockerfile
- .github/workflows/hep-forge.yml
schedule:
- cron: 0 6 14 * *
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
docker:
runs-on: ubuntu-latest
#runs-on: self-hosted
timeout-minutes: 4320 # 72h
strategy:
fail-fast: false
max-parallel: 1
matrix:
user: ["apnpucky"]
base: [ "gentoo" ]
image: [
# "scikit-hep",
"lhapdf",
"lhapdf-looptools",
"rivet3-herwig7-hepmc2-lhapdf",
"rivet3-herwig7-hepmc3-lhapdf",
"rivet3-hepmc3",
"rivet3-hepmc2",
"rivet3-pythia8-hepmc3-lhapdf",
"rivet3-pythia8-hepmc2-lhapdf",
"rivet3-pythia8-hepmc3-lhapdf-looptools",
"rivet3-pythia8-hepmc2-lhapdf-looptools",
"scikit-hep",
"susy",
"hepi",
"powheg-box-v2",
]
platforms: [
"linux/amd64",
#,linux/386, linux/arm64,linux/ppc64le,linux/riscv64,linux/arm/v5,linux/arm/v6,linux/arm/v7, #,linux/s390x,
]
lhapdf: [ "6.5.4", "6.3.0" ]
looptools: [ "2.15" ]
rivet3: [ "3.1.9", "3.1.8" ]
hepmc3: [ "3.2.6", "3.2.5" ]
hepmc2: [ "2.06.11" ]
pythia8: [ "8.3.09", "8.2.45-r3" ]
herwig7: [ "7.3.0", "7.2.3-r2" ]
scikit-hep: ["0"]
powheg-box-v2: ["4027"]
resummino: ["3.1.2"]
softsusy: ["4.1.13"]
spheno: ["3.3.8"]
nllfast: ["3.1"]
nnllfast: ["1.1"]
steps:
-
name: Set up version
id: version
run: |
VERSION=${{ matrix.image }}
VERSION=${VERSION//lhapdf/${{ matrix.lhapdf }}}
VERSION=${VERSION//rivet3/${{ matrix.rivet3 }}}
VERSION=${VERSION//hempc3/${{ matrix.hepmc3 }}}
VERSION=${VERSION//hempc2/${{ matrix.hepmc2 }}}
VERSION=${VERSION//looptools/${{ matrix.looptools }}}
VERSION=${VERSION//pythia8/${{ matrix.pythia8 }}}
VERSION=${VERSION//herwig7/${{ matrix.herwig7}}}
VERSION=${VERSION//scikit-hep/${{ matrix.scikit-hep }}}
VERSION=${VERSION//powheg-box-v2/${{ matrix.powheg-box-v2 }}}
VERSION=${VERSION//resummino/${{ matrix.resummino }}}
VERSION=${VERSION//softsusy/${{ matrix.softsusy }}}
VERSION=${VERSION//spheno/${{ matrix.spheno }}}
VERSION=${VERSION//nllfast/${{ matrix.nllfast }}}
VERSION=${VERSION//nnllfast/${{ matrix.nnllfast }}}
echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT"
-
name: Checkout
uses: actions/checkout@v3
-
name: Get current time
uses: josStorer/get-current-time@v2.0.2
id: current-time
with:
format: YYYYMMDDHHSS
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
config: .github/buildkitd.toml
-
name: Login to Docker Hub
uses: docker/#-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: abort on existing tag
id: abort
run: |
if docker manifest inspect ${{ matrix.user }}/${{ matrix.base }}-${{ matrix.image }}:${{ steps.version.outputs.VERSION }}-${{ github.sha }}-latest; then
echo "STOP"
echo "STOP=true" >> "$GITHUB_OUTPUT"
else
echo "DONT STOP"
echo "STOP=false" >> "$GITHUB_OUTPUT"
fi
-
name: ${{ matrix.base }}-${{ matrix.image }}
if: steps.abort.outputs.STOP == 'false'
uses: docker/build-push-action@v3
with:
file: hep-forge/Dockerfile
platforms: ${{ matrix.platforms }}
push: true
target: ${{ matrix.base }}-${{ matrix.image }}
build-args: |
LHAPDF_VERSION=${{ matrix.lhapdf }}
LOOPTOOLS_VERSION=${{ matrix.looptools }}
RIVET3_VERSION=${{ matrix.rivet3 }}
HEPMC3_VERSION=${{ matrix.hepmc3 }}
HEPMC2_VERSION=${{ matrix.hepmc2 }}
PYTHIA8_VERSION=${{ matrix.pythia8 }}
HERWIG7_VERSION=${{ matrix.herwig7 }}
POWHEG_BOX_V2_VERSION=${{ matrix.powheg-box-v2 }}
RESUMMINO_VERSION=${{ matrix.resummino }}
SOFTSUSY_VERSION=${{ matrix.softsusy }}
SPHENO_VERSION=${{ matrix.spheno }}
NLLFAST_VERSION=${{ matrix.nllfast }}
NNLLFAST_VERSION=${{ matrix.nnllfast }}
tags: |
${{ matrix.user }}/${{ matrix.base }}-${{ matrix.image }}:latest
${{ matrix.user }}/${{ matrix.base }}-${{ matrix.image }}:${{ steps.version.outputs.VERSION }}-latest
${{ matrix.user }}/${{ matrix.base }}-${{ matrix.image }}:${{ steps.version.outputs.VERSION }}-${{ github.sha }}-latest
${{ matrix.user }}/${{ matrix.base }}-${{ matrix.image }}:${{ steps.version.outputs.VERSION }}-${{ steps.current-time.outputs.formattedTime }}-latest