Skip to content

Fix new clippy warnings (#304) #729

Fix new clippy warnings (#304)

Fix new clippy warnings (#304) #729

Workflow file for this run

name: ci
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
clippy-rustfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install stable
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: clippy, rustfmt
- name: Run rustfmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check --verbose
- name: Install ffmpeg for Ubuntu
run: |
export PKG_CONFIG_PATH=$(pkg-config --variable pc_path pkg-config)
sudo apt-get update
sudo apt-get install libavutil-dev libavcodec-dev libavformat-dev libclang-dev
- name: Run cargo clippy (y4m)
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-targets --tests --benches -- -D warnings
- name: Run cargo clippy (ffmpeg)
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-targets --features ffmpeg --tests --benches -- -D warnings
build:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- name: Install stable
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Install FFmpeg for Ubuntu
if: matrix.platform == 'ubuntu-latest'
run: |
export PKG_CONFIG_PATH=$(pkg-config --variable pc_path pkg-config)
sudo apt-get update
sudo apt-get install libavutil-dev libavcodec-dev libavformat-dev libclang-dev
- name: Install FFmpeg for MacOs
if: matrix.platform == 'macos-latest'
run: |
brew install ffmpeg pkg-config
- name: Install FFmpeg for Windows
if: matrix.platform == 'windows-latest'
env:
FFMPEG_URL: https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-full-shared.7z
run: |
$VCINSTALLDIR = $(& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath)
Add-Content $env:GITHUB_ENV "LIBCLANG_PATH=${VCINSTALLDIR}\VC\Tools\LLVM\x64\bin`n"
Invoke-WebRequest "${env:FFMPEG_URL}" -OutFile ffmpeg-release-full-shared.7z
7z x ffmpeg-release-full-shared.7z
mkdir ffmpeg
mv ffmpeg-*/* ffmpeg/
Add-Content $env:GITHUB_ENV "FFMPEG_DIR=${pwd}\ffmpeg`n"
Add-Content $env:GITHUB_PATH "${pwd}\ffmpeg\bin`n"
- name: Build (y4m)
run: cargo build --tests --benches
- name: Run tests (y4m)
run: cargo test
- name: Build (ffmpeg)
run: cargo build --features ffmpeg --tests --benches
- name: Run tests (ffmpeg)
run: cargo test --features ffmpeg
- name: Generate docs
run: cargo doc --features y4m,ffmpeg --no-deps