Skip to content

v2.0.0-beta.1

v2.0.0-beta.1 #55

Workflow file for this run

name: devel
on:
pull_request:
branches:
- master
paths:
- docker/**
- .github/workflows/*.yml
push:
branches:
- master
paths:
- docker/**
- .github/workflows/*.yml
env:
DOCKER_IMAGE: ghcr.io/${{ github.repository }}
jobs:
docker-amd64:
name: Docker test (amd64)
runs-on: ubuntu-22.04
steps:
-
name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
# https://github.com/actions/runner-images/issues/2840
- name: Free disk space
run: |
sudo rm -rf /usr/share/dotnet
sudo ls -lah /usr/local/lib/android/sdk
sudo du -sh /usr/local/lib/android/sdk/*
-
name: Login to ghcr.io
uses: docker/login-action@v3
# if: github.ref == 'refs/heads/main'
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.DOCKER_IMAGE }}
flavor: |
latest=false
tags: |
type=raw,value=devel-amd64
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host
-
name: Build image
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64
file: docker/amd64/base/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
VERSION=0.0.0
push: false
load: true
cache-from: type=gha,scope=devel-amd64
cache-to: type=gha,scope=devel-amd64,mode=max
-
name: Inspect image
run: |
docker image inspect ${{ env.DOCKER_IMAGE }}:${{ steps.meta.outputs.version }}
-
name: Check manifest
# if: github.ref == 'refs/heads/master'
run: |
docker buildx imagetools inspect ${{ env.DOCKER_IMAGE }}:${{ steps.meta.outputs.version }}
-
name: Run tests
uses: addnab/docker-run-action@v3
with:
image: "${{ env.DOCKER_IMAGE }}:${{ steps.meta.outputs.version }}"
shell: bash
options: -v ${{ github.workspace }}:/root/src
run: |
set -eux
cat /etc/debian_version
uname -a
make test-app
-
name: Build image & push
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64
file: docker/amd64/base/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
VERSION=0.0.0
# push: ${{ github.ref == 'refs/heads/master' }}
push: true
cache-from: type=gha,scope=devel-amd64
cache-to: type=gha,scope=devel-amd64,mode=max
## Docker AMD64 libs
-
name: Docker meta (libs)
id: meta2
uses: docker/metadata-action@v5
with:
images: ${{ env.DOCKER_IMAGE }}
flavor: |
latest=false
tags: |
type=raw,value=devel-libs-amd64
-
name: Set up Docker Buildx (libs)
uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host
-
name: Build image (libs)
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64
file: docker/amd64/libs/Dockerfile
tags: ${{ steps.meta2.outputs.tags }}
labels: ${{ steps.meta2.outputs.labels }}
build-args: |
VERSION=0.0.0
push: false
load: true
cache-from: |
type=gha,scope=devel-libs-amd64
type=gha,scope=devel-amd64
cache-to: type=gha,scope=devel-libs-amd64,mode=max
-
name: Inspect image (libs)
run: |
docker image inspect ${{ env.DOCKER_IMAGE }}:${{ steps.meta2.outputs.version }}
-
name: Check manifest (libs)
# if: github.ref == 'refs/heads/master'
run: |
docker buildx imagetools inspect ${{ env.DOCKER_IMAGE }}:${{ steps.meta2.outputs.version }}
-
name: Run tests (libs)
uses: addnab/docker-run-action@v3
with:
image: "${{ env.DOCKER_IMAGE }}:${{ steps.meta2.outputs.version }}"
shell: bash
options: -v ${{ github.workspace }}:/root/src
run: |
set -eux
cat /etc/debian_version
uname -a
make test-app
make test-zlib
make test-openssl
-
name: Build image & push (libs)
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64
file: docker/amd64/libs/Dockerfile
tags: ${{ steps.meta2.outputs.tags }}
labels: ${{ steps.meta2.outputs.labels }}
build-args: |
VERSION=0.0.0
# push: ${{ github.ref == 'refs/heads/master' }}
push: true
cache-from: |
type=gha,scope=devel-libs-amd64
type=gha,scope=devel-amd64
cache-to: type=gha,scope=devel-libs-amd64,mode=max
# docker-arm64:
# name: Docker test (arm64)
# runs-on: ubuntu-22.04-arm
# services:
# registry:
# image: registry:2
# ports:
# - 5000:5000
# steps:
# -
# name: Checkout
# uses: actions/checkout@v4
# with:
# fetch-depth: 1
# # https://github.com/actions/runner-images/issues/2840
# - name: Free disk space
# run: |
# sudo rm -rf /opt/ghc
# sudo rm -rf /usr/share/dotnet
# sudo rm -rf /usr/local/lib/android
# sudo rm -rf "/usr/local/share/boost"
# -
# name: Cache Docker layers
# uses: actions/cache@v4
# with:
# path: /tmp/.buildx-cache
# key: rust-linux-darwin-builder-arm64-buildx-${{ github.sha }}
# restore-keys: |
# rust-linux-darwin-builder-arm64-buildx-
# -
# name: Set up QEMU
# uses: docker/setup-qemu-action@v3
# -
# name: Docker meta
# id: meta
# uses: docker/metadata-action@v5
# with:
# images: ${{ env.DOCKER_IMAGE }}
# flavor: |
# latest=false
# suffix=-arm64
# tags: |
# type=schedule
# type=ref,event=branch
# type=ref,event=pr
# type=semver,pattern={{version}}
# type=semver,pattern={{major}}.{{minor}}
# type=semver,pattern={{major}}
# type=sha
# type=raw,value=devel,suffix=-arm64
# -
# name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v3
# with:
# driver-opts: network=host
# -
# name: Build and export to Docker client
# uses: docker/build-push-action@v6
# with:
# context: .
# platforms: linux/arm64
# file: docker/arm64/base/Dockerfile
# load: true
# tags: ${{ steps.meta.outputs.tags }}
# labels: ${{ steps.meta.outputs.labels }}
# build-args: |
# VERSION=0.0.0
# push: ${{ github.event_name != 'pull_request' }}
# cache-from: type=local,src=/tmp/.buildx-cache
# cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# -
# name: Inspect image
# run: |
# docker image inspect ${{ env.DOCKER_IMAGE }}:${{ steps.meta.outputs.version }}
# -
# name: Check manifest
# if: github.event_name != 'pull_request'
# run: |
# docker buildx imagetools inspect ${{ env.DOCKER_IMAGE }}:${{ steps.meta.outputs.version }}
# -
# name: Run tests
# uses: addnab/docker-run-action@v3
# with:
# image: "${{ env.DOCKER_IMAGE }}:${{ steps.meta.outputs.version }}"
# shell: bash
# options: -v ${{ github.workspace }}:/root/src
# run: |
# set -eux
# cat /etc/debian_version
# uname -a
# make test-app
# -
# # Temp fix
# # https://github.com/docker/build-push-action/issues/252
# # https://github.com/moby/buildkit/issues/1896
# name: Move cache
# run: |
# rm -rf /tmp/.buildx-cache
# mv /tmp/.buildx-cache-new /tmp/.buildx-cache
# docker-amd64-libs:
# needs:
# - docker-amd64
# name: Docker test libs (amd64)
# runs-on: ubuntu-22.04
# services:
# registry:
# image: registry:2
# ports:
# - 5000:5000
# steps:
# -
# name: Checkout
# uses: actions/checkout@v4
# with:
# fetch-depth: 1
# # https://github.com/actions/runner-images/issues/2840
# - name: Free disk space
# run: |
# sudo rm -rf /opt/ghc
# sudo rm -rf /usr/share/dotnet
# sudo rm -rf /usr/local/lib/android
# sudo rm -rf "/usr/local/share/boost"
# -
# name: Cache Docker layers
# uses: actions/cache@v4
# with:
# path: /tmp/.buildx-cache
# key: rust-linux-darwin-builder-amd64-libs-buildx-${{ github.sha }}
# restore-keys: |
# rust-linux-darwin-builder-amd64-libs-buildx-
# -
# name: Set up QEMU
# uses: docker/setup-qemu-action@v3
# -
# name: Docker meta
# id: meta
# uses: docker/metadata-action@v5
# with:
# images: ${{ env.DOCKER_IMAGE }}
# flavor: |
# latest=false
# suffix=-amd64-libs
# tags: |
# type=schedule
# type=ref,event=branch
# type=ref,event=pr
# type=semver,pattern={{version}}
# type=semver,pattern={{major}}.{{minor}}
# type=semver,pattern={{major}}
# type=sha
# -
# name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v3
# with:
# driver-opts: network=host
# -
# name: Build and export to Docker client
# uses: docker/build-push-action@v6
# with:
# context: .
# platforms: linux/amd64
# file: docker/amd64/libs/Dockerfile
# load: true
# tags: ${{ steps.meta.outputs.tags }}
# labels: ${{ steps.meta.outputs.labels }}
# build-args: |
# VERSION=0.0.0
# BASE_IMAGE=${{ env.DOCKER_IMAGE }}:devel-amd64
# push: ${{ github.event_name != 'pull_request' }}
# cache-from: type=local,src=/tmp/.buildx-cache
# cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# -
# name: Inspect image
# run: |
# docker image inspect ${{ env.DOCKER_IMAGE }}:${{ steps.meta.outputs.version }}
# -
# name: Check manifest
# if: github.event_name != 'pull_request'
# run: |
# docker buildx imagetools inspect ${{ env.DOCKER_IMAGE }}:${{ steps.meta.outputs.version }}
# -
# name: Run tests
# uses: addnab/docker-run-action@v3
# with:
# image: "${{ env.DOCKER_IMAGE }}:${{ steps.meta.outputs.version }}"
# shell: bash
# options: -v ${{ github.workspace }}:/root/src
# run: |
# set -eux
# cat /etc/debian_version
# uname -a
# make test-app
# make test-zlib
# make test-openssl
# -
# # Temp fix
# # https://github.com/docker/build-push-action/issues/252
# # https://github.com/moby/buildkit/issues/1896
# name: Move cache
# run: |
# rm -rf /tmp/.buildx-cache
# mv /tmp/.buildx-cache-new /tmp/.buildx-cache
# docker-arm64-libs:
# needs:
# - docker-arm64
# name: Docker test libs (arm64)
# runs-on: ubuntu-22.04-arm
# services:
# registry:
# image: registry:2
# ports:
# - 5000:5000
# steps:
# -
# name: Checkout
# uses: actions/checkout@v4
# with:
# fetch-depth: 1
# # https://github.com/actions/runner-images/issues/2840
# - name: Free disk space
# run: |
# sudo rm -rf /opt/ghc
# sudo rm -rf /usr/share/dotnet
# sudo rm -rf /usr/local/lib/android
# sudo rm -rf "/usr/local/share/boost"
# -
# name: Cache Docker layers
# uses: actions/cache@v4
# with:
# path: /tmp/.buildx-cache
# key: rust-linux-darwin-builder-arm64-libs-buildx-${{ github.sha }}
# restore-keys: |
# rust-linux-darwin-builder-arm64-libs-buildx-
# -
# name: Set up QEMU
# uses: docker/setup-qemu-action@v3
# -
# name: Docker meta
# id: meta
# uses: docker/metadata-action@v5
# with:
# images: ${{ env.DOCKER_IMAGE }}
# flavor: |
# latest=false
# suffix=-arm64-libs
# tags: |
# type=schedule
# type=ref,event=branch
# type=ref,event=pr
# type=semver,pattern={{version}}
# type=semver,pattern={{major}}.{{minor}}
# type=semver,pattern={{major}}
# type=sha
# -
# name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v3
# with:
# driver-opts: network=host
# -
# name: Build and export to Docker client
# uses: docker/build-push-action@v6
# with:
# context: .
# platforms: linux/arm64
# file: docker/arm64/libs/Dockerfile
# load: true
# tags: ${{ steps.meta.outputs.tags }}
# labels: ${{ steps.meta.outputs.labels }}
# build-args: |
# VERSION=0.0.0
# BASE_IMAGE=${{ env.DOCKER_IMAGE }}:devel-arm64
# push: ${{ github.event_name != 'pull_request' }}
# cache-from: type=local,src=/tmp/.buildx-cache
# cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# -
# name: Inspect image
# run: |
# docker image inspect ${{ env.DOCKER_IMAGE }}:${{ steps.meta.outputs.version }}
# -
# name: Check manifest
# if: github.event_name != 'pull_request'
# run: |
# docker buildx imagetools inspect ${{ env.DOCKER_IMAGE }}:${{ steps.meta.outputs.version }}
# -
# name: Run tests
# uses: addnab/docker-run-action@v3
# with:
# image: "${{ env.DOCKER_IMAGE }}:${{ steps.meta.outputs.version }}"
# shell: bash
# options: -v ${{ github.workspace }}:/root/src
# run: |
# set -eux
# cat /etc/debian_version
# uname -a
# make test-app
# make test-zlib
# make test-openssl
# -
# # Temp fix
# # https://github.com/docker/build-push-action/issues/252
# # https://github.com/moby/buildkit/issues/1896
# name: Move cache
# run: |
# rm -rf /tmp/.buildx-cache
# mv /tmp/.buildx-cache-new /tmp/.buildx-cache