0.2.1 #54
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 --no-default-features --features r01 | |
- 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: CM4 Build | |
run: cross build --release --target=armv7-unknown-linux-musleabihf --no-default-features --features cm4 | |
- 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: CM4 Bookworm Build | |
run: cross build --release --target=armv7-unknown-linux-musleabihf --no-default-features --features cm4-bookworm | |
- name: Copy CM4 Bookworm binary | |
run : cp -f ./target/armv7-unknown-linux-musleabihf/release/upico upico | |
- name: Compress CM4 Bookworm 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-bookworm.tar.gz | |
- name: A06 Build | |
run: cross build --release --target=armv7-unknown-linux-musleabihf --no-default-features --features a06 | |
- name: Copy A06 binary | |
run : cp -f ./target/armv7-unknown-linux-musleabihf/release/upico upico | |
- name: Compress A06 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 }}.a06.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 | |
upico_${{ github.ref_name }}.cm4-bookworm.tar.gz | |
upico_${{ github.ref_name }}.a06.tar.gz |