-
Notifications
You must be signed in to change notification settings - Fork 38
80 lines (66 loc) · 1.69 KB
/
check.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
name: check
on:
push:
branches: ["main"]
tags: [v0.*]
pull_request:
jobs:
build:
strategy:
matrix:
include:
- name: Linux
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- name: Windows
os: windows-latest
target: x86_64-pc-windows-msvc
- name: MacOS
os: macos-latest
target: x86_64-apple-darwin
- name: Web
os: ubuntu-latest
target: wasm32-unknown-unknown
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
target: ${{ matrix.target }}
override: true
- name: Check Basics
uses: actions-rs/cargo@v1
with:
command: check
args: --target ${{ matrix.target }} --workspace --all --no-default-features
- name: Test Basics
if: matrix.name != 'Web'
uses: actions-rs/cargo@v1
with:
command: test
args: -p blade-render --no-default-features
- name: Test All
if: matrix.name != 'Web'
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace --all-features
fmt:
name: Format
runs-on: ubuntu-latest
steps:
- name: checkout repo
uses: actions/checkout@v3
- name: install rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt
- name: run rustfmt
run: |
cargo fmt -- --check