BlueGit

ict rusty-teams

Files

rusty-teams / .github / workflows / test.yml

test.yml

test.yml 2.1 KiB Download Raw
1# Tests per README "Quick start": `cargo test`. Linux and Windows are the supported
2# targets (README "Status"); macOS runs no tests here (its Ctrl/Cmd bindings fail the
3# key tests), it only builds - see build.yml.
4name: Test
5
6# Tests gate pushes to main and pull requests; releases build from tags in build.yml.
7on:
8 push:
9 branches: [main]
10 pull_request:
11 workflow_dispatch:
12
13permissions:
14 contents: read
15
16concurrency:
17 group: ${{ github.workflow }}-${{ github.ref }}
18 cancel-in-progress: true
19
20env:
21 CARGO_TERM_COLOR: always
22
23jobs:
24 pr-gate:
25 name: PR gate rules
26 runs-on: ubuntu-latest
27 timeout-minutes: 5
28 steps:
29 - uses: actions/checkout@v6
30 with:
31 sparse-checkout: .github/scripts
32
33 - name: Tests
34 run: cd .github/scripts && python3 -m unittest -v
35
36 linux:
37 name: Linux
38 runs-on: ubuntu-latest
39 timeout-minutes: 90
40 # webrtc-sys compiles its C++ against the hermetic libc++ inside the libwebrtc
41 # artifact, which needs a clang as new as that libc++ (clang 21 today, see
42 # check_clang_version in vendor/webrtc-sys/build.rs). The distro clang is older
43 # (18 on ubuntu-24.04), so setup-linux installs clang 21 and these point every
44 # compile and the final link at it.
45 env:
46 CC: clang-21
47 CXX: clang++-21
48 CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER: clang-21
49 steps:
50 - uses: actions/checkout@v6
51
52 - uses: ./.github/actions/setup-linux
53
54 - uses: dtolnay/rust-toolchain@stable
55
56 - uses: Swatinem/rust-cache@v2
57 with:
58 key: test
59
60 - name: Tests
61 run: cargo test
62
63 windows:
64 name: Windows
65 runs-on: windows-latest
66 timeout-minutes: 90
67 defaults:
68 run:
69 shell: bash
70 steps:
71 - uses: actions/checkout@v6
72
73 - uses: dtolnay/rust-toolchain@stable
74
75 - uses: Swatinem/rust-cache@v2
76 with:
77 key: test
78
79 # After the toolchain: staging runs `cargo metadata`.
80 - uses: ./.github/actions/setup-windows
81
82 - name: Tests
83 run: cargo test --config "patch.crates-io.gpui-pre-windows.path=\"$GPUI_PRE_WINDOWS_PATCHED\""