-
Notifications
You must be signed in to change notification settings - Fork 5
54 lines (44 loc) · 1.68 KB
/
build_and_release.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
on: [push, pull_request]
name: Build (and Release)
env:
CARGO_TERM_COLOR: always
jobs:
build:
name: Build (and Release)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0
- name: Add targets
run: |
rustup target add thumbv6m-none-eabi
rustup target add thumbv7em-none-eabihf
- name: Install flip-link
run: cd / && cargo install --debug flip-link
- name: Build/Test neotron-bmc-protocol
run: cd neotron-bmc-protocol && cargo test
- name: Build/Test neotron-bmc-commands
run: cd neotron-bmc-commands && cargo test
- name: Build neotron-bmc-pico
run: cd neotron-bmc-pico && DEFMT_LOG=info cargo build --release --verbose --target=thumbv6m-none-eabi
- name: Build neotron-bmc-nucleo
run: cd neotron-bmc-nucleo && DEFMT_LOG=info cargo build --release --verbose --target=thumbv7em-none-eabihf
- name: Upload files to Release
if: github.event_name == 'push' && startswith(github.ref, 'refs/tags/pico-')
uses: softprops/action-gh-release@v1
with:
files: |
neotron-bmc-pico/target/thumbv6m-none-eabi/release/neotron-bmc-pico
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload files to Release
if: github.event_name == 'push' && startswith(github.ref, 'refs/tags/nucleo-')
uses: softprops/action-gh-release@v1
with:
files: |
neotron-bmc-nucleo/target/thumbv6m-none-eabi/release/neotron-bmc-nucleo
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}