-
Notifications
You must be signed in to change notification settings - Fork 11
83 lines (77 loc) · 2.04 KB
/
ci.yml
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
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
rustfmt:
runs-on: ubuntu-latest
name: cargo fmt
steps:
- uses: actions/checkout@v4
- name: install stable toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: rustfmt
- name: cargo fmt
run: cargo fmt --all --check
typos:
runs-on: ubuntu-latest
name: typos
steps:
- uses: actions/checkout@v4
- uses: crate-ci/typos@master
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-13, macos-14, ubuntu-22.04, windows-2022]
name: cargo clippy + test
steps:
- uses: actions/checkout@v4
- name: install stable toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: clippy
- name: cargo clippy
run: cargo clippy --all-targets --workspace -- -D warnings
- name: cargo test
run: cargo test --workspace
- name: cargo test release
run: cargo test --workspace --release
build-ios:
runs-on: macos-latest
name: cargo build + clippy (iOS)
env:
RUSTFLAGS: -Dwarnings
steps:
- uses: actions/checkout@v4
- name: install stable toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: clippy
targets: aarch64-apple-ios
- name: cargo build
run: cargo build --target aarch64-apple-ios --all-targets --workspace
- name: cargo clippy
run: cargo clippy --target aarch64-apple-ios --all-targets --workspace
build-doc:
name: cargo docs-rs
runs-on: ubuntu-22.04
env:
RUSTDOCFLAGS: -Dwarnings
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
- uses: dtolnay/install@cargo-docs-rs
- run: cargo docs-rs -p flecs_ecs
- run: cargo docs-rs -p flecs_ecs_derive