Skip to content

Bump actions/upload-artifact from 2 to 3 #2469

Bump actions/upload-artifact from 2 to 3

Bump actions/upload-artifact from 2 to 3 #2469

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-18.04
CC: ccache gcc
CXX: ccache g++
- os: ubuntu-18.04
CC: ccache gcc-9
CXX: ccache g++-9
- os: ubuntu-18.04
CC: ccache clang
CXX: ccache clang++
- os: macos-10.15
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@v2
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-18.04'
run: |
sudo apt-get update
sudo -E apt-get -yq install ccache ninja-build
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-10.15'
run: |
brew install -q ninja nasm ccache
$CC --version
meson --version
ccache --version
- uses: actions/checkout@v2
- 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