Repository navigation
ci: add aarch64 RPM package build using native GitHub runner #92
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: CI | |
| on: | |
| workflow_dispatch: | |
| workflow_call: | |
| pull_request: | |
| branches: | |
| - main | |
| push: | |
| branches: | |
| - main | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| jobs: | |
| test-linux: | |
| name: Test (Linux) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install GStreamer | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libgstreamer1.0-dev \ | |
| libgstreamer-plugins-base1.0-dev \ | |
| gstreamer1.0-plugins-base \ | |
| gstreamer1.0-plugins-good \ | |
| gstreamer1.0-plugins-bad \ | |
| gstreamer1.0-plugins-ugly \ | |
| gstreamer1.0-tools | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo- | |
| - name: Build | |
| run: cargo build --workspace --all-targets | |
| - name: Run tests | |
| run: cargo test --workspace --verbose | |
| test-windows: | |
| name: Test (Windows) | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install GStreamer | |
| run: | | |
| choco install gstreamer gstreamer-devel --yes | |
| - name: Set GStreamer environment | |
| shell: pwsh | |
| run: | | |
| $gstRoot = "C:\Program Files\gstreamer\1.0\msvc_x86_64" | |
| # Add GStreamer bin to PATH | |
| Add-Content $env:GITHUB_PATH "$gstRoot\bin" | |
| # Set GStreamer root for system-deps detection | |
| Add-Content $env:GITHUB_ENV "GSTREAMER_1_0_ROOT_MSVC_X86_64=$gstRoot" | |
| # Library path for MSVC linker | |
| Add-Content $env:GITHUB_ENV "LIB=$gstRoot\lib;$env:LIB" | |
| - name: Install pkgconf via vcpkg | |
| run: | | |
| vcpkg install pkgconf:x64-windows | |
| echo "C:\vcpkg\installed\x64-windows\tools\pkgconf" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
| - name: Set PKG_CONFIG_PATH | |
| shell: pwsh | |
| run: | | |
| # Use semicolon as path separator for Windows pkgconf | |
| Add-Content $env:GITHUB_ENV "PKG_CONFIG_PATH=C:\Program Files\gstreamer\1.0\msvc_x86_64\lib\pkgconfig" | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo- | |
| - name: Build | |
| run: cargo build --workspace --all-targets | |
| - name: Run tests | |
| run: cargo test --workspace --verbose | |
| test-macos: | |
| name: Test (macOS) | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install GStreamer | |
| run: | | |
| brew install gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo- | |
| - name: Build | |
| run: cargo build --workspace --all-targets | |
| - name: Run tests | |
| run: cargo test --workspace --verbose | |
| clippy: | |
| name: Clippy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install GStreamer | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libgstreamer1.0-dev \ | |
| libgstreamer-plugins-base1.0-dev | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - name: Run Clippy | |
| run: cargo clippy --workspace --all-targets -- -D warnings | |
| fmt: | |
| name: Format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check |