Skip to content

Commit 6f2df39

Browse files
add ffmpeg-build feature flag (#53)
1 parent 0446260 commit 6f2df39

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

.github/workflows/rust.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ on:
77
types: [released]
88

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

1213
jobs:
1314
test-linux:
@@ -74,6 +75,10 @@ jobs:
7475
~/.cargo/registry
7576
target
7677
key: "${{runner.os}} Rust ${{steps.rust-toolchain.outputs.cachekey}} Lock ${{hashFiles('Cargo.lock')}}"
78+
- name: install cargo-all-features
79+
uses: baptiste0928/cargo-install@v2
80+
with:
81+
crate: cargo-all-features
7782
- run: cargo test --no-default-features --features ffmpeg,log -- --include-ignored
7883
if: github.event_name != 'pull_request'
7984
env:

mstickereditor/Cargo.toml

+5
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ url = "2.2"
3232
[features]
3333
default = ["ffmpeg", "lottie"]
3434
ffmpeg = ["mstickerlib/ffmpeg"]
35+
ffmpeg-build = ["ffmpeg", "mstickerlib/ffmpeg-build"]
3536
lottie = ["mstickerlib/lottie"]
3637

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

4142
[lints]
4243
workspace = true
44+
45+
46+
[package.metadata.cargo-all-features]
47+
denylist = ["ffmpeg-build"]

mstickerlib/Cargo.toml

+6-1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ rustc_version = "0.4.0"
4646
[features]
4747
default = ["ffmpeg", "log", "lottie"]
4848
ffmpeg = ["dep:ffmpeg", "dep:tempfile", "dep:webp-animation"]
49+
ffmpeg-build = ["ffmpeg", "ffmpeg/build"]
4950
log = ["dep:log"]
5051
lottie = ["dep:lottieconv", "dep:tempfile", "dep:webp-animation", "dep:gif"]
5152

@@ -54,4 +55,8 @@ lto = true
5455
opt-level = 3
5556

5657
[lints]
57-
workspace = true
58+
workspace = true
59+
60+
61+
[package.metadata.cargo-all-features]
62+
denylist = ["ffmpeg-build"]

0 commit comments

Comments
 (0)