-
Notifications
You must be signed in to change notification settings - Fork 9
77 lines (66 loc) · 2.04 KB
/
main.yml
File metadata and controls
77 lines (66 loc) · 2.04 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
66
67
68
69
70
71
72
73
74
75
76
77
name: main
on:
push:
branches: [main, bevy_main]
pull_request:
branches: [main, bevy_main]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Install latest stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- run: cargo check --release --no-default-features
- run: cargo check --release
- run: cargo test --release
- run: cargo check --release --all-features
- run: cargo test --release --all-features
- run: cargo fmt --all -- --check
- run: cargo clippy --release -- --deny warnings
if: matrix.os != 'windows-latest'
- run: cargo clippy --release --workspace -- --deny warnings
if: matrix.os == 'windows-latest'
- run: cargo build --release -p example
if: matrix.os == 'windows-latest'
- uses: actions/upload-artifact@v3
if: matrix.os == 'windows-latest'
with:
name: example-windows
path: |
target/release/*.exe
target/release/*.bin
if-no-files-found: error
codecov:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: llvm-tools-preview
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@cargo-llvm-cov
- run: cargo llvm-cov --all-features --lcov --output-path lcov.info
- uses: actions/upload-artifact@v3
with:
name: lcov.info
path: lcov.info
if-no-files-found: error
- name: Upload to codecov
run: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov -f lcov.info -Z