Consolidate Toolkit CI setup and gate benchmark publication #1
@@ -1,8 +1,6 @@
|
||||
name: public-benchmark-pages
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '*/15 * * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
|
||||
@@ -7,7 +7,7 @@ on:
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: alkane-ci
|
||||
runs-on: alkane-fast
|
||||
permissions:
|
||||
actions: read
|
||||
contents: write
|
||||
|
||||
@@ -26,10 +26,13 @@ jobs:
|
||||
run: |
|
||||
apt-get update -qq
|
||||
apt-get install -y -qq --no-install-recommends libssl-dev pkg-config ca-certificates
|
||||
- name: Compute wxWidgets cache key
|
||||
id: wx-key
|
||||
run: bash ci/wx-cache-key.sh
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: /root/.cache/wx-3.3.3-linux
|
||||
key: wx-3.3.3-${{ runner.os }}-${{ hashFiles('thirdparty/wx-rs/VERSION') }}
|
||||
key: ${{ steps.wx-key.outputs.key }}
|
||||
- name: Build wxWidgets
|
||||
run: |
|
||||
if [ ! -x "$WX_PREFIX/bin/wx-config" ]; then
|
||||
|
||||
@@ -49,14 +49,18 @@ jobs:
|
||||
run: |
|
||||
apt-get update -qq
|
||||
apt-get install -y -qq --no-install-recommends \
|
||||
libssl-dev pkg-config ca-certificates >/dev/null
|
||||
echo "libssl-dev + pkg-config installed (openssl-sys needs them)"
|
||||
libssl-dev pkg-config ca-certificates openssh-client \
|
||||
xvfb xauth dbus-x11 fonts-dejavu-core >/dev/null
|
||||
|
||||
- name: Compute wxWidgets cache key
|
||||
id: wx-key
|
||||
run: bash ci/wx-cache-key.sh
|
||||
|
||||
- name: Cache vendored wxWidgets build
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /root/.cache/wx-3.3.3-linux
|
||||
key: wx-3.3.3-${{ runner.os }}-${{ hashFiles('thirdparty/wx-rs/VERSION') }}
|
||||
key: ${{ steps.wx-key.outputs.key }}
|
||||
|
||||
- name: Build wxWidgets (once, then cached)
|
||||
run: |
|
||||
@@ -103,19 +107,8 @@ jobs:
|
||||
python3 ci/bench-badge.py --current bench-current.txt \
|
||||
--baseline badges/bench-baseline.json --no-write
|
||||
|
||||
- name: Record private benchmark history
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
run: python3 ci/bench_history.py publish
|
||||
|
||||
- uses: https://github.com/ChristopherHX/gitea-upload-artifact@81f940d004763f986ba3582c007fd842dd5cb0d7
|
||||
with:
|
||||
name: alkane-toolkit-benchmark-site-preview
|
||||
path: bench-site/index.html
|
||||
- name: Headless UI self-test
|
||||
run: |
|
||||
apt-get update -qq && apt-get install -y -qq --no-install-recommends \
|
||||
xvfb xauth dbus-x11 fonts-dejavu-core >/dev/null
|
||||
BIN=target/release/alkane-toolkit
|
||||
xvfb-run -a env GDK_BACKEND=x11 ALKANE_SELFTEST=1 "$BIN"
|
||||
|
||||
@@ -180,6 +173,21 @@ jobs:
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
run: python3 ci/publish-metrics.py
|
||||
|
||||
- name: Record private benchmark history
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
run: python3 ci/bench_history.py publish
|
||||
|
||||
- uses: https://github.com/ChristopherHX/gitea-upload-artifact@81f940d004763f986ba3582c007fd842dd5cb0d7
|
||||
with:
|
||||
name: alkane-toolkit-benchmark-site-preview
|
||||
path: bench-site/index.html
|
||||
- name: Publish public benchmark page
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
BENCH_PAGES_DEPLOY_KEY: ${{ secrets.BENCH_PAGES_DEPLOY_KEY }}
|
||||
run: python3 ci/publish-bench-pages.py toolkit
|
||||
|
||||
- name: Package artifact
|
||||
if: steps.ver.outputs.release == 'true'
|
||||
id: pkg
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
name: source
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [next]
|
||||
push:
|
||||
branches-ignore: [main, next]
|
||||
|
||||
concurrency:
|
||||
group: alkane-toolkit-source-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: alkane-fast
|
||||
env:
|
||||
CARGO_BUILD_JOBS: 2
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Source checks
|
||||
run: cargo test -p alkane-artifacts -p alkane-flash -p alkane-cli --offline
|
||||
- name: Clean generated Toolkit build
|
||||
if: always()
|
||||
run: python3 ci/cleanup-generated.py
|
||||
@@ -1,20 +1,16 @@
|
||||
name: verify
|
||||
|
||||
# Pre-merge quality gate: clippy + build + tests + microbenchmarks + the headless
|
||||
# UI self-test, plus a best-effort dependency audit. Runs on pull requests and on
|
||||
# pushes to any branch EXCEPT main (main is gated by release.yml, which repeats
|
||||
# these checks before it cuts a release -- so no work is duplicated on main).
|
||||
# Full quality gate for pull requests to main.
|
||||
on:
|
||||
pull_request:
|
||||
branches-ignore: [next]
|
||||
push:
|
||||
branches-ignore: [main, next]
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
verify:
|
||||
runs-on: alkane-ci
|
||||
runs-on: alkane-verify
|
||||
env:
|
||||
CARGO_TARGET_DIR: target
|
||||
CARGO_BUILD_JOBS: 2
|
||||
WX_PREFIX: /root/.cache/wx-3.3.3-linux
|
||||
WX_RS_WXCONFIG: /root/.cache/wx-3.3.3-linux/bin/wx-config
|
||||
steps:
|
||||
@@ -27,11 +23,15 @@ jobs:
|
||||
apt-get install -y -qq --no-install-recommends \
|
||||
libssl-dev pkg-config ca-certificates >/dev/null
|
||||
|
||||
- name: Compute wxWidgets cache key
|
||||
id: wx-key
|
||||
run: bash ci/wx-cache-key.sh
|
||||
|
||||
- name: Cache vendored wxWidgets build
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /root/.cache/wx-3.3.3-linux
|
||||
key: wx-3.3.3-${{ runner.os }}-${{ hashFiles('thirdparty/wx-rs/VERSION') }}
|
||||
key: ${{ steps.wx-key.outputs.key }}
|
||||
|
||||
- name: Build wxWidgets (once, then cached)
|
||||
run: |
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Key the native wxWidgets prefix to its tracked source and build toolchain.
|
||||
set -euo pipefail
|
||||
|
||||
material="$({
|
||||
git rev-parse HEAD:thirdparty/wxwidgets/wxWidgets-3.3.3
|
||||
git rev-parse HEAD:scripts/build-wx-linux.sh
|
||||
cat thirdparty/wx-rs/VERSION
|
||||
gcc -dumpmachine
|
||||
gcc -dumpfullversion
|
||||
pkg-config --modversion gtk+-3.0
|
||||
getconf GNU_LIBC_VERSION
|
||||
} )"
|
||||
digest="$(printf '%s\n' "$material" | sha256sum | cut -c1-24)"
|
||||
key="wx-3.3.3-$digest"
|
||||
if [ -n "${GITHUB_OUTPUT:-}" ]; then
|
||||
printf 'key=%s\n' "$key" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
printf '%s\n' "$key"
|
||||
fi
|
||||
Reference in New Issue
Block a user