dash-mpd 0.20.2

Parse, serialize, download an MPD manifest for MPEG-DASH or WebM-DASH media streaming
Documentation
on: [push]

name: windows

# This is currently needed to build the http3 functionality in the reqwest crate
env:
  RUSTFLAGS: '--cfg reqwest_unstable'

jobs:
  build:
    runs-on: windows-latest
    timeout-minutes: 150
    steps:
    - uses: actions/checkout@v6
      with:
        fetch-depth: 0

    - uses: msys2/setup-msys2@v2
      with:
        path-type: inherit
        update: true
        install: base-devel autotools mingw-w64-x86_64-toolchain mingw-w64-x86_64-rust mingw-w64-ucrt-x86_64-gcc

    - uses: taiki-e/install-action@cargo-hack

    # The executables installed by choco are not available on the PATH in the current shell.
    # In normal use you would restart your shell, but a GitHub action is all run in the same shell,
    # so we need to add to the path explicitly.
    - name: install GPAC/MP4Box
      run: |
         choco install --yes --limit-output -–no-progress gpac
         echo "C:\Program Files\GPAC" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

    # The ffmpeg executable is installed at C:\ProgramData\chocolatey\lib\ffmpeg\tools\ffmpeg\bin\ffmpeg.exe
    # A shim is created at C:\ProgramData\chocolatey\bin\ffmpeg.exe.
    - name: install ffmpeg
      run: |
         choco install --yes --limit-output -–no-progress ffmpeg
         echo "C:\ProgramData\chocolatey\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

    - name: install mkvmerge
      run: |
         choco install --yes --limit-output -–no-progress mkvtoolnix
         echo "C:\Program Files\MKVToolNix" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

    # Isn't this fun
    - name: install Bento4/mp4decrypt
      run: |
          Invoke-WebRequest -Uri "https://www.bok.net/Bento4/binaries/Bento4-SDK-1-6-0-641.x86_64-microsoft-win32.zip" -OutFile bento4.zip
          Expand-Archive -Path bento4.zip -DestinationPath .
          Get-ChildItem
          del bento4.zip
          New-Item -ItemType Directory -Force -Path "C:\tools"
          cp Bento4-SDK-1-6-0-641.x86_64-microsoft-win32/bin/mp4decrypt.exe "C:\tools\mp4decrypt.exe"
          Remove-Item -LiteralPath "Bento4-SDK-1-6-0-641.x86_64-microsoft-win32" -Force -Recurse
          echo "C:\tools" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
          Get-ChildItem c:\tools

    - name: Install shaka-packager
      run: |
          Invoke-WebRequest -Uri "https://github.com/shaka-project/shaka-packager/releases/latest/download/packager-win-x64.exe" -OutFile c:\tools\shaka-packager.exe

    # Note: this also installs the xmllint executable that we need for the serialization tests.
    - name: install xsltproc
      run: choco install --yes --limit-output -–no-progress xsltproc

    - name: install protobuf compiler
      run: choco install --yes --limit-output -–no-progress protoc

    - name: install mediainfo (CLI)
      run: choco install --yes --limit-output -–no-progress mediainfo-cli

    - name: install podman
      run: |
        choco install --yes --limit-output -–no-progress podman-cli
        podman machine init
        podman machine start

    - run: cargo hack check --feature-powerset --exclude-features libav,sandbox,http3,rustls-tls --no-dev-deps
      shell: msys2 {0}

    - run: cargo build
      shell: msys2 {0}

    - run: cargo test --verbose --no-run
      shell: msys2 {0}

    - run: cargo test -- --show-output --test-threads=1
      shell: msys2 {0}