-
Notifications
You must be signed in to change notification settings - Fork 0
116 lines (113 loc) · 4.59 KB
/
Copy pathci.yml
File metadata and controls
116 lines (113 loc) · 4.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: CI
on:
pull_request:
push:
branches:
- main
tags:
- "*"
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }}
cancel-in-progress: true
jobs:
test:
name: Test
strategy:
fail-fast: false
matrix:
include:
- target: aarch64-apple-darwin
run_on: macos-latest
- target: x86_64-linux-gnu
run_on: ubuntu-latest
- target: x86_64-windows-msvc
run_on: windows-latest
runs-on: ${{ matrix.run_on }}
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: clippy
- name: Install system dependencies
if: ${{ matrix.run_on != 'windows-latest' }}
run: script/bootstrap
- name: Machete
if: ${{ matrix.run_on == 'macos-latest' }}
uses: bnjbvr/cargo-machete@v0.9.1
- name: Setup | Cache Cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: test-cargo-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
- name: Typo check
if: ${{ matrix.run_on == 'macos-latest' }}
run: |
# --locked for reproducibility; no `|| echo` mask — a failed install
# must fail the step, not surface later as `typos: command not found`.
which typos >/dev/null 2>&1 || cargo install typos-cli --locked
typos
- name: Lint (macOS)
if: ${{ matrix.run_on == 'macos-latest' }}
run: ./script/clippy
- name: Lint (Linux)
if: ${{ matrix.run_on == 'ubuntu-latest' }}
run: ./script/clippy
- name: Lint (Windows)
if: ${{ matrix.run_on == 'windows-latest' }}
run: ./script/clippy.ps1
# Tests are intentionally NOT run in CI — they are run locally before
# merge (repo policy; see CLAUDE.md "Testing"). CI gates on lint (which
# compiles all targets), typos, machete, and the native launch smoke below.
# Native launch smoke test for the app-platform conformance examples
# (examples/app_shell single-window, examples/app_shell_tray tray-first). Each
# example boots the real shell, opens its window(s), then `--smoke` requests a
# clean quit and exits 0. See docs/learned/app-platform-plan.md §5 Phase 1 and
# §6 gate 7. Keep the matrix in sync with the `test` job above.
native-launch-smoke:
name: Native launch smoke
strategy:
fail-fast: false
matrix:
include:
- target: aarch64-apple-darwin
run_on: macos-latest
- target: x86_64-linux-gnu
run_on: ubuntu-latest
- target: x86_64-windows-msvc
run_on: windows-latest
runs-on: ${{ matrix.run_on }}
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install system dependencies
if: ${{ matrix.run_on != 'windows-latest' }}
run: script/bootstrap
# Build on every OS: this exercises the full D4 identity chain (build.rs +
# include_identity!) cross-platform, even where we do not launch a
# GPU-backed window below.
- name: Build conformance examples
run: cargo build -p app_shell -p app_shell_tray
# Launch smoke runs on macOS only. Platform parity (CLAUDE.md) requires
# documenting why the other two are gated off rather than silently skipped:
# - macOS: GitHub arm64 runners provide a working Metal device; the
# `--smoke` launch is verified to reach a ready window and exit 0.
# - Linux: GPUI renders via Vulkan. Stock ubuntu runners have no display
# and no Vulkan device, so a native launch needs both xvfb and a
# software driver (lavapipe) that is not guaranteed present. Gated off
# to avoid flaky reds; enable once the runner image ships them:
# xvfb-run -a cargo run -p app_shell -- --smoke
# xvfb-run -a cargo run -p app_shell_tray -- --smoke
# - Windows: GPUI renders via DirectX; headless runners have no reliable
# present surface. Gated off pending a WARP-backed offscreen path:
# cargo run -p app_shell -- --smoke
# cargo run -p app_shell_tray -- --smoke
- name: Native launch smoke (macOS)
if: ${{ matrix.run_on == 'macos-latest' }}
run: |
cargo run -p app_shell -- --smoke
cargo run -p app_shell_tray -- --smoke