-
Notifications
You must be signed in to change notification settings - Fork 11
85 lines (72 loc) · 2.42 KB
/
ci.yaml
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
name: 合并检查
on:
push:
branches:
- main
pull_request:
jobs:
rustfmt:
name: 语法格式检查
runs-on: ubuntu-latest
steps:
- name: 克隆仓库
uses: actions/checkout@v2
- name: 安装 Rust 工具链
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
components: rustfmt
override: true
- name: 运行 cargo fmt 格式检查
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
test:
name: 平台检查
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macOS-latest, windows-latest, ubuntu-latest]
steps:
- name: 克隆仓库
uses: actions/checkout@v2
- name: Linux - 安装 GTK 3.0 和 Webkit2GTK 4.0 依赖
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo DEBIAN_FRONTEND=noninteractive apt-get -yq update
sudo DEBIAN_FRONTEND=noninteractive apt-get -yq install libgtk-3-dev libwebkit2gtk-4.0-dev
if: contains(matrix.os, 'ubuntu')
- name: 缓存
uses: Swatinem/rust-cache@v1
- name: cargo clippy 检查 scl-gui-animation
uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path=scl-gui-animation/Cargo.toml --all-targets --no-default-features -- -D warnings
- name: cargo clippy 检查 scl-macro
uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path=scl-macro/Cargo.toml --all-targets --no-default-features -- -D warnings
- name: cargo clippy 检查 scl-core
uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path=scl-core/Cargo.toml --all-targets --no-default-features -- -D warnings
- name: cargo clippy 检查 scl-webview
uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path=scl-webview/Cargo.toml --all-targets --no-default-features -- -D warnings
- name: cargo clippy 检查 scl-gui-widgets
uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path=scl-gui-widgets/Cargo.toml --all-targets --no-default-features -- -D warnings
- name: cargo test 测试
uses: actions-rs/cargo@v1
with:
command: test