Add meson build system #1
Workflow file for this run
This file contains hidden or 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
| name: Meson Build | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| build-meson: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| cc: gcc | |
| cxx: g++ | |
| - os: ubuntu-latest | |
| cc: clang | |
| cxx: clang++ | |
| - os: macos-latest | |
| cc: clang | |
| cxx: clang++ | |
| - os: windows-latest | |
| cc: gcc | |
| cxx: g++ | |
| name: "Test (${{ matrix.os }}, ${{ matrix.cc }})" | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| CC: ${{ matrix.cc }} | |
| CXX: ${{ matrix.cxx }} | |
| defaults: | |
| run: | |
| shell: ${{ matrix.os == 'windows-latest' && 'msys2 {0}' || 'bash' }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Install deps (ubuntu) | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| sudo add-apt-repository ppa:ubuntuhandbook1/ffmpeg7 -y | |
| sudo apt-get update | |
| sudo apt-get install autoconf automake wget ffmpeg libavformat-dev libavcodec-dev libswscale-dev libavutil-dev libswresample-dev meson | |
| - name: Install deps (macOS) | |
| if: matrix.os == 'macos-latest' | |
| run: | | |
| brew update | |
| brew install autoconf automake libtool wget ffmpeg meson | |
| - name: Setup MSYS2 (MINGW64) | |
| if: matrix.os == 'windows-latest' | |
| uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: MINGW64 | |
| install: >- | |
| mingw-w64-x86_64-ca-certificates | |
| mingw-w64-x86_64-ffmpeg | |
| mingw-w64-x86_64-meson | |
| mingw-w64-x86_64-toolchain | |
| - name: Configure with Meson | |
| run: > | |
| meson setup builddir -Dtest=enabled | |
| - name: Build | |
| run: meson compile -C builddir --verbose | |
| - name: Run tests | |
| run: meson test -C builddir --verbose |