-
-
Notifications
You must be signed in to change notification settings - Fork 1
81 lines (75 loc) · 1.89 KB
/
buildtest.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
name: Build-Test
on:
push:
branches-ignore:
- 'main'
pull_request:
branches:
- 'main'
workflow_dispatch:
jobs:
test:
name: Build Test
strategy:
fail-fast: false
matrix:
variant:
- "" # debug
- "--release"
target:
- thumbv6m-none-eabi
# - thumbv7m-none-eabi
# - thumbv7em-none-eabi
# - thumbv7em-none-eabihf
# platform: [
# ubuntu-latest,
# macos-latest,
# windows-latest
# ]
runs-on: ubuntu-latest
#runs-on: ${{ matrix.platform }}
timeout-minutes: 15
steps:
- name: Checkout Repository on PR on main branch
if: github.event_name == 'pull_request'
uses: actions/checkout@v3
# with:
# ref: ${{ github.event.pull_request.head.sha }}
- name: Checkout Repository on push
if: github.event_name == 'push'
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
- name: Setup Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: ${{ matrix.target }}
override: true
components: rustfmt, clippy
- name: cargo fmt
uses: actions-rs/cargo@v1
continue-on-error: true
with:
command: fmt
args: --all -- --check
- name: cargo clippy
uses: actions-rs/cargo@v1
continue-on-error: true
with:
command: clippy
args: -- -D warnings
- name: cargo test
uses: actions-rs/cargo@v1
continue-on-error: true
with:
command: test
args: --no-fail-fast --all
- name: cargo build
uses: actions-rs/cargo@v1
with:
command: build
args: ${{ matrix.variant }} --target=${{ matrix.target }}
#- name: cargo build
# run: cargo build ${{ matrix.variant }} --target=${{ matrix.target }}