mirror of
https://github.com/matrix-construct/construct
synced 2024-10-31 19:08:59 +01:00
98 lines
3.3 KiB
YAML
98 lines
3.3 KiB
YAML
#
|
|
# 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
|