Update and fix CI (#15)
This commit is contained in:
parent
30aabf9033
commit
e294e14fe2
84
.github/workflows/build.yml
vendored
84
.github/workflows/build.yml
vendored
@ -3,68 +3,76 @@ on:
|
|||||||
push:
|
push:
|
||||||
pull_request:
|
pull_request:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 0 * * *"
|
- cron: "0 0 * * *" # Daily
|
||||||
|
|
||||||
|
env:
|
||||||
|
CARGO_INCREMENTAL: 0
|
||||||
|
RUSTFLAGS: "-Dwarnings"
|
||||||
|
|
||||||
|
# All default features except non-exhaustive-enums,
|
||||||
|
# to check that FFmpeg versions are properly compatible
|
||||||
|
CARGO_FEATURES: "
|
||||||
|
--no-default-features
|
||||||
|
-F codec,device,filter,format
|
||||||
|
-F software-resampling,software-scaling"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-test-lint-linux:
|
build-test-lint-linux:
|
||||||
name: Linux - FFmpeg ${{ matrix.ffmpeg_version }} - build, test and lint
|
name: Linux - FFmpeg ${{ matrix.ffmpeg_version }} - build, test and lint
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
container: jrottenberg/ffmpeg:${{ matrix.ffmpeg_version }}-ubuntu
|
container: jrottenberg/ffmpeg:${{ matrix.ffmpeg_version }}-ubuntu
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
ffmpeg_version:
|
ffmpeg_version:
|
||||||
["3.4", "4.0", "4.1", "4.2", "4.3", "4.4", "5.0", "5.1", "6.0", "6.1"]
|
["3.4", "4.0", "4.1", "4.2", "4.3", "4.4", "5.0", "5.1", "6.0", "6.1"]
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
apt update
|
apt-get update
|
||||||
apt install -y --no-install-recommends clang curl pkg-config
|
apt-get install -y --no-install-recommends clang curl pkg-config
|
||||||
- name: Set up Rust
|
- name: Install Rust stable with clippy and rustfmt
|
||||||
uses: actions-rs/toolchain@v1
|
uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
|
||||||
override: true
|
|
||||||
components: rustfmt, clippy
|
components: rustfmt, clippy
|
||||||
- name: Build
|
- uses: Swatinem/rust-cache@v2
|
||||||
run: |
|
with:
|
||||||
cargo build --examples
|
# Only save cache for one FFmpeg version
|
||||||
- name: Test
|
save-if: matrix.ffmpeg_version == "6.1"
|
||||||
run: |
|
|
||||||
cargo test --examples
|
|
||||||
- name: Lint
|
|
||||||
run: |
|
|
||||||
cargo clippy --examples -- -D warnings
|
|
||||||
- name: Check format
|
- name: Check format
|
||||||
run: |
|
run: cargo fmt -- --check
|
||||||
cargo fmt -- --check
|
- name: Lint
|
||||||
|
run: cargo clippy --all-targets $CARGO_FEATURES
|
||||||
|
- name: Build
|
||||||
|
run: cargo build --all-targets $CARGO_FEATURES
|
||||||
|
- name: Test
|
||||||
|
run: cargo test $CARGO_FEATURES
|
||||||
|
|
||||||
build-test-lint-macos:
|
build-test-lint-macos:
|
||||||
name: macOS - FFmpeg latest - build, test and lint
|
name: macOS - FFmpeg latest - build, test and lint
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: brew install ffmpeg pkg-config
|
||||||
brew install ffmpeg pkg-config
|
- name: Install Rust stable with clippy and rustfmt
|
||||||
- name: Set up Rust
|
uses: dtolnay/rust-toolchain@stable
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
|
||||||
override: true
|
|
||||||
components: rustfmt, clippy
|
components: rustfmt, clippy
|
||||||
- name: Build
|
- uses: Swatinem/rust-cache@v2
|
||||||
run: |
|
|
||||||
cargo build --examples
|
|
||||||
- name: Test
|
|
||||||
run: |
|
|
||||||
cargo test --examples
|
|
||||||
- name: Lint
|
|
||||||
run: |
|
|
||||||
cargo clippy --examples -- -D warnings
|
|
||||||
- name: Check format
|
- name: Check format
|
||||||
run: |
|
run: cargo fmt -- --check
|
||||||
cargo fmt -- --check
|
- name: Lint
|
||||||
|
run: cargo clippy --all-targets $CARGO_FEATURES
|
||||||
|
- name: Build
|
||||||
|
run: cargo build --all-targets $CARGO_FEATURES
|
||||||
|
- name: Test
|
||||||
|
run: cargo test $CARGO_FEATURES
|
||||||
|
|
||||||
# IDK what's up with the windows CI, it's broken somehow
|
# IDK what's up with the windows CI, it's broken somehow
|
||||||
# build-test-lint-windows:
|
# build-test-lint-windows:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user