mirror of https://github.com/mpv-player/mpv
ci: migrate MSYS2 build to GitHub Actions
This commit is contained in:
parent
c3149d9fc2
commit
bc1af592db
|
@ -205,3 +205,67 @@ jobs:
|
|||
if: ${{ failure() }}
|
||||
run: |
|
||||
cat ./build/config.log
|
||||
|
||||
msys2:
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sys:
|
||||
- clang32
|
||||
- clang64
|
||||
- mingw32
|
||||
- mingw64
|
||||
- ucrt64
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: ${{ matrix.sys }}
|
||||
update: true
|
||||
install: git
|
||||
pacboy: >-
|
||||
angleproject:p
|
||||
cc:p
|
||||
diffutils:p
|
||||
ffmpeg:p
|
||||
lcms2:p
|
||||
libarchive:p
|
||||
libass:p
|
||||
libcdio-paranoia:p
|
||||
libdvdnav:p
|
||||
libjpeg-turbo:p
|
||||
libplacebo:p
|
||||
luajit:p
|
||||
meson:p
|
||||
ninja:p
|
||||
pkgconf:p
|
||||
python:p
|
||||
rst2pdf:p
|
||||
rubberband:p
|
||||
shaderc:p
|
||||
spirv-cross:p
|
||||
uchardet:p
|
||||
vapoursynth:p
|
||||
vulkan:p
|
||||
|
||||
- name: Build with meson
|
||||
run: |
|
||||
./ci/build-msys2.sh meson
|
||||
|
||||
- name: Print meson log
|
||||
if: ${{ failure() }}
|
||||
run: |
|
||||
cat ./build_meson/meson-logs/meson-log.txt
|
||||
|
||||
- name: Build with waf
|
||||
run: |
|
||||
./ci/build-msys2.sh waf
|
||||
|
||||
- name: Print waf log
|
||||
if: ${{ failure() }}
|
||||
run: |
|
||||
cat ./build/config.log
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
#!/usr/bin/bash
|
||||
set -e
|
||||
|
||||
export DEST_OS=win32
|
||||
export CC=gcc
|
||||
export PKG_CONFIG=/usr/bin/pkg-config
|
||||
export PERL=/usr/bin/perl
|
||||
export PYTHON=/usr/bin/python3
|
||||
|
||||
"$PYTHON" bootstrap.py
|
||||
"$PYTHON" waf configure \
|
||||
--check-c-compiler=gcc \
|
||||
--enable-spirv-cross \
|
||||
--enable-d3d-hwaccel \
|
||||
--enable-d3d11 \
|
||||
--enable-jpeg \
|
||||
--enable-lcms2 \
|
||||
--enable-libarchive \
|
||||
--enable-lua \
|
||||
--enable-rubberband \
|
||||
--enable-shaderc \
|
||||
--enable-uchardet \
|
||||
--enable-vulkan
|
||||
"$PYTHON" waf build
|
|
@ -1,54 +0,0 @@
|
|||
#!/usr/bin/bash
|
||||
set -e
|
||||
|
||||
export PYTHON=/usr/bin/python3
|
||||
|
||||
# Write an empty fonts.conf to speed up fc-cache
|
||||
export FONTCONFIG_FILE=/dummy-fonts.conf
|
||||
cat >"$FONTCONFIG_FILE" <<EOF
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
<fontconfig></fontconfig>
|
||||
EOF
|
||||
|
||||
# Install build dependencies for mpv
|
||||
pacman -S --noconfirm --needed \
|
||||
$MINGW_PACKAGE_PREFIX-toolchain \
|
||||
$MINGW_PACKAGE_PREFIX-cmake \
|
||||
$MINGW_PACKAGE_PREFIX-lcms2 \
|
||||
$MINGW_PACKAGE_PREFIX-libarchive \
|
||||
$MINGW_PACKAGE_PREFIX-libass \
|
||||
$MINGW_PACKAGE_PREFIX-libjpeg-turbo \
|
||||
$MINGW_PACKAGE_PREFIX-libplacebo \
|
||||
$MINGW_PACKAGE_PREFIX-lua51 \
|
||||
$MINGW_PACKAGE_PREFIX-ninja \
|
||||
$MINGW_PACKAGE_PREFIX-rubberband \
|
||||
$MINGW_PACKAGE_PREFIX-shaderc \
|
||||
$MINGW_PACKAGE_PREFIX-spirv-cross \
|
||||
$MINGW_PACKAGE_PREFIX-uchardet \
|
||||
$MINGW_PACKAGE_PREFIX-vulkan
|
||||
|
||||
# Delete unused packages to reduce space used in the Appveyor cache
|
||||
pacman -Sc --noconfirm
|
||||
|
||||
# Compile ffmpeg
|
||||
(
|
||||
git clone --depth=1 https://github.com/FFmpeg/ffmpeg.git && cd ffmpeg
|
||||
|
||||
mkdir build && cd build
|
||||
../configure \
|
||||
--prefix=$MINGW_PREFIX \
|
||||
--target-os=mingw32 \
|
||||
--arch=$MSYSTEM_CARCH \
|
||||
--disable-static \
|
||||
--disable-doc \
|
||||
--disable-asm \
|
||||
--enable-gpl \
|
||||
--enable-version3 \
|
||||
--enable-shared \
|
||||
--enable-pic \
|
||||
--enable-d3d11va \
|
||||
--enable-dxva2 \
|
||||
--enable-schannel
|
||||
make -j4 install
|
||||
)
|
38
appveyor.yml
38
appveyor.yml
|
@ -1,38 +0,0 @@
|
|||
image: Visual Studio 2019
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- appveyor
|
||||
- ci
|
||||
|
||||
environment:
|
||||
global:
|
||||
PATH: C:\msys64\usr\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
|
||||
matrix:
|
||||
- MSYSTEM: MINGW64
|
||||
- MSYSTEM: MINGW32
|
||||
|
||||
shallow_clone: true
|
||||
test: off
|
||||
|
||||
install:
|
||||
# Disable checking disk space to speed up install time
|
||||
- C:\msys64\usr\bin\sed -i 's/^CheckSpace/#CheckSpace/g' /etc/pacman.conf
|
||||
# Update core packages
|
||||
- C:\msys64\usr\bin\pacman -Syyuu --noconfirm --noprogressbar --ask=20
|
||||
# Explicitly kill any remaining msys2 processes after core update
|
||||
- taskkill /f /fi "MODULES eq msys-2.0.dll"
|
||||
# Update non-core packages
|
||||
- C:\msys64\usr\bin\pacman -Suu --noconfirm --noprogressbar --ask=20
|
||||
# Install required MSYS2 packages
|
||||
- C:\msys64\usr\bin\pacman -S --noconfirm --noprogressbar --needed base-devel perl python pkgconf
|
||||
# Now MSYS2 is up to date, do the rest of the install from a bash script
|
||||
- C:\msys64\usr\bin\bash -lc "cd && exec \"$APPVEYOR_BUILD_FOLDER\"/TOOLS/appveyor-install.sh"
|
||||
build_script:
|
||||
- C:\msys64\usr\bin\bash -lc "cd \"$APPVEYOR_BUILD_FOLDER\" && exec ./TOOLS/appveyor-build.sh"
|
||||
on_failure:
|
||||
- type "%APPVEYOR_BUILD_FOLDER%\build\config.log"
|
||||
|
||||
cache:
|
||||
- C:\msys64\var\cache\pacman\pkg
|
|
@ -0,0 +1,56 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
if [ "$1" = "meson" ]; then
|
||||
meson setup build_meson \
|
||||
-D cdda=enabled \
|
||||
-D d3d-hwaccel=enabled \
|
||||
-D d3d11=enabled \
|
||||
-D dvdnav=enabled \
|
||||
-D egl-angle-win32=enabled \
|
||||
-D jpeg=enabled \
|
||||
-D lcms2=enabled \
|
||||
-D libarchive=enabled \
|
||||
-D libbluray=enabled \
|
||||
-D libmpv=true \
|
||||
-D libplacebo=enabled \
|
||||
-D lua=luajit \
|
||||
-D pdf-build=enabled \
|
||||
-D rubberband=enabled \
|
||||
-D shaderc=enabled \
|
||||
-D spirv-cross=enabled \
|
||||
-D tests=true \
|
||||
-D uchardet=enabled \
|
||||
-D vapoursynth=enabled \
|
||||
-D vulkan=enabled
|
||||
meson compile -C build_meson --verbose
|
||||
cp ./build_meson/generated/mpv.com ./build_meson
|
||||
meson test -C build_meson
|
||||
./build_meson/mpv.com --no-config -v --unittest=all-simple
|
||||
fi
|
||||
|
||||
if [ "$1" = "waf" ]; then
|
||||
./bootstrap.py
|
||||
./waf configure \
|
||||
--enable-cdda \
|
||||
--enable-d3d-hwaccel \
|
||||
--enable-d3d11 \
|
||||
--enable-dvdnav \
|
||||
--enable-egl-angle-win32 \
|
||||
--enable-jpeg \
|
||||
--enable-lcms2 \
|
||||
--enable-libarchive \
|
||||
--enable-libbluray \
|
||||
--enable-libmpv-shared \
|
||||
--enable-libplacebo \
|
||||
--enable-pdf-build \
|
||||
--enable-rubberband \
|
||||
--enable-shaderc \
|
||||
--enable-spirv-cross \
|
||||
--enable-tests \
|
||||
--enable-uchardet \
|
||||
--enable-vapoursynth \
|
||||
--lua=luajit \
|
||||
--enable-vulkan
|
||||
./waf build --verbose
|
||||
./build/mpv.com -v --no-config -v --unittest=all-simple
|
||||
fi
|
Loading…
Reference in New Issue