on: [push]
name: build
jobs:
check:
name: dash-mpd-rs check/nightly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
- run: cargo check
- run: cargo build
- run: cargo build --no-default-features
- name: Install ffmpeg and GPAC
run: sudo apt-get install ffmpeg gpac
- name: Install Bento4 mp4decrypt
run: |
wget -q -O /tmp/bento4.zip https://www.bok.net/Bento4/binaries/Bento4-SDK-1-6-0-640.x86_64-unknown-linux.zip
unzip /tmp/bento4.zip "Bento4-SDK-*/bin/mp4decrypt" -d /tmp
sudo mv /tmp/Bento4-SDK*/bin/mp4decrypt /usr/local/bin
mp4decrypt || true
- run: cargo test -- --show-output
- run: cargo doc --no-deps --all-features
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: cargo build --verbose
- name: install GPAC/MP4Box
run: |
brew update
brew upgrade || true
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install gpac
- name: install ffmpeg
run: brew install ffmpeg
- name: Install Bento4 mp4decrypt
run: |
wget -q -O /tmp/bento4.zip https://www.bok.net/Bento4/binaries/Bento4-SDK-1-6-0-640.universal-apple-macosx.zip
unzip /tmp/bento4.zip "Bento4-SDK-*/bin/mp4decrypt" -d /tmp
sudo mv /tmp/Bento4-SDK*/bin/mp4decrypt /usr/local/bin
mp4decrypt || true
- run: cargo test
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- name: install ffmpeg
run: |
choco install --yes --limit-output ffmpeg
echo "C:\ProgramData\chocolatey\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: install Bento4/mp4decrypt
run: |
Invoke-WebRequest -Uri "https://www.bok.net/Bento4/binaries/Bento4-SDK-1-6-0-640.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-640.x86_64-microsoft-win32/bin/mp4decrypt.exe "C:\tools\mp4decrypt.exe"
Remove-Item -LiteralPath "Bento4-SDK-1-6-0-640.x86_64-microsoft-win32" -Force -Recurse
echo "C:\tools" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
Get-ChildItem c:\tools
- run: cargo build --verbose
- run: cargo test -- --show-output