Skip to content

Add start of nbuild tool. #448

Add start of nbuild tool.

Add start of nbuild tool. #448

Workflow file for this run

name: Build
on: [push, pull_request]
jobs:
binaries:
runs-on: ubuntu-latest
strategy:
matrix:
target: [thumbv6m-none-eabi, thumbv7em-none-eabi, thumbv8m.main-none-eabi]
start_address: [0x0802_0000, 0x1002_0000]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- run: rustup target add ${{ matrix.target }}
- run: rustup component add llvm-tools-preview
- run: cargo nbuild binary --target=${{ matrix.target }} --start-address=${{ matrix.start_address }}
- 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
./target/${{ matrix.target }}/release/neotron-os.bin
./target/${{ matrix.target }}/release/romfs.bin
linux-libraries:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- run: cargo nbuild libraries
- 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:
- uses: actions/checkout@v4
with:
submodules: true
- run: cargo nbuild libraries
- uses: actions/upload-artifact@v4
if: ${{success()}}
with:
name: windows-libraries
if-no-files-found: error
path: |
./target/release/neotron_os.dll
run-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- run: cargo nbuild test
release:
runs-on: ubuntu-latest
needs: [binaries, linux-libraries, windows-libraries, run-tests]
if: github.event_name == 'push' && startswith(github.ref, 'refs/tags/')
steps:
- run: mkdir ./release
- uses: actions/download-artifact@v4
with:
path: ./release
- uses: softprops/action-gh-release@v1
with:
files: |
./release/*