Repository navigation
fix: handle unknown video duration #176
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: | |
| push: | |
| branches: | |
| - '**' | |
| paths: | |
| - 'Cargo.toml' | |
| - 'Cargo.lock' | |
| - '.cargo/**' | |
| - 'rust-toolchain' | |
| - 'rust-toolchain.toml' | |
| - 'wallr/**' | |
| - 'wallr-core/**' | |
| - 'wallr-common/**' | |
| - 'scripts/**' | |
| pull_request: | |
| paths: | |
| - 'Cargo.toml' | |
| - 'Cargo.lock' | |
| - '.cargo/**' | |
| - 'rust-toolchain' | |
| - 'rust-toolchain.toml' | |
| - 'wallr/**' | |
| - 'wallr-core/**' | |
| - 'wallr-common/**' | |
| - 'scripts/**' | |
| permissions: | |
| contents: read | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libwayland-dev \ | |
| wayland-protocols \ | |
| libxkbcommon-dev \ | |
| libegl-dev \ | |
| libgles-dev \ | |
| libavcodec-dev \ | |
| libavformat-dev \ | |
| libavutil-dev \ | |
| libswscale-dev \ | |
| pkg-config | |
| - name: Cache cargo registry and build artifacts | |
| uses: Swatinem/rust-cache@v2.9.3 | |
| - run: cargo fmt --all --check | |
| - name: Check shell scripts | |
| run: for script in scripts/*.sh; do bash -n "$script"; done | |
| - name: Check architecture dependency versions | |
| run: | | |
| python3 - <<'PY' | |
| import re | |
| import tomllib | |
| from pathlib import Path | |
| manifest = tomllib.loads(Path("Cargo.toml").read_text()) | |
| dependencies = manifest["workspace"]["dependencies"] | |
| sctk = dependencies["smithay-client-toolkit"]["version"] | |
| msrv = manifest["workspace"]["package"]["rust-version"] | |
| architecture = Path("docs/architecture.md").read_text() | |
| readme = Path("README.md").read_text() | |
| contributing = Path("CONTRIBUTING.md").read_text() | |
| if not re.search(rf"SCTK {re.escape(sctk)}\b", architecture): | |
| raise SystemExit(f"docs/architecture.md must identify SCTK {sctk}") | |
| if f"msrv-{msrv}" not in readme or not re.search( | |
| rf"rust {re.escape(msrv)} or\s+newer", contributing | |
| ): | |
| raise SystemExit(f"README.md and CONTRIBUTING.md must identify MSRV {msrv}") | |
| release = Path(".github/workflows/release.yml").read_text() | |
| installer = Path("scripts/install-static-ffmpeg.sh").read_text() | |
| vcpkg = re.search(r"VCPKG_COMMIT: ([0-9a-f]+)", release).group(1) | |
| if f"vcpkg_commit={vcpkg}" not in installer: | |
| raise SystemExit("static FFmpeg installer must use the release vcpkg commit") | |
| PY | |
| - run: cargo check --workspace --locked | |
| - run: cargo clippy --workspace --all-targets --locked -- -D warnings | |
| - run: cargo test --workspace --locked | |
| - name: Verify workspace version consistency | |
| run: | | |
| set -euo pipefail | |
| VERSION="$(cargo metadata --no-deps --format-version 1 | jq -re '.packages[] | select(.name=="wallr") | .version')" | |
| for crate in wallr wallr-common wallr-core; do | |
| crate_version="$(cargo metadata --no-deps --format-version 1 | jq -re ".packages[] | select(.name==\"$crate\") | .version")" | |
| test "$crate_version" = "$VERSION" | |
| done | |
| grep -Fq "version = \"$VERSION\"" flake.nix | |
| test "$VERSION" = "0.8.9" | |
| grep -q "## \[0.8.9\]" CHANGELOG.md | |
| msrv: | |
| name: MSRV (1.90) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: dtolnay/rust-toolchain@1.90 | |
| with: | |
| components: rustfmt, clippy | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libwayland-dev \ | |
| wayland-protocols \ | |
| libxkbcommon-dev \ | |
| libegl-dev \ | |
| libgles-dev \ | |
| libavcodec-dev \ | |
| libavformat-dev \ | |
| libavutil-dev \ | |
| libswscale-dev \ | |
| lld \ | |
| pkg-config | |
| - name: Cache cargo registry and build artifacts | |
| uses: Swatinem/rust-cache@v2.9.3 | |
| - run: cargo check --workspace --locked | |
| - run: cargo test --workspace --locked |