Skip to content

Commit

Permalink
add ffmpeg-build feature flag (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
LuckyTurtleDev committed Apr 18, 2024
1 parent 0446260 commit 6f2df39
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ on:
types: [released]

env:
PACKAGES: libavc1394-dev libavdevice-dev
PACKAGES: libavc1394-dev libavdevice-dev nasm
#nasm is needed to build fmpeg from source, if ffmpeg-future is aviable

jobs:
test-linux:
Expand Down Expand Up @@ -74,6 +75,10 @@ jobs:
~/.cargo/registry
target
key: "${{runner.os}} Rust ${{steps.rust-toolchain.outputs.cachekey}} Lock ${{hashFiles('Cargo.lock')}}"
- name: install cargo-all-features
uses: baptiste0928/cargo-install@v2
with:
crate: cargo-all-features
- run: cargo test --no-default-features --features ffmpeg,log -- --include-ignored
if: github.event_name != 'pull_request'
env:
Expand Down
5 changes: 5 additions & 0 deletions mstickereditor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ url = "2.2"
[features]
default = ["ffmpeg", "lottie"]
ffmpeg = ["mstickerlib/ffmpeg"]
ffmpeg-build = ["ffmpeg", "mstickerlib/ffmpeg-build"]
lottie = ["mstickerlib/lottie"]

[profile.release]
Expand All @@ -40,3 +41,7 @@ opt-level = 3

[lints]
workspace = true


[package.metadata.cargo-all-features]
denylist = ["ffmpeg-build"]
7 changes: 6 additions & 1 deletion mstickerlib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ rustc_version = "0.4.0"
[features]
default = ["ffmpeg", "log", "lottie"]
ffmpeg = ["dep:ffmpeg", "dep:tempfile", "dep:webp-animation"]
ffmpeg-build = ["ffmpeg", "ffmpeg/build"]
log = ["dep:log"]
lottie = ["dep:lottieconv", "dep:tempfile", "dep:webp-animation", "dep:gif"]

Expand All @@ -54,4 +55,8 @@ lto = true
opt-level = 3

[lints]
workspace = true
workspace = true


[package.metadata.cargo-all-features]
denylist = ["ffmpeg-build"]

0 comments on commit 6f2df39

Please sign in to comment.