From 69bdc302e3ef5734d43649a82191628a14e45c49 Mon Sep 17 00:00:00 2001 From: Nathan Babcock Date: Mon, 13 Jan 2025 13:49:10 -0600 Subject: [PATCH] ci: consolidate into one workflow (#74) * ci: consolidate into one workflow * chore: update ci badge in readme --- .github/workflows/ci.yml | 43 +++++++++++++++++++++++++++++++++++ .github/workflows/mac-m1.yml | 27 ---------------------- .github/workflows/mac.yml | 27 ---------------------- .github/workflows/ubuntu.yml | 27 ---------------------- .github/workflows/windows.yml | 26 --------------------- README.md | 7 +++--- 6 files changed, 47 insertions(+), 110 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/mac-m1.yml delete mode 100644 .github/workflows/mac.yml delete mode 100644 .github/workflows/ubuntu.yml delete mode 100644 .github/workflows/windows.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..12f787b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,43 @@ +name: CI + +on: + push: + branches: + - 'main' + pull_request: + branches: + - 'main' + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true + +env: + CARGO_TERM_COLOR: always + +jobs: + test: + name: ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 5 + strategy: + matrix: + os: + - windows-latest + - ubuntu-latest + - macos-13 + - macos-14 # Mac M1 (ARM64) + steps: + - uses: actions/checkout@v4 + + - name: Download FFmpeg + run: cargo run --example download_ffmpeg -- ../deps + + - name: Build + run: cargo build --verbose + + - name: Check without default features + run: cargo check --no-default-features + + - name: Run tests + run: cargo test --all-targets --all-features --examples --verbose diff --git a/.github/workflows/mac-m1.yml b/.github/workflows/mac-m1.yml deleted file mode 100644 index 984bc37..0000000 --- a/.github/workflows/mac-m1.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Mac M1 - -on: - push: - branches: ['main'] - pull_request: - branches: ['main'] - -env: - CARGO_TERM_COLOR: always - -jobs: - build: - # https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories - runs-on: macos-14 - timeout-minutes: 5 - - steps: - - uses: actions/checkout@v3 - - name: Try auto-download - run: cargo run --example download_ffmpeg -- ../deps - - name: Build - run: cargo build --verbose - - name: Check without default features - run: cargo check --no-default-features - - name: Run tests - run: cargo test --all-targets --all-features --verbose -- --skip lib.rs diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml deleted file mode 100644 index 0f16246..0000000 --- a/.github/workflows/mac.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Mac - -on: - push: - branches: ['main'] - pull_request: - branches: ['main'] - -env: - CARGO_TERM_COLOR: always - -jobs: - build: - runs-on: macos-13 - timeout-minutes: 5 - - steps: - - uses: actions/checkout@v3 - - uses: FedericoCarboni/setup-ffmpeg@v3 - - name: Build - run: cargo build --verbose - - name: Check without default features - run: cargo check --no-default-features - - name: Run tests - run: cargo test --all-targets --all-features --verbose - - name: Try auto-download - run: cargo run --example download_ffmpeg diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml deleted file mode 100644 index ff7d846..0000000 --- a/.github/workflows/ubuntu.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Ubuntu - -on: - push: - branches: ['main'] - pull_request: - branches: ['main'] - -env: - CARGO_TERM_COLOR: always - -jobs: - build: - runs-on: ubuntu-latest - timeout-minutes: 5 - - steps: - - uses: actions/checkout@v3 - - uses: FedericoCarboni/setup-ffmpeg@v3 - - name: Build - run: cargo build --verbose - - name: Check without default features - run: cargo check --no-default-features - - name: Run tests - run: cargo test --all-targets --all-features --verbose - - name: Try auto-download - run: cargo run --example download_ffmpeg diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml deleted file mode 100644 index 4d0efba..0000000 --- a/.github/workflows/windows.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Windows - -on: - push: - branches: ["main"] - pull_request: - branches: ["main"] - -env: - CARGO_TERM_COLOR: always - -jobs: - build: - runs-on: windows-latest - timeout-minutes: 10 - steps: - - uses: actions/checkout@v3 - - uses: FedericoCarboni/setup-ffmpeg@v3 - - name: Build - run: cargo build --verbose - - name: Check without default features - run: cargo check --no-default-features - - name: Run tests - run: cargo test --all-targets --all-features --verbose - - name: Try auto-download - run: cargo run --example download_ffmpeg diff --git a/README.md b/README.md index dd94982..b1a2c87 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,9 @@ # FFmpeg Sidecar 🏍 -[Github](https://github.com/nathanbabcock/ffmpeg-sidecar) | -[Crates.io](https://crates.io/crates/ffmpeg-sidecar) | -[Docs.rs](https://docs.rs/ffmpeg-sidecar) +[Github](https://github.com/nathanbabcock/ffmpeg-sidecar) • +[Crates.io](https://crates.io/crates/ffmpeg-sidecar) • +[Docs.rs](https://docs.rs/ffmpeg-sidecar) • +[Github Actions](https://github.com/nathanbabcock/ffmpeg-sidecar/actions/workflows/ci.yml) > Wrap a standalone FFmpeg binary in an intuitive Iterator interface.