-
Notifications
You must be signed in to change notification settings - Fork 2
38 lines (34 loc) · 1.08 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
name: Rust check
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -Dwarnings
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: sudo apt-get install -y libssl-dev pkg-config clang build-essential libusb-1.0-0 libusb-1.0-0-dev g++-aarch64-linux-gnu g++-arm-linux-gnueabihf g++-x86-64-linux-gnu
- name: Install toolchains
run: rustup target add x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu armv7-unknown-linux-gnueabihf
- name: Check fmt
run: make fmt
- name: Lint
run: make lint
- name: Tests usual
run: make test
- name: Build x86_64
run: CARGO_BUILD_TARGET=x86_64-unknown-linux-gnu make build
- name: Build aarch64
run: CARGO_BUILD_TARGET=aarch64-unknown-linux-gnu make build
- name: Build armv7
run: CARGO_BUILD_TARGET=armv7-unknown-linux-gnueabihf make build
- uses: actions/upload-artifact@v3
with:
name: packages
path: target/release/debian/*.deb