Skip to content

Featgroup

Featgroup #163

name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
check_and_test_ubuntu:
name: Check and test on Ubuntu
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Add public keys
run: sudo apt-get update && sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5 &&
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
override: true
- name: Install AV dependencies
run: sudo apt-get install -y --fix-missing libgdal26 libodbc1 libssl-dev alsa-utils libasound2-dev portaudio19-dev build-essential libpulse-dev libdbus-1-dev libudev-dev libatk1.0-dev libgtk-3-dev libavfilter-dev libavdevice-dev
- name: Clang
run: sudo apt-get install -y clang && sudo ln -s libclang.so.1 /usr/lib/llvm-10/lib/libclang.so
- name: Install alsa and udev
run: sudo apt-get update; sudo apt-get install -y --no-install-recommends libasound2-dev libudev-dev
- name: Install other deps
run: sudo apt-get install -y portaudio19-dev build-essential libpulse-dev libdbus-1-dev pkg-config libx11-dev libatk1.0-dev libgtk-3-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libwayland-dev libxkbcommon-dev ffmpeg
- name: Check project
run: cargo check -p adder-codec-core -p adder-codec-rs -p adder-info -p adder-to-dvs -p adder-viz --features "compression"
- name: Build binaries for testing
run: cargo build -p adder-info
- name: Test core
run: cargo test -p adder-codec-core --features "compression"
- name: Test project
run: cargo test -p adder-codec-rs -p adder-info -p adder-viz
# - name: Run a documentation generation test
# run: cargo doc -vv -p adder-codec-rs --features "docs-only open-cv"
check_windows:
name: Check and test on Windows
runs-on: windows-2022
env:
OPENCV_VERSION: 4.6.0
steps:
- uses: actions/checkout@v2
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
override: true
- name: Install LLVM/clang
run: choco install -y llvm
shell: bash
- name: Test project
run: |
export PATH="/C/Program Files/LLVM/bin:$PATH"
export LIBCLANG_PATH="/C/Program Files/LLVM/bin"
cargo test -p adder-codec-core --features "compression"
shell: bash