-
Notifications
You must be signed in to change notification settings - Fork 8
66 lines (52 loc) · 1.8 KB
/
ci.yml
File metadata and controls
66 lines (52 loc) · 1.8 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
name: CI
on:
pull_request: # Need to run on pull-requests, otherwise PRs from forks don't run
push:
branches:
- 'master' # Always build head of master for the badge in the README
jobs:
static_analysis:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install toolchain from rust-toolchain file
run: rustup show
- uses: Swatinem/rust-cache@v1.4.0
with:
key: ${{ matrix.target }}
- name: Check formatting
uses: dprint/check@v1.5
- name: Run clippy with default features
run: cargo clippy --workspace --all-targets -- -D warnings
- name: Run clippy with all features enabled
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
build:
strategy:
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
- target: armv7-unknown-linux-gnueabihf
os: ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install toolchain from rust-toolchain file
run: rustup show
- uses: Swatinem/rust-cache@v1.4.0
with:
key: ${{ matrix.target }}
- name: Install compiler for armhf arch
if: matrix.target == 'armv7-unknown-linux-gnueabihf'
run: |
sudo apt-get update
sudo apt-get install gcc-arm-linux-gnueabihf
- name: Build binary
run: cargo build -p rendezvous-server --target ${{ matrix.target }}
- name: Upload rendezvous-server binary
uses: actions/upload-artifact@v2-preview
with:
name: rendezvous-server-${{ matrix.target }}
path: target/${{ matrix.target }}/debug/rendezvous-server