Skip to content

Merge pull request #5 from SeBookSimon/patch-4 #43

Merge pull request #5 from SeBookSimon/patch-4

Merge pull request #5 from SeBookSimon/patch-4 #43

Workflow file for this run

name: Build
on:
push:
workflow_dispatch:
inputs:
debug_enabled:
description: "Run the build with tmate debugging enabled"
required: false
default: false
jobs:
# fmt_clippy:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: 0
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
# if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
# - name: Lint (rustfmt)
# run: cargo fmt -- --check
# - name: Lint (clippy)
# run: cargo clippy --all-targets --all-features -- -D warnings
build:
runs-on: ubuntu-latest
strategy:
matrix:
job:
# - { target: x86_64-unknown-linux-musl, pretty: x86_64 }
# - { target: arm-unknown-linux-musleabihf, pretty: armv6l }
# - { target: armv7-unknown-linux-musleabihf, pretty: armv7l }
# - { target: aarch64-unknown-linux-musl, pretty: aarch64 }
# - {
# target: x86_64-unknown-linux-musl,
# pretty: x86_64-backend,
# args: --features rusqlite/bundled,
# }
# - {
# target: arm-unknown-linux-musleabihf,
# pretty: armv6l-backend,
# args: --features rusqlite/bundled,
# }
# - {
# target: armv7-unknown-linux-gnueabihf,
# pretty: armv7l-backend,
# args: --features rusqlite/bundled,
# }
- { target: aarch64-unknown-linux-gnu, pretty: aarch64-backend }
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: |
sudo apt-get update
sudo apt-get install -y -qq libasound2-dev libudev-dev pkg-config libssl-dev libxcb1-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev
- name: Install rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
target: ${{ matrix.job.target }}
- uses: Swatinem/rust-cache@v1
with:
key: ${{ matrix.job.pretty }}
- name: Build Tricked-Bot
uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --release --bin tricked-bot --target ${{ matrix.job.target }} ${{ matrix.job.args }}
- name: Upload binary
uses: actions/upload-artifact@v3
with:
name: tricked-bot-${{ matrix.job.pretty }}
path: target/${{ matrix.job.target }}/release/tricked-bot