src: Update to rustfmt 1.6.0-stable (5680fa1 2023-08-23) new standards #932
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
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." |