2020-07-26 12:52:50 +08:00
|
|
|
name: build
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
schedule:
|
|
|
|
- cron: "0 0 * * *"
|
|
|
|
jobs:
|
2020-08-12 12:01:09 +08:00
|
|
|
build-test-lint-linux:
|
|
|
|
name: Linux - FFmpeg ${{ matrix.ffmpeg_version }} - build, test and lint
|
2020-07-26 12:52:50 +08:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container: jrottenberg/ffmpeg:${{ matrix.ffmpeg_version }}-ubuntu
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-03-07 13:21:39 -05:00
|
|
|
ffmpeg_version:
|
2024-04-02 14:47:59 +02:00
|
|
|
["3.4", "4.0", "4.1", "4.2", "4.3", "4.4", "5.0", "5.1", "6.0", "6.1"]
|
2020-07-26 12:52:50 +08:00
|
|
|
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: |
|
2020-08-10 22:22:30 +08:00
|
|
|
cargo build --examples
|
2020-07-26 12:52:50 +08:00
|
|
|
- name: Test
|
|
|
|
run: |
|
2020-08-10 22:22:30 +08:00
|
|
|
cargo test --examples
|
2020-07-26 12:52:50 +08:00
|
|
|
- name: Lint
|
|
|
|
run: |
|
2020-08-10 22:22:30 +08:00
|
|
|
cargo clippy --examples -- -D warnings
|
2020-07-26 12:52:50 +08:00
|
|
|
- name: Check format
|
|
|
|
run: |
|
|
|
|
cargo fmt -- --check
|
2020-08-12 12:01:09 +08:00
|
|
|
|
2023-03-08 15:09:08 -05:00
|
|
|
build-test-lint-macos:
|
|
|
|
name: macOS - FFmpeg latest - build, test and lint
|
|
|
|
runs-on: macos-latest
|
2020-08-12 12:01:09 +08:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2023-03-08 15:09:08 -05:00
|
|
|
brew install ffmpeg pkg-config
|
2020-08-12 12:01:09 +08:00
|
|
|
- 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
|
2023-03-08 15:09:08 -05:00
|
|
|
|
|
|
|
# IDK what's up with the windows CI, it's broken somehow
|
|
|
|
# build-test-lint-windows:
|
|
|
|
# name: Windows - FFmpeg ${{ matrix.ffmpeg_version }} - build, test and lint
|
|
|
|
# runs-on: windows-latest
|
|
|
|
# strategy:
|
|
|
|
# matrix:
|
|
|
|
# include:
|
|
|
|
# - ffmpeg_version: latest
|
|
|
|
# ffmpeg_download_url: https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-full-shared.7z
|
|
|
|
# fail-fast: false
|
|
|
|
# env:
|
|
|
|
# FFMPEG_DOWNLOAD_URL: ${{ matrix.ffmpeg_download_url }}
|
|
|
|
# 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 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: 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
|