on: [push]
name: build
jobs:
check:
name: dash-mpd-cli check/nightly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: dtolnay/rust-toolchain@nightly
- name: Install protobuf compiler
run: sudo apt-get update && sudo apt-get install protobuf-compiler
- 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-641.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 --features sandbox -- --show-output
- run: cargo doc --no-deps --all-features
build-macos:
runs-on: macos-14
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: dtolnay/rust-toolchain@stable
- name: install protobuf compiler
run: brew install protobuf cmake
- 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-641.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
env:
DOCKER: "docker"
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: dtolnay/rust-toolchain@stable
- uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: true
install: base-devel autotools mingw-w64-ucrt-x86_64-toolchain mingw-w64-ucrt-x86_64-rust mingw-w64-ucrt-x86_64-gcc
path-type: inherit
- name: install protobuf compiler
run: choco install --yes --limit-output -–no-progress protoc
- name: install NASM for rustls-tls build
run: |
choco install --yes --limit-output -–no-progress nasm
echo "C:\Program Files\NASM" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- 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 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
- name: install xsltproc
run: choco install --yes --limit-output -–no-progress xsltproc
- name: install podman
run: |
mkdir ~/.ssh
choco install --yes --limit-output -–no-progress podman-cli
podman machine init
podman machine start
- run: cargo build --jobs 1 --verbose
shell: msys2 {0}
- run: cargo test --jobs 1 -- --show-output --test-threads=1
shell: msys2 {0}