-
Notifications
You must be signed in to change notification settings - Fork 41
98 lines (90 loc) · 3.26 KB
/
docker.yml
File metadata and controls
98 lines (90 loc) · 3.26 KB
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
#
# Build docker images
#
name: Docker Images
on:
workflow_dispatch:
inputs:
features:
type: string
description: JSON array of feature-set names to build images for.
distros:
type: string
description: JSON array of operating system distros to build for.
machines:
type: string
description: JSON array of machines to build for.
toolchains:
type: string
description: JSON array of compiler toolchains to build for.
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
env:
ctor_id: ${{vars.DOCKER_ID}}
ctor_url: https://github.com/${{github.repository}}
jobs:
# Build the base-feature intermediate images (cached and not shipped).
base:
uses: ./.github/workflows/docker_prime.yml
with:
id: ${{github.env.ctor_id}}
url: ${{github.env.ctor_url}}
features: '["base"]'
distros: ${{github.event.inputs.distros || vars.DOCKER_DISTROS}}
machines: ${{github.event.inputs.machines || vars.DOCKER_MACHINES}}
test: ${{contains(github.events.push.commits[0].message, '[ci test]')}}
# Build the full-feature intermediate images (cached and not shipped).
full:
uses: ./.github/workflows/docker_prime.yml
needs: [base]
with:
id: ${{github.env.ctor_id}}
url: ${{github.env.ctor_url}}
features: '["full"]'
distros: ${{github.event.inputs.distros || vars.DOCKER_DISTROS}}
machines: ${{github.event.inputs.machines || vars.DOCKER_MACHINES}}
test: ${{contains(github.events.push.commits[0].message, '[ci test]')}}
# Build the leaf images (shipped and not cached)
built:
needs: [base, full]
runs-on: ${{matrix.machine}}
strategy:
fail-fast: false
matrix:
feature: ${{fromJSON(github.event.inputs.features || vars.DOCKER_FEATURES)}}
distro: ${{fromJSON(github.event.inputs.distros || vars.DOCKER_DISTROS)}}
machine: ${{fromJSON(github.event.inputs.machines || vars.DOCKER_MACHINES)}}
toolchain: ${{fromJSON(github.event.inputs.toolchains || vars.DOCKER_TOOLCHAINS)}}
exclude:
- distro: alpine-3.17
toolchain: gcc-10 # n/a on distro version
- distro: alpine-3.17
toolchain: gcc-11 # n/a on distro version
- distro: alpine-3.17
toolchain: clang-14 # n/a on distro version
- distro: ubuntu-22.04
toolchain: clang-15 # n/a on distro version
- machine: arm64
toolchain: gcc-12 # build hangs
- machine: arm64
toolchain: gcc-11 # build hangs
- machine: arm64
toolchain: gcc-10 # build hangs
- machine: arm64
distro: alpine-3.17
toolchain: clang-14 # smoketest crash
- machine: arm64
distro: alpine-3.17
toolchain: clang-15 # smoketest crash
steps:
- uses: actions/checkout@v3
- name: build
env:
ctor_features: ${{matrix.feature}}
ctor_distros: ${{matrix.distro}}
ctor_machines: ${{matrix.machine}}
ctor_toolchains: ${{matrix.toolchain}}
ctor_test: ${{contains(github.events.push.commits[0].message, '[ci test]')}}
run: |
docker/build-and-push-images.sh