Skip to content

feat(conformance): cut contract-v2 with the 18-scenario corpus #101

feat(conformance): cut contract-v2 with the 18-scenario corpus

feat(conformance): cut contract-v2 with the 18-scenario corpus #101

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
verify:
name: verify (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: 22
- uses: mlugg/setup-zig@v2
with:
version: 0.16.0
- name: Install Native SDK CLI
run: npm install -g @native-sdk/cli@0.4.1
- name: Doctor (strict, macOS)
if: runner.os == 'macOS'
run: native doctor --strict
- name: Doctor (Linux)
if: runner.os == 'Linux'
run: native doctor
- name: Validate manifest
run: native validate app.zon
- name: Logic + view tests (headless null platform)
run: native test -Dplatform=null
- name: Check markup + manifest
run: native check --strict
- name: Build release binary (macOS)
if: runner.os == 'macOS'
run: native build
smoke:
name: automation smoke (Linux · Xvfb)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: 22
- uses: mlugg/setup-zig@v2
with:
version: 0.16.0
- name: Install GTK + Xvfb
run: sudo apt-get update && sudo apt-get install -y libgtk-4-dev libwebkitgtk-6.0-dev xvfb dbus
- name: Allow unprivileged user namespaces (bwrap dbus-proxy sandbox)
# Ubuntu 24.04 runners restrict unprivileged userns via AppArmor,
# which breaks the SDK's bubblewrap-sandboxed dbus-proxy.
run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
- name: Install Native SDK CLI
run: npm install -g @native-sdk/cli@0.4.1
- name: Build headless app (automation enabled)
run: native build -Dplatform=linux -Dautomation=true
- name: Drive the GUI headless and assert the widget tree
run: ./scripts/smoke.sh
- name: Upload rendered screenshots
if: always()
uses: actions/upload-artifact@v4
with:
name: gui-screenshots
path: .zig-cache/native-sdk-automation/screenshot-*.png
if-no-files-found: ignore
scripts:
name: scripts (pure ASCII)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Assert scripts are pure ASCII
# A `curl | bash` installer must run on the oldest bundled bash (macOS
# ships 3.2.57): a non-ASCII byte next to a $variable under `set -u` folds
# into the variable name and aborts the install. Keep every script ASCII.
run: |
bad="$(LC_ALL=C perl -ne 'print "$ARGV:$.: $_" if /[^\x00-\x7F]/; close ARGV if eof' scripts/*.sh)"
if [ -n "$bad" ]; then
printf '%s\n' "$bad"
echo "::error::scripts/*.sh must be pure ASCII (see lines above)"
exit 1
fi