Skip to content

Commit

Permalink
Fix non-default feature build: Feature gate unpack_ffmpeg with `dow…
Browse files Browse the repository at this point in the history
…nload_ffmpeg` (#56)

* Feature gate `unpack_ffmpeg` with `download_ffmpeg`
* add cargo check without default features to ci
  • Loading branch information
Wumpf authored Nov 4, 2024
1 parent 2248e96 commit 2f63f3a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
- 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
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
- 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
Expand Down
1 change: 1 addition & 0 deletions src/download.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ pub fn download_ffmpeg_package(url: &str, download_dir: &Path) -> anyhow::Result

/// After downloading, unpacks the archive to a folder, moves the binaries to
/// their final location, and deletes the archive and temporary folder.
#[cfg(feature = "download_ffmpeg")]
pub fn unpack_ffmpeg(from_archive: &PathBuf, binary_folder: &Path) -> anyhow::Result<()> {
let temp_dirname = UNPACK_DIRNAME;
let temp_folder = binary_folder.join(temp_dirname);
Expand Down

0 comments on commit 2f63f3a

Please sign in to comment.