2023-04-16 22:41:50 +02:00
|
|
|
#
|
|
|
|
# Build docker images
|
|
|
|
#
|
2023-03-31 23:52:30 +02:00
|
|
|
name: Docker Images
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
2023-04-18 23:15:29 +02:00
|
|
|
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.
|
2023-03-31 23:52:30 +02:00
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2023-04-16 22:41:50 +02:00
|
|
|
env:
|
2023-04-18 23:15:29 +02:00
|
|
|
ctor_id: ${{vars.DOCKER_ID}}
|
2023-04-16 22:41:50 +02:00
|
|
|
ctor_url: https://github.com/${{github.repository}}
|
|
|
|
|
2023-03-31 23:52:30 +02:00
|
|
|
jobs:
|
2023-04-16 22:41:50 +02:00
|
|
|
# Build the base-feature intermediate images (cached and not shipped).
|
2023-03-31 23:52:30 +02:00
|
|
|
base:
|
|
|
|
uses: ./.github/workflows/docker_prime.yml
|
|
|
|
with:
|
|
|
|
id: ${{github.env.ctor_id}}
|
|
|
|
url: ${{github.env.ctor_url}}
|
|
|
|
features: '["base"]'
|
2023-04-18 23:15:29 +02:00
|
|
|
distros: ${{github.event.inputs.distros || vars.DOCKER_DISTROS}}
|
|
|
|
machines: ${{github.event.inputs.machines || vars.DOCKER_MACHINES}}
|
2023-03-31 23:52:30 +02:00
|
|
|
test: ${{contains(github.events.push.commits[0].message, '[ci test]')}}
|
|
|
|
|
2023-04-16 22:41:50 +02:00
|
|
|
# Build the full-feature intermediate images (cached and not shipped).
|
2023-03-31 23:52:30 +02:00
|
|
|
full:
|
|
|
|
uses: ./.github/workflows/docker_prime.yml
|
|
|
|
needs: [base]
|
|
|
|
with:
|
|
|
|
id: ${{github.env.ctor_id}}
|
|
|
|
url: ${{github.env.ctor_url}}
|
|
|
|
features: '["full"]'
|
2023-04-18 23:15:29 +02:00
|
|
|
distros: ${{github.event.inputs.distros || vars.DOCKER_DISTROS}}
|
|
|
|
machines: ${{github.event.inputs.machines || vars.DOCKER_MACHINES}}
|
2023-03-31 23:52:30 +02:00
|
|
|
test: ${{contains(github.events.push.commits[0].message, '[ci test]')}}
|
|
|
|
|
2023-04-16 22:41:50 +02:00
|
|
|
# Build the leaf images (shipped and not cached)
|
2023-03-31 23:52:30 +02:00
|
|
|
built:
|
|
|
|
needs: [base, full]
|
|
|
|
runs-on: ${{matrix.machine}}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2023-04-18 23:15:29 +02:00
|
|
|
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)}}
|
2023-03-31 23:52:30 +02:00
|
|
|
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
|