Skip to content

readme: Add Node/Yarn step with instructions #925

readme: Add Node/Yarn step with instructions

readme: Add Node/Yarn step with instructions #925

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."