-
-
Notifications
You must be signed in to change notification settings - Fork 9
84 lines (82 loc) · 2.32 KB
/
rust.yml
File metadata and controls
84 lines (82 loc) · 2.32 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Build
on: [push, pull_request]
jobs:
binaries:
name: Build Binaries
strategy:
matrix:
target: [thumbv6m-none-eabi, thumbv7em-none-eabi, thumbv8m.main-none-eabi]
start_address: [0x0802_0000, 0x1002_0000]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- run: |
rustup target add ${{ matrix.target }}
cargo nbuild binaries --target=${{ matrix.target }} --start-address=${{ matrix.start_address }}
- name: Upload Artifacts
uses: actions/upload-artifact@v4
if: ${{success()}}
with:
name: ${{ matrix.target }}-${{ matrix.start_address }}-binaries
if-no-files-found: error
path: |
./target/${{ matrix.target }}/release/neotron-os
linux-libraries:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Build
run: cargo nbuild libraries
- name: Upload Artifacts
uses: actions/upload-artifact@v4
if: ${{success()}}
with:
name: linux-libraries
if-no-files-found: error
path: |
./target/release/libneotron_os.so
windows-libraries:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Build
run: cargo nbuild libraries
- name: Upload Artifacts
uses: actions/upload-artifact@v4
if: ${{success()}}
with:
name: windows-libraries
if-no-files-found: error
path: |
./target/release/neotron_os.dll
run-tests:
steps:
- uses: actions/checkout@v4
with:
submodules: true
- run: cargo nbuild test
release:
name: Upload Release
needs: [binaries, linux-libraries, windows-libraries]
if: github.event_name == 'push' && startswith(github.ref, 'refs/tags/')
steps:
- name: Make release area
run: |
mkdir ./release
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
path: ./release
- name: Upload files to Release
uses: softprops/action-gh-release@v1
with:
files: |
./release/*