forked from shumatech/BOSSA
-
Notifications
You must be signed in to change notification settings - Fork 3
92 lines (85 loc) · 2.38 KB
/
rust_linux.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
81
82
83
84
85
86
87
88
89
90
91
92
name: Rust Linux
on: [push, pull_request]
env:
deb_packages: >-
libreadline-dev
libwxgtk3.0-gtk3-dev
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y ${{ env.deb_packages }}
- name: Cargo Check
run: cargo check --all
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y ${{ env.deb_packages }}
- name: ls
run: |
ls
pwd
- name: Cargo Build
run: cargo build --all
- name: Cargo Install
run: cargo install --path bossac --bins --root dist
- uses: actions/upload-artifact@v3
with:
name: linux_release_binaries
path: dist/bin
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- name: Rustfmt Check
uses: actions-rust-lang/rustfmt@v1
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
with:
components: clippy
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y ${{ env.deb_packages }}
- name: Cargo Clippy
run: cargo clippy --all-targets -- -D warnings
udeps:
name: cargo-udeps
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: dtolnay/rust-toolchain@nightly
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y ${{ env.deb_packages }}
- name: cargo-binstall
run: |
mkdir -p ~/.cargo/bin
wget https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz
tar xf cargo-binstall*.tgz -C ~/.cargo/bin
- run: cargo binstall --no-confirm cargo-udeps
- name: Cargo Udeps
run: cargo udeps --all-targets