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:
|
||||
pull_request:
|
||||
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:
|
||||
build-test-lint-linux:
|
||||
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
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
ffmpeg_version:
|
||||
["3.4", "4.0", "4.1", "4.2", "4.3", "4.4", "5.0", "5.1", "6.0", "6.1"]
|
||||
fail-fast: false
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
- 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
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends clang curl pkg-config
|
||||
- name: Install Rust stable with clippy and rustfmt
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
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
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
# Only save cache for one FFmpeg version
|
||||
save-if: matrix.ffmpeg_version == "6.1"
|
||||
|
||||
- name: Check format
|
||||
run: |
|
||||
cargo fmt -- --check
|
||||
run: 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:
|
||||
name: macOS - FFmpeg latest - build, test and lint
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
brew install ffmpeg pkg-config
|
||||
- name: Set up Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
run: brew install ffmpeg pkg-config
|
||||
- name: Install Rust stable with clippy and rustfmt
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
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
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Check format
|
||||
run: |
|
||||
cargo fmt -- --check
|
||||
run: 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
|
||||
# build-test-lint-windows:
|
||||
|
Loading…
x
Reference in New Issue
Block a user