Files
aego/.github/workflows/native-authoring-targeted-6354.yml
T
sanspie 0f86cb36b6
native-authoring-targeted-6354 / native-authoring (push) Successful in 56m22s
native-authoring-targeted-6354 / build (amd64, linux, ubuntu-24.04) (push) Successful in 12m42s
ci: run targeted native authoring for 6354e886
2026-11-14 17:41:26 +03:00

221 lines
9.7 KiB
YAML

name: native-authoring-targeted-6354
on:
push:
branches: [ci/native-authoring-6354e886-471]
permissions:
contents: read
env:
AEGO_TARGET_SHA: 6354e886230cb75dbfdb83aabecc8efce06cafbf
GLSLANG_APT_VERSION: 15.1.0-2~ubuntu0.24.04.2
SDL_AUDIO_DRIVER: dummy
SDL_AUDIODRIVER: dummy
LINUX_PKGS: >-
build-essential cmake ninja-build pkg-config openssl
libgl1-mesa-dev libegl1-mesa-dev libgles2-mesa-dev
libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev libxss-dev libxtst-dev libxkbcommon-dev
libwayland-dev wayland-protocols libdecor-0-dev
libasound2-dev libpulse-dev libdrm-dev libgbm-dev libudev-dev libdbus-1-dev libibus-1.0-dev
jobs:
native-authoring:
if: github.server_url != 'https://github.com'
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
ref: 6354e886230cb75dbfdb83aabecc8efce06cafbf
- name: Verify target commit
run: test "$(git rev-parse HEAD)" = "$AEGO_TARGET_SHA"
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- uses: actions/setup-node@v4
with:
node-version: "24"
- name: system packages
run: sudo apt-get update && sudo apt-get install -y $LINUX_PKGS "glslang-tools=$GLSLANG_APT_VERSION" && bash tools/check-glslang.sh
- uses: actions/cache@v4
continue-on-error: true
with:
path: .cache/native
key: native-linux_amd64-${{ hashFiles('third_party/sdl/version.txt', 'tools/bootstrap-native.sh') }}
- run: bash tools/bootstrap-native.sh
- name: Install isolated Asset Studio browser test environment
run: |
sudo apt-get install -y python3-venv xvfb xauth xdotool
python3 -m venv "$RUNNER_TEMP/aego-artstudio-python"
"$RUNNER_TEMP/aego-artstudio-python/bin/pip" install 'playwright==1.64.1'
PLAYWRIGHT_BROWSERS_PATH="$RUNNER_TEMP/aego-artstudio-browsers" \
"$RUNNER_TEMP/aego-artstudio-python/bin/python" -m playwright install --with-deps chromium firefox
- name: Build and pin target Studio snapshot
id: snapshot_pin
env:
PLAYWRIGHT_BROWSERS_PATH: ${{ runner.temp }}/aego-artstudio-browsers
run: |
set -euo pipefail
export ARTSTUDIO_PYTHON="$RUNNER_TEMP/aego-artstudio-python/bin/python"
export ARTSTUDIO_SNAPSHOT_DIR="$RUNNER_TEMP/aego-artstudio-evidence"
bash tools/ci/artstudio_snapshot_e2e.sh
[[ "$(cat "$ARTSTUDIO_SNAPSHOT_DIR/core.exit")" == 0 ]]
[[ "$(cat "$ARTSTUDIO_SNAPSHOT_DIR/head.txt")" == "$AEGO_TARGET_SHA" ]]
sha="$(cat "$ARTSTUDIO_SNAPSHOT_DIR/manifest.sha256")"
[[ "$sha" =~ ^[0-9a-f]{64}$ ]]
printf 'sha256=%s\n' "$sha" >> "$GITHUB_OUTPUT"
- name: Preserve targeted Studio snapshot evidence
if: ${{ always() }}
uses: https://github.com/ChristopherHX/gitea-upload-artifact@81f940d004763f986ba3582c007fd842dd5cb0d7
with:
name: native-target-snapshot-${{ github.run_id }}-${{ github.run_attempt }}
if-no-files-found: warn
retention-days: 14
path: |
${{ runner.temp }}/aego-artstudio-evidence/*.log
${{ runner.temp }}/aego-artstudio-evidence/*.exit
${{ runner.temp }}/aego-artstudio-evidence/*.txt
${{ runner.temp }}/aego-artstudio-evidence/*.json
${{ runner.temp }}/aego-artstudio-evidence/*.sha256
${{ runner.temp }}/aego-artstudio-evidence/artifact/**
${{ runner.temp }}/aego-artstudio-evidence/chromium-browser/**
${{ runner.temp }}/aego-artstudio-evidence/firefox-browser/**
${{ runner.temp }}/aego-artstudio-evidence/chromium-gpu-browser/**
${{ runner.temp }}/aego-artstudio-evidence/firefox-gpu-browser/**
${{ runner.temp }}/aego-artstudio-evidence/parity-replay/*.json
- name: Verify Studio snapshot before native authoring
env:
EXPECTED_STUDIO_MANIFEST: ${{ steps.snapshot_pin.outputs.sha256 }}
run: |
set -euo pipefail
dir="$RUNNER_TEMP/aego-artstudio-evidence"
[[ "$EXPECTED_STUDIO_MANIFEST" =~ ^[0-9a-f]{64}$ ]]
[[ "$(cat "$dir/manifest.sha256")" == "$EXPECTED_STUDIO_MANIFEST" ]]
[[ "$(cat "$dir/head.txt")" == "$AEGO_TARGET_SHA" && "$(git rev-parse HEAD)" == "$AEGO_TARGET_SHA" ]]
python3 -c 'import json,sys; m=json.load(open(sys.argv[1], encoding="utf-8")); sys.exit(0 if m.get("commit") == sys.argv[2] and m.get("release") is False else "snapshot identity mismatch")' "$dir/artifact/manifest.json" "$AEGO_TARGET_SHA"
go run ./tools/artstudio/release verify -dir "$dir/artifact" -sha256 "$EXPECTED_STUDIO_MANIFEST"
go run ./tools/artstudio/release check-source -root "$PWD" -dir "$dir/artifact"
- name: Native authoring and installed Linux protocol
env:
PLAYWRIGHT_BROWSERS_PATH: ${{ runner.temp }}/aego-artstudio-browsers
run: |
set -euo pipefail
mkdir -p "$RUNNER_TEMP/aego-full-ci"
run_gate() {
local name="$1"; shift
set +e
"$@" >"$RUNNER_TEMP/aego-full-ci/$name.log" 2>&1
local code=$?
set -e
printf '%s\n' "$code" >"$RUNNER_TEMP/aego-full-ci/$name.exit"
tail -n 100 "$RUNNER_TEMP/aego-full-ci/$name.log"
return "$code"
}
run_gate native-user-scenario env SDL_VIDEODRIVER=offscreen \
AEGO_NATIVE_SCENARIO_EVIDENCE="$RUNNER_TEMP/aego-full-ci/native-sdl" \
bash tools/stage125-check.sh artstudio-native
run_gate file-interoperability env SDL_VIDEODRIVER=offscreen \
"$RUNNER_TEMP/aego-artstudio-python/bin/python" tools/artstudio/release/tests/file_interop_e2e.py \
--artifact "$RUNNER_TEMP/aego-artstudio-evidence/artifact" \
--native-evidence "$RUNNER_TEMP/aego-full-ci/native-sdl" \
--evidence "$RUNNER_TEMP/aego-full-ci/file-interop" \
--app-url http://127.0.0.1:8097/ --serve-artifact
run_gate remote-examples make remote-examples-check XVFB= \
REMOTE_EXAMPLES_OUT="$RUNNER_TEMP/aego-full-ci/remote-protocol"
- name: Preserve native authoring evidence
if: ${{ always() }}
uses: https://github.com/ChristopherHX/gitea-upload-artifact@81f940d004763f986ba3582c007fd842dd5cb0d7
with:
name: aego-native-authoring-${{ github.run_id }}-${{ github.run_attempt }}
if-no-files-found: warn
retention-days: 14
path: ${{ runner.temp }}/aego-full-ci/**
- name: packaging tools
run: sudo apt-get install -y nsis squashfs-tools
- name: installer dry run
run: make nsis-check
build:
# Run after the other jobs even on failure, without overlapping heavy work.
needs: [native-authoring]
if: ${{ always() && github.server_url != 'https://github.com' }}
strategy:
fail-fast: false
matrix:
include:
- { os: ubuntu-24.04, goos: linux, goarch: amd64 }
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
env:
CGO_ENABLED: "1"
steps:
- uses: actions/checkout@v4
with:
ref: 6354e886230cb75dbfdb83aabecc8efce06cafbf
- name: Verify target commit
run: test "$(git rev-parse HEAD)" = "$AEGO_TARGET_SHA"
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: linux packages
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y $LINUX_PKGS "glslang-tools=$GLSLANG_APT_VERSION" && bash tools/check-glslang.sh
- name: msys2
if: runner.os == 'Windows'
id: msys2
uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: false
install: mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-ninja
- name: mingw path
if: runner.os == 'Windows'
run: echo "${{ steps.msys2.outputs.msys2-location }}\ucrt64\bin" >> "$GITHUB_PATH"
- name: macos tools
if: runner.os == 'macOS'
run: brew list ninja >/dev/null 2>&1 || brew install ninja
- uses: actions/cache@v4
continue-on-error: true
with:
path: .cache/native
key: native-${{ matrix.goos }}_${{ matrix.goarch }}-${{ hashFiles('third_party/sdl/version.txt', 'tools/bootstrap-native.sh') }}
- name: bootstrap native
run: bash tools/bootstrap-native.sh
- name: build
run: go build ./...
- name: test
run: go test ./...
- name: test without native backends
run: go test -tags aego_nonative $(go list ./... | grep -v -e '/platform/sdl$' -e '/gpu/gl33$' -e '/gpu/gl33/gl$')
- name: gl tests (offscreen, llvmpipe)
if: runner.os == 'Linux'
env:
SDL_VIDEODRIVER: offscreen
LIBGL_ALWAYS_SOFTWARE: "1"
GALLIUM_DRIVER: llvmpipe
run: go test -tags aego_gltest ./tests/gl/
- name: golden
if: runner.os == 'Linux'
env:
SDL_VIDEODRIVER: offscreen
LIBGL_ALWAYS_SOFTWARE: "1"
GALLIUM_DRIVER: llvmpipe
run: go test -tags aego_golden ./tests/golden/...
- name: headless smoke
run: go run ./cmd/sandbox --demo headless --frames 600 --strict-allocs
- name: build the cli
run: go build -o /tmp/aego ./cmd/aego
- name: cli smoke
run: |
/tmp/aego new /tmp/clitest
/tmp/aego import /tmp/clitest
/tmp/aego check /tmp/clitest
/tmp/aego run /tmp/clitest --headless --frames 60
- name: example project
run: |
/tmp/aego check examples/native-rotator
/tmp/aego run examples/native-rotator --headless --frames 60