Skip to content

Bump setup-buildx-action to v3 #120

Bump setup-buildx-action to v3

Bump setup-buildx-action to v3 #120

Workflow file for this run

name: Build and publish docker images
env:
UBUNTU_16_04: "ubuntu:16.04@sha256:91bd29a464fdabfcf44e29e1f2a5f213c6dfa750b6290e40dd6998ac79da3c41"
UBUNTU_18_04: "ubuntu:18.04@sha256:40b84b75884ff39e4cac4bf62cb9678227b1fbf9dbe3f67ef2a6b073aa4bb529"
UBUNTU_20_04: "ubuntu:20.04@sha256:9c2004872a3a9fcec8cc757ad65c042de1dad4da27de4c70739a6e36402213e3"
UBUNTU_22_04: "ubuntu:22.04@sha256:35fb073f9e56eb84041b0745cb714eff0f7b225ea9e024f703cab56aaa5c7720"
UBUNTU_23_04: "ubuntu:23.04@sha256:2f18a21d414ad3c0a8eea08fec8f98d730c5c02ddb0d5fef9c60ca72ac53329c"
on:
push:
jobs:
clang:
strategy:
fail-fast: false
matrix:
version:
- { clang_version: "3.5", libcxx: "", build_libcxx: "./install-libcxx.sh 3.5 3.5.2 && ", container: $UBUNTU_16_04, std: "11" }
- { clang_version: "3.6", libcxx: "", build_libcxx: "./install-libcxx.sh 3.6 3.6.2 && ", container: $UBUNTU_16_04, std: "11 14" }
- { clang_version: "3.7", libcxx: "", build_libcxx: "./install-libcxx.sh 3.7 3.7.1 && ", container: $UBUNTU_16_04, std: "11 14" } # no sanitizers!
- { clang_version: "3.8", libcxx: "", build_libcxx: "./install-libcxx.sh 3.8 3.8.1 && ", container: $UBUNTU_16_04, std: "11 14" }
- { clang_version: "3.9", libcxx: "", build_libcxx: "./install-libcxx.sh 3.9 3.9.1 && ", container: $UBUNTU_16_04, std: "11 14" }
- { clang_version: "4.0", libcxx: "", build_libcxx: "./install-libcxx.sh 4.0 4.0.1 && ", container: $UBUNTU_18_04, std: "11 14" }
- { clang_version: "5.0", libcxx: "", build_libcxx: "./install-libcxx.sh 5.0 5.0.2 && ", container: $UBUNTU_18_04, std: "11 14 17" }
- { clang_version: "6.0", libcxx: "", build_libcxx: "./install-libcxx.sh 6.0 6.0.1 && ", container: $UBUNTU_18_04, std: "11 14 17" }
- { clang_version: "7", libcxx: "", build_libcxx: "./install-libcxx.sh 7 7.1.0 && ", container: $UBUNTU_18_04, std: "11 14 17" }
- { clang_version: "8", libcxx: "", build_libcxx: "./install-libcxx.sh 8 8.0.1 && ", container: $UBUNTU_20_04, std: "11 14 17" }
- { clang_version: "9", libcxx: "", build_libcxx: "./install-libcxx.sh 9 9.0.1 && ", container: $UBUNTU_20_04, std: "11 14 17" }
- { clang_version: "10", libcxx: "", build_libcxx: "./install-libcxx.sh 10 10.0.1 && ", container: $UBUNTU_20_04, std: "11 14 17 20" }
- { clang_version: "11", libcxx: "", build_libcxx: "./install-libcxx.sh 11 11.1.0 && ", container: $UBUNTU_20_04, std: "11 14 17 20" }
- { clang_version: "12", libcxx: "", build_libcxx: "./install-libcxx.sh 12 12.0.1 && ", container: $UBUNTU_22_04, std: "11 14 17 20" }
- { clang_version: "13", libcxx: "", build_libcxx: "./install-libcxx.sh 13 13.0.1 && ", container: $UBUNTU_22_04, std: "11 14 17 20" }
- { clang_version: "14", libcxx: "", build_libcxx: "./install-libcxx.sh 14 14.0.0 && ", container: $UBUNTU_22_04, std: "11 14 17 20" }
- { clang_version: "15", libcxx: "", build_libcxx: "./install-libcxx.sh 15 15.0.7 && ", container: $UBUNTU_22_04, std: "11 14 17 20" }
- { clang_version: "16", libcxx: "", build_libcxx: "", container: $UBUNTU_22_04, std: "11 14 17 20 23" }
- { clang_version: "17", libcxx: "", build_libcxx: "", container: $UBUNTU_22_04, std: "11 14 17 20 23" }
runs-on: ubuntu-latest
env:
IMAGE: ghcr.io/rollbear/clang:${{ matrix.version.clang_version }}
steps:
- name: Log-in
uses: docker/login-action@v3
with:
registry: ghcr.io
username: rollbear
password: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Build image
run: |
PUSH=""
[ ${GITHUB_REF_NAME} == "main" ] && PUSH="--push"
docker buildx build ${PUSH} \
--build-arg CONTAINER_ID=${{ matrix.version.container }} \
--build-arg LIBCXX=${{ matrix.version.libcxx }} \
--build-arg CLANG_VERSION=${{ matrix.version.clang_version }} \
--build-arg BUILD_LIBCXX="${{ matrix.version.build_libcxx }}" \
--build-arg CXX_STANDARDS="${{ matrix.version.std }}" \
--platform linux/amd64 --tag $IMAGE -f $GITHUB_WORKSPACE/clang/Dockerfile .
gcc:
strategy:
fail-fast: false
matrix:
version:
- { gcc_version: "4.8", container: $UBUNTU_18_04, std: "11" }
- { gcc_version: "4.9", container: $UBUNTU_16_04, std: "11 14" }
- { gcc_version: "5", container: $UBUNTU_18_04, std: "11 14 17" }
- { gcc_version: "6", container: $UBUNTU_18_04, std: "11 14 17" }
- { gcc_version: "7", container: $UBUNTU_20_04, std: "11 14 17" }
- { gcc_version: "8", container: $UBUNTU_20_04, std: "11 14 17" }
- { gcc_version: "9", container: $UBUNTU_22_04, std: "11 14 17" }
- { gcc_version: "10", container: $UBUNTU_22_04, std: "11 14 17 20" }
- { gcc_version: "11", container: $UBUNTU_22_04, std: "11 14 17 20" }
- { gcc_version: "12", container: $UBUNTU_22_04, std: "11 14 17 20 23" }
- { gcc_version: "13", container: $UBUNTU_23_04, std: "11 14 17 20 23" }
runs-on: ubuntu-latest
env:
IMAGE: ghcr.io/rollbear/gcc:${{ matrix.version.gcc_version }}
steps:
- name: Log-in
uses: docker/login-action@v2
with:
registry: ghcr.io
username: rollbear
password: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Build image
run: |
PUSH=""
[ ${GITHUB_REF_NAME} == "main" ] && PUSH="--push"
docker buildx build ${PUSH} \
--build-arg CONTAINER_ID=${{ matrix.version.container }} \
--build-arg GCC_VERSION=${{ matrix.version.gcc_version }} \
--build-arg CXX_STANDARDS="${{ matrix.version.std }}" \
--platform linux/amd64 --tag $IMAGE -f $GITHUB_WORKSPACE/gcc/Dockerfile .