810fd7b0f9
https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/ https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#environment-files
109 lines
3.3 KiB
YAML
109 lines
3.3 KiB
YAML
name: build
|
|
on:
|
|
push:
|
|
pull_request:
|
|
schedule:
|
|
- cron: "0 0 * * *"
|
|
jobs:
|
|
build-test-lint-linux:
|
|
name: Linux - FFmpeg ${{ matrix.ffmpeg_version }} - build, test and lint
|
|
runs-on: ubuntu-latest
|
|
container: jrottenberg/ffmpeg:${{ matrix.ffmpeg_version }}-ubuntu
|
|
strategy:
|
|
matrix:
|
|
ffmpeg_version: ["3.4", "4.0", "4.1", "4.2", "4.3"]
|
|
fail-fast: false
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Install dependencies
|
|
run: |
|
|
apt update
|
|
apt install -y --no-install-recommends clang curl pkg-config
|
|
- name: Set up Rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
override: true
|
|
components: rustfmt, clippy
|
|
- name: Build
|
|
run: |
|
|
cargo build --examples
|
|
- name: Test
|
|
run: |
|
|
cargo test --examples
|
|
- name: Lint
|
|
run: |
|
|
cargo clippy --examples -- -D warnings
|
|
- name: Check format
|
|
run: |
|
|
cargo fmt -- --check
|
|
|
|
build-test-lint-macos:
|
|
name: macOS - FFmpeg latest - build, test and lint
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Install dependencies
|
|
run: |
|
|
brew install ffmpeg pkg-config
|
|
- name: Set up Rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
override: true
|
|
components: rustfmt, clippy
|
|
- name: Build
|
|
run: |
|
|
cargo build --examples
|
|
- name: Test
|
|
run: |
|
|
cargo test --examples
|
|
- name: Lint
|
|
run: |
|
|
cargo clippy --examples -- -D warnings
|
|
- name: Check format
|
|
run: |
|
|
cargo fmt -- --check
|
|
|
|
build-test-lint-windows:
|
|
name: Windows - FFmpeg ${{ matrix.ffmpeg_version }} - build, test and lint
|
|
runs-on: windows-latest
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- ffmpeg_version: "4.3.1"
|
|
ffmpeg_download_url: https://www.gyan.dev/ffmpeg/builds/packages/ffmpeg-4.3.1-2020-09-21-full_build-shared.zip
|
|
ffmpeg_directory_name: ffmpeg-4.3.1-2020-09-21-full_build-shared
|
|
fail-fast: false
|
|
env:
|
|
FFMPEG_VERSION: ${{ matrix.ffmpeg_version }}
|
|
FFMPEG_DOWNLOAD_URL: ${{ matrix.ffmpeg_download_url }}
|
|
FFMPEG_DIRECTORY_NAME: ${{ matrix.ffmpeg_directory_name }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Install dependencies
|
|
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_DOWNLOAD_URL}" -OutFile "${env:FFMPEG_DIRECTORY_NAME}.zip"
|
|
Expand-Archive -Path "${env:FFMPEG_DIRECTORY_NAME}.zip" -DestinationPath .
|
|
Add-Content $env:GITHUB_ENV "FFMPEG_DIR=${pwd}\${env:FFMPEG_DIRECTORY_NAME}`n"
|
|
- name: Set up Rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
override: true
|
|
components: rustfmt, clippy
|
|
- name: Build
|
|
run: |
|
|
cargo build --examples
|
|
- name: Test
|
|
run: |
|
|
cargo test --examples
|
|
- name: Lint
|
|
run: |
|
|
cargo clippy --examples -- -D warnings
|
|
- name: Check format
|
|
run: |
|
|
cargo fmt -- --check
|