Skip to content

[DO NOT MERGE] Progressively add tests to see if build still passes #2496

[DO NOT MERGE] Progressively add tests to see if build still passes

[DO NOT MERGE] Progressively add tests to see if build still passes #2496

Workflow file for this run

name: libvmaf
on:
push:
pull_request:
env:
DEBIAN_FRONTEND: noninteractive
jobs:
libvmaf-build:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
CC: ccache gcc
CXX: ccache g++
- os: ubuntu-latest
CC: ccache gcc-9
CXX: ccache g++-9
- os: ubuntu-latest
CC: ccache clang
CXX: ccache clang++
- os: macos-latest
CC: ccache clang
CXX: ccache clang++
experimental: true
runs-on: ${{ matrix.os }}
env:
CC: ${{ matrix.CC }}
CXX: ${{ matrix.CXX }}
steps:
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install meson and ninja
run: |
python -m pip install --upgrade pip
pip install meson
- name: Install dependencies (ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo -E apt-get -yq install ccache ninja-build libomp-dev
case "$CC" in
*gcc) sudo -E apt-get -yq install gcc g++ nasm ;;
*gcc-9)
sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
sudo -E apt-get -yq install gcc-9 g++-9 nasm
;;
*clang) sudo -E apt-get -yq install clang nasm ;;
esac
$CC --version
meson --version
ccache --version
- name: Install dependencies (mac)
if: matrix.os == 'macos-latest'
run: |
brew install -q ninja nasm ccache
$CC --version
meson --version
ccache --version
- uses: actions/checkout@v4
- name: Run meson
run: |
meson setup libvmaf libvmaf/build --buildtype release --prefix $PWD/install -Denable_float=true
- name: Run ninja
run: |
sudo ninja -vC libvmaf/build install
- name: Run tests
run: |
sudo ninja -vC libvmaf/build test
- name: Run tox tests
run: |
mkdir -p ~/.ccache && sudo chown -R $(whoami) ~/.ccache
pip install 'tox<4'
tox -c python/ -e py -- -v -p no:warnings -m 'main or lib' --doctest-modules
- name: Get binary path & Current Release
id: get_info
run: |
ldd "./install/bin/vmaf" || true
echo "::set-output name=path::./install/bin/vmaf"
echo "::set-output name=upload_url::$(curl -L https://api.github.com/repos/${{ github.repository }}/releases/tags/$(cut -d/ -f3 <<< ${{ github.ref }}) | jq -r ."upload_url")"
- name: Upload vmaf
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-vmaf
path: ${{ steps.get_info.outputs.path }}
- name: Upload vmaf
if: steps.get_info.outputs.upload_url != 'null'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_info.outputs.upload_url }}
asset_path: ${{ steps.get_info.outputs.path }}
asset_name: vmaf
asset_content_type: application/octet-stream