get initial github workflow running #12
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: Cargo Build & Test | |
on: | |
push: | |
pull_request: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
rustfmt_check: | |
strategy: | |
matrix: | |
os: [macos-latest, windows-latest, ubuntu-latest] | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
components: rustfmt | |
- run: cargo fmt --all -- --check | |
rust_clippy_check_ubuntu: | |
name: direct-play-nice - latest | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
toolchain: | |
- stable | |
- beta | |
- nightly | |
steps: | |
- name: Install vcpkg build deps | |
run: sudo apt-get --assume-yes install nasm | |
- uses: actions/checkout@v3 | |
- name: | |
run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} && rustup component add clippy | |
# see: https://github.com/larksuite/rsmpeg/blob/master/.github/workflows/ci.yml | |
# https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu | |
- name: Install FFmpegBuildTools | |
run: | | |
sudo apt-get update -qq | |
sudo apt-get -y install autoconf automake build-essential cmake \ | |
git-core libass-dev libfreetype6-dev libgnutls28-dev libsdl2-dev \ | |
libtool libva-dev libvdpau-dev libvorbis-dev libxcb1-dev \ | |
libxcb-shm0-dev libxcb-xfixes0-dev pkg-config texinfo wget yasm \ | |
zlib1g-dev nasm libx264-dev libx265-dev libnuma-dev \ | |
libvpx-dev libfdk-aac-dev libmp3lame-dev libopus-dev | |
- name: Build Linux FFmpeg | |
run: bash utils/linux_ffmpeg.rs | |
- name: Run Test | |
run: | | |
export FFMPEG_PKG_CONFIG_PATH=${PWD}/tmp/ffmpeg_build/lib/pkgconfig | |
cargo clippy -- -D warnings |