Skip to content

readme: Fix bash commands on build instructions step #922

readme: Fix bash commands on build instructions step

readme: Fix bash commands on build instructions step #922

Workflow file for this run

name: Rust
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Install libraries
run: |
sudo apt update
sudo apt install -y libunwind-dev
sudo apt install -y --no-install-recommends libclang-dev libssl-dev pkg-config libmount-dev libsepol-dev libselinux1-dev libglib2.0-dev libgudev-1.0-dev \
gstreamer1.0-tools libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev libgstrtspserver-1.0-dev
- uses: actions-rs/[email protected]
with:
toolchain: stable
override: true
- name: Check style
run: cargo fmt -- --check
- name: Check clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features
- name: Build
run: |
cargo build --verbose
- name: Run tests
run: |
cargo test --verbose
- name: Cargo publish
if: startsWith(github.ref, 'refs/tags/')
env:
TOKEN: ${{ secrets.TOKEN }}
run: |
cargo package --no-verify
[[ "$(git describe --tags)" =~ ^[0-9]+.[0-9]+.[0-9]+$ ]] && cargo publish --allow-dirty --token $TOKEN || echo "No tag availale for this commit."