A guard job (plain checkout, canonical script) fails the run when any .gitmodules URL is not https:// — SSH URLs work only for a developer with the right key and break fresh clones, CI and release builders instead. make test runs the same check locally.
100 lines
2.6 KiB
YAML
100 lines
2.6 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
# Cancel a superseded run on the same ref.
|
|
concurrency:
|
|
group: ci-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
guard-submodule-urls:
|
|
name: Submodule URLs are public HTTPS
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
# Plain checkout on purpose: the guard must not depend on fetching
|
|
# the submodules it validates (an SSH URL would break that fetch).
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v7
|
|
|
|
- name: Reject non-HTTPS submodule URLs
|
|
run: sh scripts/check-submodule-urls.sh
|
|
|
|
test-linux:
|
|
name: Build and test (Linux)
|
|
needs: guard-submodule-urls
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v7
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Install Packages
|
|
run: |
|
|
set -euo pipefail
|
|
sudo apt-get update
|
|
sudo apt-get install -y build-essential cmake libssl-dev pkg-config \
|
|
zlib1g-dev libzstd-dev libbrotli-dev \
|
|
libglib2.0-dev libgtk-3-dev \
|
|
libsdl2-dev libdrm-dev libgbm-dev libegl1-mesa-dev libgles2-mesa-dev
|
|
|
|
- name: Build
|
|
run: |
|
|
set -euo pipefail
|
|
make clean CMAKE=/usr/bin/cmake
|
|
make all CMAKE=/usr/bin/cmake
|
|
|
|
- name: Test
|
|
run: make test CMAKE=/usr/bin/cmake
|
|
|
|
- name: Text input latency gate
|
|
run: |
|
|
set -euo pipefail
|
|
make perf-text-input CMAKE=/usr/bin/cmake | grep '^{' | tee text-input-perf.jsonl
|
|
cat text-input-perf.jsonl >> "$GITHUB_STEP_SUMMARY"
|
|
|
|
- name: Upload text input measurements
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: text-input-perf-linux
|
|
path: text-input-perf.jsonl
|
|
if-no-files-found: error
|
|
|
|
test-freebsd:
|
|
name: Build and test (FreeBSD)
|
|
needs: guard-submodule-urls
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v7
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Build and test on FreeBSD VM
|
|
uses: vmactions/freebsd-vm@v1
|
|
with:
|
|
usesh: true
|
|
mem: 4096
|
|
prepare: |
|
|
set -eu
|
|
pkg install -y gmake cmake pkgconf \
|
|
sdl2 libdrm mesa-libs gtk3 \
|
|
curl openssl zstd brotli \
|
|
git go
|
|
run: |
|
|
set -eu
|
|
gmake clean
|
|
gmake all
|
|
gmake test
|
|
if ! gmake perf-text-input; then
|
|
echo "FreeBSD text-input measurements are non-gating during calibration" >&2
|
|
fi
|