-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (52 loc) · 1.38 KB
/
build.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
name: build
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
BUILD_TYPE: ["Debug"]
os: [ windows-2022 ]
steps:
- uses: actions/checkout@v2
- name: Install rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
# enable cache
- uses: Swatinem/rust-cache@v2
- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
- uses: taiki-e/install-action@cargo-llvm-cov
- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: -- --nocapture
# coverage
- name: run cmake
run: >
cmake . -DCMAKE_BUILD_TYPE=Debug -B build
- name: run coverage
run: |
cmake --build build --config Debug --target cov_all
cmake --build build --config Debug --target cov_summary
- name: Upload Report to Codecov
if: ${{ matrix.BUILD_TYPE == 'Debug' }}
uses: codecov/codecov-action@v4
with:
files: ./lcov.info
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }} # required