mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
ci: add Windows native build
x86_64-pc-windows-msvc build without mingw dependency. For now it lacks some key dependencies like lua or shaderc. Will be extended in the future.
This commit is contained in:
61
.github/workflows/build.yml
vendored
61
.github/workflows/build.yml
vendored
@@ -86,6 +86,67 @@ jobs:
|
||||
name: mpv-${{ matrix.target }}
|
||||
path: mpv-git-*.zip
|
||||
|
||||
win32:
|
||||
runs-on: windows-latest
|
||||
env:
|
||||
VS: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise"
|
||||
CC: "clang"
|
||||
CXX: "clang++"
|
||||
CC_LD: "lld"
|
||||
CXX_LD: "lld"
|
||||
WINDRES: "llvm-rc"
|
||||
steps:
|
||||
- name: Disable autocrlf
|
||||
run: |
|
||||
git config --global core.autocrlf false
|
||||
git config --global core.eol lf
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# https://github.com/mesonbuild/meson/pull/11715
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
git clone https://github.com/kasper93/meson --depth 1 -b 8981
|
||||
python -m pip install build wheel
|
||||
python -m build --wheel --no-isolation meson
|
||||
python -m pip install (Get-Item ./meson/dist/meson-*-py3-none-any.whl).FullName
|
||||
|
||||
- name: Update Meson WrapDB
|
||||
run: |
|
||||
meson wrap update-db
|
||||
|
||||
- name: Build
|
||||
id: build
|
||||
run: |
|
||||
$env:PATH = ($env:PATH -split ';' | Where-Object { $_ -ne 'C:\Program Files\LLVM\bin' }) -join ';'
|
||||
Import-Module "$env:VS\Common7\Tools\Microsoft.VisualStudio.DevShell.dll"
|
||||
Enter-VsDevShell -VsInstallPath $env:VS -SkipAutomaticLocation -DevCmdArguments "-arch=x64 -host_arch=x64"
|
||||
./ci/build-win32.ps1
|
||||
|
||||
- name: Print build log
|
||||
if: ${{ failure() && steps.build.outcome == 'failure' }}
|
||||
run: |
|
||||
cat ./build/meson-logs/meson-log.txt
|
||||
|
||||
- name: Run meson tests
|
||||
id: tests
|
||||
run: |
|
||||
Import-Module "$env:VS\Common7\Tools\Microsoft.VisualStudio.DevShell.dll"
|
||||
Enter-VsDevShell -VsInstallPath $env:VS -SkipAutomaticLocation -DevCmdArguments "-arch=x64 -host_arch=x64"
|
||||
meson test -C build mpv:
|
||||
|
||||
- name: Print meson test log
|
||||
if: ${{ failure() && steps.tests.outcome == 'failure' }}
|
||||
run: |
|
||||
cat ./build/meson-logs/testlog.txt
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: mpv-x86_64-windows-msvc
|
||||
path: |
|
||||
build/mpv.???
|
||||
!build/mpv.lib
|
||||
|
||||
macos:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
|
||||
Reference in New Issue
Block a user