Skip to content

test

test #457

Workflow file for this run

name: test
on:
push:
pull_request:
schedule:
- cron: "0 0 * * *"
jobs:
test:
name: Test on ${{ matrix.os_name }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-20.04
os_name: Ubuntu 20.04
- os: ubuntu-22.04
os_name: Ubuntu 22.04
- os: macos-latest
os_name: latest macOS
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Install latest Rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy
- name: Install dependencies (macOS)
if: startsWith(matrix.os, 'macos')
run: |
brew install \
ffmpeg \
pkg-config
- name: Install dependencies (Ubuntu)
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
asciidoc \
clang \
libavcodec-dev \
libavdevice-dev \
libavfilter-dev \
libavformat-dev \
libavresample-dev \
libavutil-dev \
libswscale-dev \
libswresample-dev \
pkg-config
- name: Build
run: |
make
- name: Test
run: |
make test
- name: Lint
if: matrix.os == 'ubuntu-20.04'
run: |
make lint
test-arm:
name: Test on arm64
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Enable arm64 emulation
run: |
docker run --rm --privileged docker/binfmt:a7996909642ee92942dcd6cff44b9b95f08dad64
- name: Build and test
run: |
docker run --rm --volume $PWD:/app zmwangx/arm64v8-rust-ffmpeg:buster /bin/bash -c 'set -x; cd /app && make && make test'