on: [push]
name: build
jobs:
check:
name: dash-mpd-rs check/nightly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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 wget
- 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
- name: Install shaka-packager
run: |
wget -q -O /tmp/shaka-packager https://github.com/shaka-project/shaka-packager/releases/latest/download/packager-linux-x64
mv /tmp/shaka-packager /usr/local/bin
chmod +x /usr/local/bin/shaka-packager
- name: Install xsltproc
run: sudo apt install xsltproc
- run: cargo test --jobs 1 -- --show-output
- run: cargo doc --no-deps --all-features
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo build --jobs 1 --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
- name: Install shaka-packager
run: |
wget -q -O /tmp/shaka-packager https://github.com/shaka-project/shaka-packager/releases/latest/download/packager-osx-x64
mv /tmp/shaka-packager /usr/local/bin
chmod +x /usr/local/bin/shaka-packager
- name: install xsltproc
run: brew install libxslt
- run: cargo test --jobs 1 -- --show-output
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- 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
- 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
- name: install xsltproc
run: |
choco install --yes --limit-output xsltproc
- run: cargo build --jobs 1 --verbose
- run: cargo test --jobs 1 -- --show-output