-
Notifications
You must be signed in to change notification settings - Fork 0
122 lines (115 loc) · 4.58 KB
/
Copy pathci.yml
File metadata and controls
122 lines (115 loc) · 4.58 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
117
118
119
120
121
122
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
jobs:
quality:
name: Quality and tests
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@fa04a1451ff1842e2626ccb99004d0195b455a88 # master
with:
toolchain: 1.95.0
components: rustfmt, clippy
- uses: Swatinem/rust-cache@42dc69e1aa15d09112580998cf2ef0119e2e91ae # v2
- name: Install Linux dependencies
uses: ./.github/actions/install-linux-dependencies
- run: cargo fmt --all -- --check
- run: cargo metadata --locked --format-version 1 > /dev/null
- run: cargo check --locked --workspace --all-targets
- run: cargo clippy --locked --workspace --all-targets --all-features -- --deny warnings
- run: cargo test --locked -p scheduler
- run: cargo test --locked -p gpui --features bench,profiler --lib
- name: Test release-only accessibility duplicate handling
run: cargo test --locked --release -p gpui --features test-support duplicate_id
- run: cargo test --locked -p gpui_wgpu --lib
- run: cargo check --locked -p gpui --examples
- run: cargo check --locked -p gpui --features bench --benches
- run: cargo check --locked -p gpui_wgpu --benches
native-platform:
name: Native platform (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 60
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@fa04a1451ff1842e2626ccb99004d0195b455a88 # master
with:
toolchain: 1.95.0
- uses: Swatinem/rust-cache@42dc69e1aa15d09112580998cf2ef0119e2e91ae # v2
- name: Ensure Metal toolchain is available
if: runner.os == 'macOS'
run: |
if ! xcrun -f metal > /dev/null 2>&1; then
xcodebuild -downloadComponent MetalToolchain
fi
xcrun -f metal
- run: cargo check --locked --workspace --all-targets
- name: Test macOS platform
if: runner.os == 'macOS'
run: cargo test --locked -p gpui_macos --all-features --all-targets
- name: Test Windows platform
if: runner.os == 'Windows'
run: cargo test --locked -p gpui_windows --all-features --all-targets
- name: Compile Windows shaders in release mode
if: runner.os == 'Windows'
run: cargo check --locked -p gpui_windows --release
linux-backend:
name: Linux (${{ matrix.backend }})
strategy:
fail-fast: false
matrix:
backend: [wayland, x11]
runs-on: ubuntu-latest
timeout-minutes: 45
env:
BACKEND: ${{ matrix.backend }}
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@fa04a1451ff1842e2626ccb99004d0195b455a88 # master
with:
toolchain: 1.95.0
- uses: Swatinem/rust-cache@42dc69e1aa15d09112580998cf2ef0119e2e91ae # v2
with:
key: linux-${{ matrix.backend }}
- name: Install Linux dependencies
uses: ./.github/actions/install-linux-dependencies
- run: cargo check --locked -p gpui_platform --no-default-features --features "$BACKEND" --all-targets
- run: cargo test --locked -p gpui_linux --no-default-features --features "$BACKEND,test-support" --lib
wasm:
name: WebAssembly
runs-on: ubuntu-latest
timeout-minutes: 45
env:
CARGO_TARGET_WASM32_UNKNOWN_UNKNOWN_RUSTFLAGS: -C target-feature=+atomics,+bulk-memory,+mutable-globals
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@fa04a1451ff1842e2626ccb99004d0195b455a88 # master
with:
toolchain: nightly
components: rust-src
targets: wasm32-unknown-unknown
- uses: Swatinem/rust-cache@42dc69e1aa15d09112580998cf2ef0119e2e91ae # v2
with:
key: wasm
- run: cargo +nightly -Zbuild-std=std,panic_abort check --locked --target wasm32-unknown-unknown -p gpui_platform
- run: cargo +nightly -Zbuild-std=std,panic_abort check --locked --target wasm32-unknown-unknown -p gpui --example a11y --example view_example