This repository was archived by the owner on Dec 29, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (51 loc) · 1.57 KB
/
build.yml
File metadata and controls
60 lines (51 loc) · 1.57 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
name: Build
on: [push, pull_request]
jobs:
build:
name: Build (and Release)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Check Syntax
run: |
cargo check
- name: Test
run: |
cargo test --lib
- name: Install Targets and Tools
run: |
rustup target add thumbv6m-none-eabi
rustup target add thumbv7m-none-eabi
rustup target add thumbv7em-none-eabi
rustup component add llvm-tools
- name: Install tools
uses: taiki-e/install-action@v2
with:
tool: cargo-binutils@0.3.6
- name: Build
run: |
cargo build --release
cargo build --release --target=thumbv6m-none-eabi
cargo build --release --target=thumbv7m-none-eabi
cargo build --release --target=thumbv7em-none-eabi
- name: Upload Artifacts
uses: actions/upload-artifact@v3
if: ${{success()}}
with:
name: Artifacts
if-no-files-found: error
path: |
./target/release/snake
./target/*/release/snake
./target/release/flames
./target/*/release/flames
- name: Upload files to Release
if: github.event_name == 'push' && startswith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
files: |
./target/release/snake
./target/*/release/snake
./target/release/flames
./target/*/release/flames