Skip to content

Commit

Permalink
Update CI and package metadata (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
ldm0 authored Jan 25, 2024
1 parent 3b72ff7 commit a738918
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 54 deletions.
76 changes: 27 additions & 49 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,20 @@ jobs:
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- run: cargo fmt --all -- --check

rust_clippy_check_ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
override: true
components: clippy

# https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
Expand Down Expand Up @@ -95,12 +88,11 @@ jobs:
rust_clippy_check_windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
override: true
components: clippy

# Using this since it's used by clang-sys's CI
- name: Install LLVM and Clang
Expand Down Expand Up @@ -137,14 +129,13 @@ jobs:
build_static_and_test_ubuntu_with_system_ffmpeg:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
override: true
components: clippy


# https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
- name: Install FFmpegBuildTools
run: |
Expand Down Expand Up @@ -256,12 +247,10 @@ jobs:
build_static_and_test_ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
override: true

# https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
- name: Install FFmpegBuildTools
Expand Down Expand Up @@ -353,13 +342,11 @@ jobs:
dynamic: true
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
override: true
target: ${{ matrix.config.target }}
targets: ${{ matrix.config.target }}

# Using this since it's used by clang-sys's CI
- name: Install LLVM and Clang
Expand Down Expand Up @@ -472,12 +459,10 @@ jobs:
cp -r ./build ~/ffmpeg_prebuilt
cd ../..
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
override: true
- env:
FFMPEG_INCLUDE_DIR: ${{ github.workspace }}/ffmpeg_prebuilt/include
FFMPEG_DLL_PATH: ${{ github.workspace }}/ffmpeg_prebuilt/lib/libffmpeg.so
Expand Down Expand Up @@ -558,12 +543,10 @@ jobs:
cp -r ./build ~/ffmpeg_prebuilt
cd ../..
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
override: true
- env:
FFMPEG_INCLUDE_DIR: ${{ github.workspace }}/ffmpeg_prebuilt/include
FFMPEG_DLL_PATH: ${{ github.workspace }}/ffmpeg_prebuilt/lib/libffmpeg.dylib
Expand Down Expand Up @@ -661,7 +644,7 @@ jobs:
cd ../..
- name: Upload Cross Compiled FFmpeg for Windows
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: cross_ffmpeg
path: ffmpeg/build/build
Expand All @@ -670,17 +653,14 @@ jobs:
runs-on: windows-latest
needs: build_dynamic_and_test_windows_pre
steps:
- uses: actions/checkout@v2

- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
target: i686-pc-windows-msvc
profile: minimal
toolchain: stable
override: true
targets: i686-pc-windows-msvc

- name: Download Cross Compiled FFmpeg for Windows
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: cross_ffmpeg
path: ${{ github.workspace }}/ffmpeg_prebuilt_cross
Expand All @@ -706,12 +686,10 @@ jobs:
docs_rs_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
override: true

# https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
- name: Install FFmpegBuildTools
Expand Down
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ name = "rusty_ffmpeg"
version = "0.13.3+ffmpeg.6.1"
authors = ["ldm0 <[email protected]>"]
edition = "2021"

license = "MIT"
description = "A library that provides Rust bindings for FFmpeg"
homepage = "https://github.com/CCExtractor/rusty_ffmpeg/"
documentation = "https://docs.rs/rusty_ffmpeg"
repository = "https://github.com/CCExtractor/rusty_ffmpeg/"
readme = "README.md"
homepage = "https://github.com/CCExtractor/rusty_ffmpeg/"
repository = "https://github.com/CCExtractor/rusty_ffmpeg/"
license = "MIT"

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

exclude = [".github"]
build = "build.rs"
links = "ffmpeg"
exclude = [".github"]

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

0 comments on commit a738918

Please sign in to comment.