Skip to content

Add meson build system #18

Add meson build system

Add meson build system #18

Workflow file for this run

name: Build on Windows
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_call:
jobs:
build-win:
strategy:
fail-fast: false
matrix:
arch: [x86, x64]
name: "Test Windows MSVC (${{ matrix.arch }})"
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Install Meson
run: pip install meson
- name: Install ffmpeg
run: vcpkg install ffmpeg[avcodec,avdevice,avfilter,avformat,swresample,swscale,zlib,bzip2,core,dav1d,gpl,version3,lzma,openssl,xml2]:${{ matrix.arch }}-windows-static
- name: Set VCPKG_PATH environment variable
run: |
$vcpkg_path = Split-Path (Get-Command vcpkg).Source -Parent
echo "VCPKG_PATH=$vcpkg_path" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Setup MSVC Developer Command Prompt
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.arch }}
- name: Install pkgconf
run: |
winget install pkgconf.pkgconf --accept-package-agreements --accept-source-agreements --disable-interactivity
$pkgconfExePath = (Get-Command pkgconf).Source
$pkgconfDirPath = Split-Path -Path $pkgconfExePath -Parent
echo $pkgconfDirPath | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Configure with Meson
run: |
meson setup builddir `
--buildtype=release `
--vsenv `
-Dtest=enabled `
-Davisynth=enabled `
--pkg-config-path="$env:VCPKG_PATH\installed\${{ matrix.arch }}-windows-static\lib\pkgconfig" `
-Db_vscrt=mt
# Use "-Db_vscrt=mt" to avoid this warning: LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
- name: Build
run: meson compile -C builddir --verbose
- name: Run tests
run: meson test -C builddir --verbose
- name: Install
run: meson install -C builddir --destdir install
- name: Upload Build
uses: actions/upload-artifact@v6
with:
name: ffms2_windows_${{ matrix.arch }}
path: builddir/install