Skip to content

Ugh, zip needs -r to be recursive. #458

Ugh, zip needs -r to be recursive.

Ugh, zip needs -r to be recursive. #458

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 }}-binary
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-library:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- run: cargo nbuild library
- uses: actions/upload-artifact@v4
if: ${{success()}}
with:
name: linux-library
if-no-files-found: error
path: |
./target/release/libneotron_os.so
windows-library:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- run: cargo nbuild library
- uses: actions/upload-artifact@v4
if: ${{success()}}
with:
name: windows-library
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
prep-release:
runs-on: ubuntu-latest
needs: [binaries, linux-library, windows-library, run-tests]
steps:
- run: mkdir ./release
- uses: actions/download-artifact@v4
with:
path: ./release
- run: ls -lR ./release
release:
runs-on: ubuntu-latest
needs: [binaries, linux-library, windows-library, run-tests]
if: github.event_name == 'push' && startswith(github.ref, 'refs/tags/')
steps:
- run: mkdir ./release
- uses: actions/download-artifact@v4
with:
path: ./release-${{ github.ref_name }}
- run: zip -r release-${{ github.ref_name }}.zip ./release-${{ github.ref_name }}
- uses: softprops/action-gh-release@v1
with:
files: |
./release-${{ github.ref_name }}.zip