[go: up one dir, main page]

v_frame 0.3.9

Video Frame data structures, originally part of rav1e
Documentation
name: Crate

on:
  push:
    branches: [ "main" ]
  pull_request:
    branches: [ "main" ]

env:
  CARGO_TERM_COLOR: always
  CARGO_INCREMENTAL: 0

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4
      - name: Build
        run: cargo clippy
      - name: Run tests
        run: cargo test
      - name: Install cargo-msrv
        uses: taiki-e/install-action@v2
        with:
          tool: cargo-msrv
      - name: Validate minimum Rust version
        run: |
          cargo msrv verify

  test-wasm:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          targets: wasm32-unknown-unknown

      - name: Install wasm-pack
        uses: taiki-e/install-action@v2
        with:
          tool: wasm-pack

      - name: Run tests
        run: wasm-pack test --headless --chrome --firefox

  miri:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4

      - name: Install Rust nightly and miri
        uses: dtolnay/rust-toolchain@nightly
        with:
          components: miri, rust-src

      - name: Run miri
        env:
          RUSTFLAGS: -Zrandomize-layout
          MIRIFLAGS: -Zmiri-symbolic-alignment-check
        run: cargo miri test

  code-coverage:
    needs: [ miri, build ]
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4

      - name: Install Rust stable and LLVM tools
        uses: dtolnay/rust-toolchain@stable
        with:
          components: llvm-tools-preview

      - name: Install cargo-llvm-cov
        uses: taiki-e/install-action@v2
        with:
          tool: cargo-llvm-cov

      - name: Generate code coverage
        run: cargo llvm-cov --lcov --output-path lcov.log

      - name: Upload coverage to Codecov
        uses: codecov/codecov-action@v5
        with:
          token: ${{ secrets.CODECOV_TOKEN }}
          files: lcov.log
          fail_ci_if_error: true