pssh-box 0.2.4

Parsing and serialization support for PSSH boxes used in DRM systems
Documentation
on: [push, workflow_dispatch]

name: build

jobs:
  check:
    name: pssh-box-rs check/nightly
    runs-on: ubuntu-latest
    timeout-minutes: 15
    steps:
      - uses: actions/checkout@v6
      - uses: dtolnay/rust-toolchain@nightly
      - uses: taiki-e/install-action@cargo-hack

      # To remove once https://github.com/MaterializeInc/rust-protobuf-native/issues/20 is resolved
      - name: Install gtest
        uses: MarkusJx/googletest-installer@v1.1

      - name: Install protoc compiler
        run: |
          sudo apt-get update
          sudo apt-get install protobuf-compiler

      - run: cargo check
      - run: cargo hack check --feature-powerset --no-dev-deps

  test-linux:
    name: linux
    runs-on: ubuntu-latest
    timeout-minutes: 15
    steps:
      - uses: actions/checkout@v6
      - uses: dtolnay/rust-toolchain@stable

      # To remove once https://github.com/MaterializeInc/rust-protobuf-native/issues/20 is resolved
      - name: Install gtest
        uses: MarkusJx/googletest-installer@v1.1

      - name: Install protoc compiler
        run: |
          sudo apt-get update
          sudo apt-get install protobuf-compiler

      - run: cargo test --jobs 1 --all-features

  test-protox:
    name: protox
    runs-on: ubuntu-latest
    timeout-minutes: 15
    steps:
      - uses: actions/checkout@v6
      - uses: dtolnay/rust-toolchain@stable

      - run: cargo test --features protox --jobs 1


  test-windows:
    name: windows
    runs-on: windows-latest
    timeout-minutes: 60
    steps:
      - uses: actions/checkout@v6

      # To remove once https://github.com/MaterializeInc/rust-protobuf-native/issues/20 is resolved
      - name: Install gtest
        uses: MarkusJx/googletest-installer@v1.1

      - uses: msys2/setup-msys2@v2
        with:
          install: base-devel autotools mingw-w64-x86_64-toolchain mingw-w64-x86_64-rust mingw-w64-ucrt-x86_64-gcc mingw-w64-x86_64-cmake git

      - name: run tests
        shell: msys2 {0}
        run: cargo test --jobs 1 --all-features

  test-macos:
    name: macos
    runs-on: macos-latest
    timeout-minutes: 30
    steps:
      - uses: actions/checkout@v6
      - uses: dtolnay/rust-toolchain@stable

      # To remove once https://github.com/MaterializeInc/rust-protobuf-native/issues/20 is resolved
      - name: Install gtest
        run: brew install googletest

      - name: install protobuf compiler
        run: brew install protobuf

      - run: cargo test --jobs 1 --all-features