Skip to content

Commit bf188b2

Browse files
committed
#2454: Make two groups inside docker-bake.hcl file - one for pull requests and one for develop-only builds. Also new workflow file was added for develop-only bulds
1 parent b92057b commit bf188b2

File tree

3 files changed

+99
-3
lines changed

3 files changed

+99
-3
lines changed

.github/workflows/build-docker-images.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
id: list-targets
2525
uses: docker/bake-action/subaction/list-targets@v6
2626
with:
27-
target: vt-build-all
27+
target: vt-pull-request
2828

2929
bake:
3030
runs-on: ubuntu-latest
@@ -43,7 +43,9 @@ jobs:
4343
with:
4444
path: docker-output/build/ccache
4545
key: ${{ matrix.target }}-${{ github.ref }}-${{ github.sha }}
46-
restore-keys: ${{ matrix.target }}-${{ github.ref }}
46+
restore-keys: |
47+
${{ matrix.target }}-${{ github.ref }}
48+
${{ matrix.target }}-
4749
4850
- name: Login to DockerHub
4951
uses: docker/login-action@v3
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Develop CI
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
8+
jobs:
9+
prepare:
10+
runs-on: ubuntu-latest
11+
outputs:
12+
targets: ${{ steps.list-targets.outputs.targets }}
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: List targets
19+
id: list-targets
20+
uses: docker/bake-action/subaction/list-targets@v6
21+
with:
22+
target: vt-develop
23+
24+
bake-develop:
25+
needs:
26+
- prepare
27+
runs-on: ubuntu-latest
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
target: ${{ fromJson(needs.prepare.outputs.targets) }}
32+
steps:
33+
- name: Checkout
34+
uses: actions/checkout@v4
35+
36+
- name: Set up Docker Buildx
37+
uses: docker/setup-buildx-action@v3
38+
39+
- uses: actions/cache@v4
40+
with:
41+
path: docker-output/build/ccache
42+
key: ${{ matrix.target }}-${{ github.ref }}-${{ github.sha }}
43+
restore-keys: |
44+
${{ matrix.target }}-${{ github.ref }}
45+
${{ matrix.target }}-
46+
47+
- name: Build
48+
uses: docker/bake-action@v6
49+
with:
50+
source: .
51+
targets: ${{ matrix.target }}
52+
files: docker-bake.hcl

docker-bake.hcl

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ target "vt-build" {
201201
}
202202

203203
target "vt-build-all" {
204-
name = "vt-build-${replace(item.image, ".", "-")}"
204+
name = "vt-build-${replace(item.image, ".", "-")}${vt_test_spack(item) == 1 ? "-spack" : ""}"
205205
inherits = ["vt-build"]
206206
tags = ["${REPO}:vt-${item.image}"]
207207

@@ -271,6 +271,11 @@ target "vt-build-all" {
271271
image = "amd64-ubuntu-20.04-gcc-10-openmpi-cpp"
272272
vt_lb = 0
273273
vt_tests_num_nodes = 4
274+
},
275+
{
276+
image = "amd64-ubuntu-20.04-gcc-10-openmpi-cpp"
277+
vt_lb = 1
278+
vt_trace_only = 1
274279
vt_test_spack = 1
275280
},
276281
{
@@ -373,3 +378,40 @@ target "vt-build-all" {
373378
]
374379
}
375380
}
381+
382+
383+
group "vt-pull-request" {
384+
targets = [
385+
"vt-build-amd64-alpine-3-16-clang-cpp",
386+
"vt-build-amd64-ubuntu-20-04-clang-10-cpp",
387+
"vt-build-amd64-ubuntu-20-04-clang-9-cpp",
388+
"vt-build-amd64-ubuntu-20-04-gcc-10-cpp",
389+
"vt-build-amd64-ubuntu-20-04-gcc-10-openmpi-cpp",
390+
"vt-build-amd64-ubuntu-20-04-gcc-9-cpp",
391+
"vt-build-amd64-ubuntu-20-04-gcc-9-cuda-11-4-3-cpp",
392+
"vt-build-amd64-ubuntu-20-04-gcc-9-cuda-12-2-0-cpp",
393+
"vt-build-amd64-ubuntu-20-04-icpx-cpp",
394+
"vt-build-amd64-ubuntu-22-04-clang-11-cpp",
395+
"vt-build-amd64-ubuntu-22-04-clang-12-cpp",
396+
"vt-build-amd64-ubuntu-22-04-clang-13-cpp",
397+
"vt-build-amd64-ubuntu-22-04-clang-14-cpp",
398+
"vt-build-amd64-ubuntu-22-04-clang-15-cpp",
399+
"vt-build-amd64-ubuntu-22-04-gcc-11-cpp",
400+
"vt-build-amd64-ubuntu-22-04-gcc-12-cpp",
401+
"vt-build-amd64-ubuntu-22-04-gcc-12-vtk-cpp",
402+
"vt-build-amd64-ubuntu-22-04-gcc-12-zoltan-cpp",
403+
"vt-build-amd64-ubuntu-24-04-clang-16-cpp",
404+
"vt-build-amd64-ubuntu-24-04-clang-16-vtk-cpp",
405+
"vt-build-amd64-ubuntu-24-04-clang-16-zoltan-cpp",
406+
"vt-build-amd64-ubuntu-24-04-clang-17-cpp",
407+
"vt-build-amd64-ubuntu-24-04-clang-18-cpp",
408+
"vt-build-amd64-ubuntu-24-04-gcc-13-cpp",
409+
"vt-build-amd64-ubuntu-24-04-gcc-14-cpp",
410+
]
411+
}
412+
413+
group "vt-develop" {
414+
targets = [
415+
"vt-build-amd64-ubuntu-20-04-gcc-10-openmpi-cpp-spack",
416+
]
417+
}

0 commit comments

Comments
 (0)