Use rust #29
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] | |
jobs: | |
build_job: | |
# The host should always be linux | |
runs-on: ubuntu-latest | |
name: Build on ${{ matrix.distro }} ${{ matrix.arch }} | |
# Build for arm64 and armv7 | |
strategy: | |
matrix: | |
include: | |
- arch: aarch64 | |
distro: bullseye | |
- arch: armv7 | |
distro: bullseye | |
steps: | |
# Checkout the repo to $PWD | |
- uses: actions/checkout@v3 | |
- uses: uraimo/run-on-arch-action@v2 | |
name: Build artifact | |
id: build | |
with: | |
arch: ${{ matrix.arch }} | |
distro: ${{ matrix.distro }} | |
# Not required, but speeds up builds | |
githubToken: ${{ github.token }} | |
# The shell to run commands with in the container | |
shell: /bin/bash | |
# Install dependencies so that they are cached | |
install: | | |
apt-get --quiet update -y | |
apt-get install -y -q libssl-dev pkg-config clang build-essential libusb-1.0-0 libusb-1.0-0-dev | |
curl https://sh.rustup.rs -sSf | sh -s -- -y | |
rustup component add rustfmt clippy | |
cargo install cargo-deb | |
# build | |
run: | | |
make deb | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: packages-${{ matrix.arch }} | |
path: target/release/debian/*.deb |