μPico #31
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: [push, pull_request] | |
name: μPico | |
jobs: | |
lints: | |
name: Lints | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
- name: Install stable toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
components: rustfmt, clippy | |
- name: Run cargo fmt | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
- name: Run cargo clippy | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: -- -D warnings | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
- name: Install stable toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: Install cross | |
uses: actions-rs/cargo@v1 | |
with: | |
command: install | |
args: --git https://github.com/cross-rs/cross cross | |
- name: R-01 Build | |
run: cross build --release --target=riscv64gc-unknown-linux-gnu | |
- name: CM4/A-04/A-06 Build | |
run: cross build --release --target=armv7-unknown-linux-musleabihf | |
- name: Copy R-01 binary | |
run : cp -f ./target/riscv64gc-unknown-linux-gnu/release/upico upico | |
- name: Compress R-01 Build | |
uses: a7ul/tar-action@v1.1.0 | |
with: | |
command: c | |
files: | | |
./readme.md | |
./LICENSE-MIT | |
./LICENSE-APACHE | |
./install.sh | |
./upico.service | |
./upico | |
outPath: upico_${{ github.ref_name }}.r01.tar.gz | |
- name: Copy CM4 binary | |
run : cp -f ./target/armv7-unknown-linux-musleabihf/release/upico upico | |
- name: Compress CM4 Build | |
uses: a7ul/tar-action@v1.1.0 | |
with: | |
command: c | |
files: | | |
./readme.md | |
./LICENSE-MIT | |
./LICENSE-APACHE | |
./install.sh | |
./upico.service | |
./upico | |
outPath: upico_${{ github.ref_name }}.cm4.tar.gz | |
- name: Upload Build Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: upico-installers | |
path: upico_*.tar.gz | |
retention-days: 7 | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
upico_${{ github.ref_name }}.r01.tar.gz | |
upico_${{ github.ref_name }}.cm4.tar.gz |