Files
aego/.github/workflows/ci.yml
T
sanspie 132ddeff70
ci / checks (push) Successful in 8m39s
ci / build (amd64, linux, ubuntu-24.04) (push) Successful in 12m19s
ci-platforms / darwin amd64 smoke (push) Skipped
ci-platforms / windows amd64 smoke (push) Skipped
ci-platforms / darwin arm64 smoke (push) Skipped
ci / release (push) Successful in 8m54s
Stage 12a1: shader ABI, shader import and material runtime (D367, D368, D380, D381, D393)
Shader ABI 1: ub0 frame (16 B), ub1 view (112 B), ub2 material, ub3 mesh
draw; tex0 main, tex1 reserved, tex2-tex7 user; @instance lanes in
vertex slot 1 at locations 4-7, 64 bytes a sprite. The engine sprite,
sprite3d, debug and mesh shaders move to it, and engine includes
sprite, color, noise and lighting ship under engine/res/shaders/include.

.aeshader files import into an AESH artifact with every variant in both
GLSL dialects and a line map; errors are SHD001-SHD009 mapped back to the
source file and line, also for driver compile logs. A failed reimport
keeps the last good shader. .aemat materials (MAT001-MAT004) reference a
shader and textures and are reimported when their shader changes. The
material cache in render/material binds a material with no allocations,
retires replaced shaders, moves materials to a reimported shader in
place (D393) and re-uploads every material after a WebGL context
restore. make ci requires glslangValidator (D367).

web-bench, baseline retaken on nodea in both GPU modes, the same numbers
in swiftshader and hardware, Chromium and Firefox:
- the frame UBO is uploaded once a frame: buffer uploads 2 -> 3 a frame;
- the view UBO is 112 bytes instead of 64: buffer KB 0.372 -> 0.434
  a frame (+16 B frame, +48 B view);
- fewer SetUniformBuffer calls a batch: the sprite pass no longer binds
  the view per batch, frame and view are bound once per view; the GL
  state cache already deduped that bind, so WebGL calls go 50.49 ->
  52.49 a frame with the two new frame-UBO calls, draws 3.31 unchanged;
- buffer KB from lanes is unchanged: the demo has no @instance material.
Frame time and Go bytes in the engine frame (357 -> 342) do not regress.

wasm size, gzip: playground 6.46 -> 6.50 MB, try 6.98 -> 7.01 MB, web
runtime 6.05 -> 6.07 MB (total 27.27 -> 27.46, 29.54 -> 29.67,
25.56 -> 25.65 MB).
2026-10-28 01:23:11 +03:00

159 lines
5.4 KiB
YAML

name: ci
on:
push:
branches: [master]
tags: ["v*"]
pull_request:
permissions:
contents: read
env:
LINUX_PKGS: >-
build-essential cmake ninja-build pkg-config
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
glslang-tools
jobs:
checks:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: system packages
run: sudo apt-get update && sudo apt-get install -y $LINUX_PKGS
- 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
- run: go vet -cgocall=false -unsafeptr=false $(go list ./... | grep -v '/gpu/gl33/gl$')
- run: go vet ./platform/sdl
- run: make lint
- run: make depcheck
- name: packaging tools
run: sudo apt-get install -y nsis squashfs-tools
- name: installer dry run
run: make nsis-check
build:
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
- 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
- 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
release:
needs: [checks, build]
if: github.event_name == 'push'
runs-on: ubuntu-24.04
permissions:
contents: write
env:
CGO_ENABLED: "1"
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# the key that signs release.json and the public half the binaries trust; without them no release.json is published (D362)
AEGO_RELEASE_KEY: ${{ secrets.AEGO_RELEASE_KEY }}
AEGO_UPDATE_KEY: ${{ vars.AEGO_UPDATE_KEY || secrets.AEGO_UPDATE_KEY }}
GITEA_API: ${{ github.server_url }}/api/v1/repos/${{ github.repository }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: linux packages
run: sudo apt-get update && sudo apt-get install -y $LINUX_PKGS
- 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: windows tools
run: sudo apt-get install -y mingw-w64 nsis zip
- name: publish
env:
REQUIRE_WINDOWS: "1"
GITEA_RESOLVE: git.akarpov.ru:443:79.142.92.250
run: |
case "$GITHUB_REF" in
refs/tags/v*) sh tools/release/release.sh "$GITHUB_REF_NAME" ;;
refs/heads/master) sh tools/release/release.sh nightly ;;
esac