Complete foundation delivery and record verified project status

This commit is contained in:
dingo
2026-09-19 09:16:26 -04:00
parent 8ab48d3a56
commit 9e412736d9
22 changed files with 581 additions and 128 deletions
+58 -29
View File
@@ -1,40 +1,69 @@
name: Build and publish AEvolution
name: Foundation
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
code: read
env:
UBUNTU_IMAGE: ${{ vars.UBUNTU_IMAGE || 'ubuntu:24.04' }}
jobs:
verify:
runs-on: ubuntu-22.04
checks:
runs-on: ${{ vars.CI_RUNNER_LABEL || 'ubuntu-22.04' }}
timeout-minutes: 40
strategy:
fail-fast: false
matrix:
suite: [checks, tsan]
steps:
- uses: actions/checkout@v4
- name: Install build dependencies
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends cmake ninja-build g++-14
- name: Configure release build
run: cmake --preset release -B build/ci
- name: Build
run: cmake --build build/ci --parallel 2
- name: Test
run: ctest --test-dir build/ci --output-on-failure --no-tests=error --timeout 120
- name: Checkout
uses: https://github.com/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Build and execute Linux checks
env:
CHECK_SUITE: ${{ matrix.suite }}
run: |
set -eu
docker version
docker build --progress=plain --file deploy/docker/Dockerfile \
--build-arg "UBUNTU_IMAGE=$UBUNTU_IMAGE" \
--target "ci-$CHECK_SUITE" .
publish:
if: gitea.event_name == 'push'
needs: verify
runs-on: ubuntu-22.04
image:
needs: [checks]
runs-on: ${{ vars.CI_RUNNER_LABEL || 'ubuntu-22.04' }}
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Check Docker
run: docker version
- uses: docker/login-action@v3
- name: Checkout
uses: https://github.com/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
registry: ${{ vars.HARBOR_HOST }}
username: ${{ secrets.HARBOR_USERNAME }}
password: ${{ secrets.HARBOR_PASSWORD }}
- uses: docker/build-push-action@v6
with:
context: .
file: deploy/docker/Dockerfile
push: true
tags: ${{ vars.HARBOR_HOST }}/${{ vars.HARBOR_PROJECT }}/aevolution:${{ gitea.sha }}
persist-credentials: false
- name: Build and smoke-test runtime
run: |
set -eu
image="aevolution-proof:${GITHUB_SHA}-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"
docker build --progress=plain --file deploy/docker/Dockerfile \
--build-arg "UBUNTU_IMAGE=$UBUNTU_IMAGE" \
--label "org.opencontainers.image.revision=$GITHUB_SHA" \
--label "org.opencontainers.image.source=https://git.aeternalisgames.com/dingo/AEvolution" \
--tag "$image" .
docker run --rm --network none --read-only --cap-drop ALL \
--security-opt no-new-privileges "$image" \
--seed 123456 --entities 8 --ticks 1000 --verify-replay
- name: Publish configured main build to Harbor
if: ${{ gitea.ref == 'refs/heads/main' && gitea.event_name != 'pull_request' && vars.HARBOR_PROJECT != '' }}
env:
HARBOR_PROJECT: ${{ vars.HARBOR_PROJECT }}
HARBOR_REPOSITORY: ${{ vars.HARBOR_REPOSITORY || 'aevolution' }}
HARBOR_USERNAME: ${{ secrets.HARBOR_USERNAME }}
HARBOR_PASSWORD: ${{ secrets.HARBOR_PASSWORD }}
run: bash tools/ci/publish-image.sh
- name: Explain unconfigured publishing
if: ${{ vars.HARBOR_PROJECT == '' }}
run: echo 'Image build/smoke only. Set HARBOR_PROJECT and Harbor robot secrets to enable main publishing. See deploy/README.md.'