forked from longbridge/gpui-component
-
Notifications
You must be signed in to change notification settings - Fork 11
65 lines (63 loc) · 1.8 KB
/
ci.yml
File metadata and controls
65 lines (63 loc) · 1.8 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
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: Lint
if: ${{ matrix.run_on == 'macos-latest' }}
run: |
cargo clippy --workspace --all-targets
- name: Test Linux
if: ${{ matrix.run_on == 'ubuntu-latest' }}
run: |
cargo test --all
- name: Test Windows
if: ${{ matrix.run_on == 'windows-latest' }}
run: |
cargo test --all
- name: Test MacOS
if: ${{ matrix.run_on == 'macos-latest' }}
run: |
cargo test --all
cargo test -p gpui-component --doc