Tests: force use of ffmpeg libx264 encoder to avoid limitations of pl… #139
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run cargo tests in a FreeBSD VM. | |
# | |
# See https://github.com/cross-platform-actions/action | |
# (previously using https://github.com/vmactions/freebsd-vm which was causing infloops on boot) | |
on: [push] | |
name: freebsd | |
jobs: | |
test: | |
runs-on: macos-latest | |
# these tests are extremely slow to run | |
timeout-minutes: 450 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run tests in FreeBSD VM | |
uses: cross-platform-actions/action@v0.21.1 | |
with: | |
operating_system: freebsd | |
version: '13.2' | |
shell: bash | |
environment_variables: CI | |
run: | | |
echo === updating installed packages | |
sudo pkg update | |
echo === installing curl | |
sudo pkg install -y --quiet curl | |
echo === installing rust | |
curl https://sh.rustup.rs -sSf --output rustup.sh | |
sh rustup.sh -y --profile minimal --default-toolchain stable | |
export PATH="${HOME}/.cargo/bin:$PATH" | |
echo "~~~~ rustc --version ~~~~" | |
rustc --version | |
echo === installing mp4decrypt | |
sudo pkg install -y --quiet Bento4 | |
mp4decrypt || true | |
echo === installing ffmpeg | |
sudo pkg install -y --quiet ffmpeg | |
echo === installing gpac/mp4box | |
sudo pkg install -y --quiet multimedia/gpac-mp4box | |
mp4box -version | |
echo === installing shaka-packager | |
# we are depending here on FreeBSD's Linux binary compatibility layer | |
curl https://github.com/shaka-project/shaka-packager/releases/latest/download/packager-linux-x64 --output /tmp/shaka-packager | |
sudo mv /tmp/shaka-packager /usr/local/bin | |
sudo chmod +x /usr/local/bin/shaka-packager | |
export PATH=${PATH}:/usr/local/bin | |
shaka-packager --version | |
echo === installing xsltproc | |
sudo pkg install -y --quiet textproc/libxslt | |
ls -la | |
echo === building rust package | |
cargo build --jobs 1 | |
cargo test --jobs 1 |