Merge pull request #721 from fhscey/main #313
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Check | |
| on: | |
| push: {} | |
| pull_request: {} | |
| env: | |
| PRPR_AVC_FFMPEG_VERSION: 20260309_v0 | |
| jobs: | |
| clippy: | |
| name: Clippy (${{ matrix.name }}) | |
| runs-on: ${{ matrix.os }} | |
| permissions: | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: Linux | |
| os: ubuntu-latest | |
| target: x86_64-unknown-linux-gnu | |
| - name: macOS | |
| os: macos-14 | |
| target: aarch64-apple-darwin | |
| # - name: iOS | |
| # os: macos-14 | |
| # target: aarch64-apple-ios | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Prepare (ubuntu) | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install librust-alsa-sys-dev libglib2.0-dev libasound2t64 libatk-adaptor libgail-common libgtk-3-dev | |
| - name: Setup Rust toolchain | |
| run: | | |
| rustup toolchain install | |
| rustup target add ${{ matrix.target }} | |
| - name: Select Xcode (iOS) | |
| if: matrix.target == 'aarch64-apple-ios' | |
| run: | | |
| sudo xcode-select -s /Applications/Xcode.app/Contents/Developer | |
| xcodebuild -version | |
| xcrun --sdk iphoneos --show-sdk-path | |
| - name: Download FFmpeg static libs | |
| run: | | |
| mkdir -p prpr-avc/static-lib/${{ matrix.target }} | |
| curl -fL --retry 3 \ | |
| -o prpr-avc-static-lib.tar.gz \ | |
| https://github.com/TeamFlos/prpr-avc-ffmpeg/releases/download/${PRPR_AVC_FFMPEG_VERSION}/${{ matrix.target }}.tar.gz | |
| tar -xzf prpr-avc-static-lib.tar.gz -C prpr-avc/static-lib/${{ matrix.target }} | |
| - name: Cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: "true" | |
| cache-all-crates: "true" | |
| - name: Clippy | |
| run: | | |
| cargo clippy --all-targets --all-features --workspace \ | |
| --target ${{ matrix.target }} -- \ | |
| -D warnings | |
| fmt: | |
| name: Format | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Prepare | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install librust-alsa-sys-dev libglib2.0-dev libasound2t64 libatk-adaptor libgail-common libgtk-3-dev | |
| - name: Setup Rust toolchain | |
| run: rustup toolchain install | |
| - name: Cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: "true" | |
| cache-all-crates: "true" | |
| - name: Format | |
| run: cargo fmt --all --check | |
| tests: | |
| name: Tests | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Prepare | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install librust-alsa-sys-dev libglib2.0-dev libasound2t64 libatk-adaptor libgail-common libgtk-3-dev | |
| - name: Setup Rust toolchain | |
| run: rustup toolchain install | |
| - name: Download FFmpeg static libs | |
| run: | | |
| mkdir -p prpr-avc/static-lib/x86_64-unknown-linux-gnu | |
| curl -fL --retry 3 \ | |
| -o prpr-avc-static-lib.tar.gz \ | |
| https://github.com/TeamFlos/prpr-avc-ffmpeg/releases/download/${PRPR_AVC_FFMPEG_VERSION}/x86_64-unknown-linux-gnu.tar.gz | |
| tar -xzf prpr-avc-static-lib.tar.gz -C prpr-avc/static-lib/x86_64-unknown-linux-gnu | |
| - name: Cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: "true" | |
| cache-all-crates: "true" | |
| - name: Run tests | |
| run: cargo test --all |