Skip to content

update github actions #12

update github actions

update github actions #12

Workflow file for this run

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: 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
./target/riscv64gc-unknown-linux-gnu/release/upico
outPath: upico_${{ github.ref_name }}.riscv64gc.tar.gz
- name: CM4/A-04/A-06 Build
run: cross build --release --target=armv7-unknown-linux-musleabihf
- name: Compress CM4/A-04/A-06 Build
uses: a7ul/tar-action@v1.1.0
with:
command: c
files: |
./readme.md
./LICENSE-MIT
./LICENSE-APACHE
./install.sh
./upico.service
./target/armv7-unknown-linux-musleabihf/release/upico
outPath: upico_${{ github.ref_name }}.armv7.tar.gz
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
upico_${{ github.ref_name }}.riscv64gc.tar.gz
upico_${{ github.ref_name }}.armv7.tar.gz