Skip to content

Commit a738918

Browse files
authored
Update CI and package metadata (#110)
1 parent 3b72ff7 commit a738918

File tree

2 files changed

+32
-54
lines changed

2 files changed

+32
-54
lines changed

.github/workflows/ci.yml

+27-49
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,20 @@ jobs:
1919
fail-fast: false
2020
runs-on: ${{ matrix.os }}
2121
steps:
22-
- uses: actions/checkout@v2
23-
- uses: actions-rs/toolchain@v1
22+
- uses: actions/checkout@v4
23+
- uses: dtolnay/rust-toolchain@stable
2424
with:
25-
profile: minimal
2625
toolchain: stable
27-
override: true
2826
components: rustfmt
29-
- uses: actions-rs/cargo@v1
30-
with:
31-
command: fmt
32-
args: --all -- --check
27+
- run: cargo fmt --all -- --check
3328

3429
rust_clippy_check_ubuntu:
3530
runs-on: ubuntu-latest
3631
steps:
37-
- uses: actions/checkout@v2
38-
- uses: actions-rs/toolchain@v1
32+
- uses: actions/checkout@v4
33+
- uses: dtolnay/rust-toolchain@stable
3934
with:
40-
profile: minimal
4135
toolchain: stable
42-
override: true
4336
components: clippy
4437

4538
# https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
@@ -95,12 +88,11 @@ jobs:
9588
rust_clippy_check_windows:
9689
runs-on: windows-latest
9790
steps:
98-
- uses: actions/checkout@v2
99-
- uses: actions-rs/toolchain@v1
91+
- uses: actions/checkout@v4
92+
- uses: dtolnay/rust-toolchain@stable
10093
with:
101-
profile: minimal
10294
toolchain: stable
103-
override: true
95+
components: clippy
10496

10597
# Using this since it's used by clang-sys's CI
10698
- name: Install LLVM and Clang
@@ -137,14 +129,13 @@ jobs:
137129
build_static_and_test_ubuntu_with_system_ffmpeg:
138130
runs-on: ubuntu-latest
139131
steps:
140-
- uses: actions/checkout@v2
141-
- uses: actions-rs/toolchain@v1
132+
- uses: actions/checkout@v4
133+
- uses: dtolnay/rust-toolchain@stable
142134
with:
143-
profile: minimal
144135
toolchain: stable
145-
override: true
146136
components: clippy
147137

138+
148139
# https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
149140
- name: Install FFmpegBuildTools
150141
run: |
@@ -256,12 +247,10 @@ jobs:
256247
build_static_and_test_ubuntu:
257248
runs-on: ubuntu-latest
258249
steps:
259-
- uses: actions/checkout@v2
260-
- uses: actions-rs/toolchain@v1
250+
- uses: actions/checkout@v4
251+
- uses: dtolnay/rust-toolchain@stable
261252
with:
262-
profile: minimal
263253
toolchain: stable
264-
override: true
265254

266255
# https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
267256
- name: Install FFmpegBuildTools
@@ -353,13 +342,11 @@ jobs:
353342
dynamic: true
354343
fail-fast: false
355344
steps:
356-
- uses: actions/checkout@v2
357-
- uses: actions-rs/toolchain@v1
345+
- uses: actions/checkout@v4
346+
- uses: dtolnay/rust-toolchain@stable
358347
with:
359-
profile: minimal
360348
toolchain: stable
361-
override: true
362-
target: ${{ matrix.config.target }}
349+
targets: ${{ matrix.config.target }}
363350

364351
# Using this since it's used by clang-sys's CI
365352
- name: Install LLVM and Clang
@@ -472,12 +459,10 @@ jobs:
472459
cp -r ./build ~/ffmpeg_prebuilt
473460
cd ../..
474461
475-
- uses: actions/checkout@v2
476-
- uses: actions-rs/toolchain@v1
462+
- uses: actions/checkout@v4
463+
- uses: dtolnay/rust-toolchain@stable
477464
with:
478-
profile: minimal
479465
toolchain: stable
480-
override: true
481466
- env:
482467
FFMPEG_INCLUDE_DIR: ${{ github.workspace }}/ffmpeg_prebuilt/include
483468
FFMPEG_DLL_PATH: ${{ github.workspace }}/ffmpeg_prebuilt/lib/libffmpeg.so
@@ -558,12 +543,10 @@ jobs:
558543
cp -r ./build ~/ffmpeg_prebuilt
559544
cd ../..
560545
561-
- uses: actions/checkout@v2
562-
- uses: actions-rs/toolchain@v1
546+
- uses: actions/checkout@v4
547+
- uses: dtolnay/rust-toolchain@stable
563548
with:
564-
profile: minimal
565549
toolchain: stable
566-
override: true
567550
- env:
568551
FFMPEG_INCLUDE_DIR: ${{ github.workspace }}/ffmpeg_prebuilt/include
569552
FFMPEG_DLL_PATH: ${{ github.workspace }}/ffmpeg_prebuilt/lib/libffmpeg.dylib
@@ -661,7 +644,7 @@ jobs:
661644
cd ../..
662645
663646
- name: Upload Cross Compiled FFmpeg for Windows
664-
uses: actions/upload-artifact@v2
647+
uses: actions/upload-artifact@v4
665648
with:
666649
name: cross_ffmpeg
667650
path: ffmpeg/build/build
@@ -670,17 +653,14 @@ jobs:
670653
runs-on: windows-latest
671654
needs: build_dynamic_and_test_windows_pre
672655
steps:
673-
- uses: actions/checkout@v2
674-
675-
- uses: actions-rs/toolchain@v1
656+
- uses: actions/checkout@v4
657+
- uses: dtolnay/rust-toolchain@stable
676658
with:
677-
target: i686-pc-windows-msvc
678-
profile: minimal
679659
toolchain: stable
680-
override: true
660+
targets: i686-pc-windows-msvc
681661

682662
- name: Download Cross Compiled FFmpeg for Windows
683-
uses: actions/download-artifact@v2
663+
uses: actions/download-artifact@v4
684664
with:
685665
name: cross_ffmpeg
686666
path: ${{ github.workspace }}/ffmpeg_prebuilt_cross
@@ -706,12 +686,10 @@ jobs:
706686
docs_rs_check:
707687
runs-on: ubuntu-latest
708688
steps:
709-
- uses: actions/checkout@v2
710-
- uses: actions-rs/toolchain@v1
689+
- uses: actions/checkout@v4
690+
- uses: dtolnay/rust-toolchain@stable
711691
with:
712-
profile: minimal
713692
toolchain: stable
714-
override: true
715693

716694
# https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
717695
- name: Install FFmpegBuildTools

Cargo.toml

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@ name = "rusty_ffmpeg"
33
version = "0.13.3+ffmpeg.6.1"
44
authors = ["ldm0 <ldm2993593805@163.com>"]
55
edition = "2021"
6-
7-
license = "MIT"
86
description = "A library that provides Rust bindings for FFmpeg"
9-
homepage = "https://github.com/CCExtractor/rusty_ffmpeg/"
107
documentation = "https://docs.rs/rusty_ffmpeg"
11-
repository = "https://github.com/CCExtractor/rusty_ffmpeg/"
128
readme = "README.md"
9+
homepage = "https://github.com/CCExtractor/rusty_ffmpeg/"
10+
repository = "https://github.com/CCExtractor/rusty_ffmpeg/"
11+
license = "MIT"
1312

1413
keywords = ["ffmpeg", "ffi", "binding", "video", "audio"]
1514
categories = ["external-ffi-bindings", "multimedia"]
1615

17-
exclude = [".github"]
1816
build = "build.rs"
17+
links = "ffmpeg"
18+
exclude = [".github"]
1919

2020
# Doc test of generated binding is non-sense https://github.com/rust-lang/cargo/issues/3720
2121
[lib]

0 commit comments

Comments
 (0)