mllwchrry
2026-03-03 14:45:28 +02:00
36 changed files with 347 additions and 229 deletions

View File

@@ -6,8 +6,7 @@ inputs:
required: true
scope:
description: 'A cached image scope'
required: false
default: ${{ runner.arch }}
required: true
command:
description: 'A command to run in a container'
required: true
@@ -45,7 +44,7 @@ runs:
$(echo '${{ toJSON(env) }}' | jq -r 'keys[] | "--env \(.) "') \
--volume ${{ github.workspace }}:${{ github.workspace }} \
--workdir ${{ github.workspace }} \
$(docker images -q | head -n1) \
${{ case(steps.main_builder.outcome == 'success', steps.main_builder.outputs.imageid, steps.retry_builder.outputs.imageid) }} \
bash -c "
git config --global --add safe.directory ${{ github.workspace }}
${{ inputs.command }}

View File

@@ -6,6 +6,10 @@ on:
- '**'
tags-ignore:
- '**'
schedule:
# Run on the default branch every Monday morning.
# This also warms the Docker caches after key rotation.
- cron: '22 2 * * 1'
concurrency:
group: ${{ github.event_name != 'pull_request' && github.run_id || github.ref }}
@@ -50,11 +54,16 @@ env:
SYMBOL_CHECK: 'yes'
# Compile and run the examples.
EXAMPLES: 'yes'
# Disable Docker build summary generation.
# See https://github.com/docker/build-push-action/blob/master/README.md#environment-variables.
DOCKER_BUILD_SUMMARY: false
jobs:
docker_cache:
name: "Build ${{ matrix.arch }} Docker image"
runs-on: ${{ matrix.runner }}
outputs:
cache_scope: ${{ steps.cache_timestamp.outputs.period }}
strategy:
fail-fast: false
@@ -66,6 +75,10 @@ jobs:
runner: ubuntu-24.04-arm
steps:
- name: Get cache validity period
id: cache_timestamp
run: echo "period=$((10#$(date +%V) / 4))" >> "$GITHUB_OUTPUT"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
@@ -77,8 +90,8 @@ jobs:
uses: docker/build-push-action@v6
with:
file: ./ci/linux-debian.Dockerfile
cache-from: type=gha,scope=${{ runner.arch }}
cache-to: type=gha,scope=${{ runner.arch }},mode=min
cache-from: type=gha,scope=${{ runner.arch }}-${{ steps.cache_timestamp.outputs.period }}
cache-to: type=gha,scope=${{ runner.arch }}-${{ steps.cache_timestamp.outputs.period }},mode=min
x86_64-debian:
name: "x86_64: Linux (Debian stable)"
@@ -124,6 +137,7 @@ jobs:
uses: ./.github/actions/run-in-docker-action
with:
dockerfile: ./ci/linux-debian.Dockerfile
scope: ${{ runner.arch }}-${{ needs.docker_cache.outputs.cache_scope }}
command: ./ci/ci.sh
- &PRINT_LOGS
@@ -723,6 +737,7 @@ jobs:
uses: ./.github/actions/run-in-docker-action
with:
dockerfile: ./ci/linux-debian.Dockerfile
scope: ${{ runner.arch }}-${{ needs.docker_cache.outputs.cache_scope }}
command: |
g++ -Werror include/*.h
clang -Werror -x c++-header include/*.h