| name: CI |
| on: [push, pull_request] |
| jobs: |
| build: |
| runs-on: ubuntu-18.04 |
| env: |
| CC: gcc-10 |
| CXX: g++-10 |
| steps: |
| - name: Set up Python 3.8 |
| uses: actions/setup-python@v2 |
| with: |
| python-version: '3.8' |
| - name: Install dependencies |
| run: | |
| DEBIAN_FRONTEND=noninteractive sudo apt-get update |
| DEBIAN_FRONTEND=noninteractive sudo apt-get install -y ninja-build gcc-10 g++-10 |
| pip install --upgrade pip |
| pip install setuptools |
| pip install meson |
| - name: Install nasm |
| run: | |
| curl -L https://download.videolan.org/contrib/nasm/nasm-2.14.tar.gz | tar xvz |
| cd nasm-2.14 |
| ./configure && make -j2 && sudo make install |
| nasm --version |
| - uses: actions/checkout@v2 |
| - name: Setup aom |
| working-directory: ./ext |
| run: bash aom.cmd |
| - name: Setup dav1d |
| working-directory: ./ext |
| run: bash dav1d.cmd |
| - name: Setup rav1e |
| working-directory: ./ext |
| run: bash rav1e.cmd |
| - name: Setup libgav1 |
| working-directory: ./ext |
| run: bash libgav1.cmd |
| - name: Prepare libavif (cmake) |
| run: | |
| mkdir build && cd build |
| cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DAVIF_CODEC_AOM=ON -DAVIF_LOCAL_AOM=ON -DAVIF_CODEC_DAV1D=ON -DAVIF_LOCAL_DAV1D=ON -DAVIF_CODEC_RAV1E=ON -DAVIF_LOCAL_RAV1E=ON -DAVIF_CODEC_LIBGAV1=ON -DAVIF_LOCAL_LIBGAV1=ON -DAVIF_BUILD_TESTS=1 |
| - name: Build libavif (make) |
| working-directory: ./build |
| run: make -j $(($(nproc) + 1)) |
| - name: Run AVIF Tests |
| working-directory: ./build |
| run: ./aviftest ../tests/data |