-
Notifications
You must be signed in to change notification settings - Fork 7
90 lines (88 loc) · 2.62 KB
/
build.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
on: [push, pull_request]
name: μPico
jobs:
lints:
name: Lints
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy
- 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
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Install cross
uses: actions-rs/cargo@v1
with:
command: install
args: --git https://github.com/cross-rs/cross cross
- name: R-01 Build
run: cross build --release --target=riscv64gc-unknown-linux-gnu
- name: CM4/A-04/A-06 Build
run: cross build --release --target=armv7-unknown-linux-musleabihf
- name: Copy R-01 binary
run : cp -f ./target/riscv64gc-unknown-linux-gnu/release/upico upico
- name: Compress R-01 Build
uses: a7ul/tar-action@v1.1.0
with:
command: c
files: |
./readme.md
./LICENSE-MIT
./LICENSE-APACHE
./install.sh
./upico.service
./upico
outPath: upico_${{ github.ref_name }}.riscv64gc.tar.gz
- name: Copy CM4/A-04/A-06 binary
run : cp -f ./target/armv7-unknown-linux-musleabihf/release/upico upico
- name: Compress CM4/A-04/A-06 Build
uses: a7ul/tar-action@v1.1.0
with:
command: c
files: |
./readme.md
./LICENSE-MIT
./LICENSE-APACHE
./install.sh
./upico.service
./upico
outPath: upico_${{ github.ref_name }}.armv7.tar.gz
- name: Upload Build Artifacts
uses: actions/upload-artifact@v3
with:
name: upico-installers
path: upico_*.tar.gz
retention-days: 7
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
upico_${{ github.ref_name }}.riscv64gc.tar.gz
upico_${{ github.ref_name }}.armv7.tar.gz