summaryrefslogtreecommitdiffstats
path: root/.github/workflows/build.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/build.yml')
-rw-r--r--.github/workflows/build.yml166
1 files changed, 149 insertions, 17 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 57cd24b37e..280874bb95 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -27,15 +27,19 @@ on:
jobs:
mingw:
- runs-on: ubuntu-22.04
+ runs-on: ubuntu-24.04
env:
CCACHE_BASEDIR: ${{ github.workspace }}
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_MAXSIZE: 500M
+ WINE: ${{ matrix.wine }}
strategy:
fail-fast: false
matrix:
- target: [i686-w64-mingw32, x86_64-w64-mingw32]
+ include:
+ - target: i686-w64-mingw32
+ - target: x86_64-w64-mingw32
+ wine: wine
steps:
- uses: actions/checkout@v4
@@ -43,18 +47,30 @@ jobs:
id: get_time
run: echo "timestamp=`date +%s%N`" >> $GITHUB_OUTPUT
- - uses: actions/cache@v4
+ - name: Restore cache
+ uses: actions/cache/restore@v4
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ matrix.target }}-${{ steps.get_time.outputs.timestamp }}
restore-keys: ${{ matrix.target }}-
- - name: Install dependencies
+ # For LuaJIT build
+ - name: Enable multilib
+ if: ${{ matrix.target == 'i686-w64-mingw32' }}
run: |
sudo dpkg --add-architecture i386
sudo apt-get update
- sudo apt-get install -y autoconf automake pkg-config g++-mingw-w64 gcc-multilib python3-pip ninja-build nasm wine wine32 wine64 ccache
- sudo python3 -m pip install meson
+ sudo apt-get install -y gcc-multilib
+
+ - name: Install dependencies
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y ccache g++-mingw-w64 meson nasm ninja-build pkg-config ${{ matrix.wine }}
+
+ - name: Install Meson Wraps
+ run: |
+ mkdir subprojects -p
+ meson wrap install mujs
- name: Build libraries
run: |
@@ -72,20 +88,131 @@ jobs:
- name: Print meson log
if: ${{ failure() && steps.build.outcome == 'failure' }}
run: |
- cat ./build/meson-logs/meson-log.txt
+ cat ./mingw_build/meson-logs/meson-log.txt
- name: Functional test
- id: tests
+ if: ${{ matrix.wine }}
run: |
- cd artifact && wine64 ./mpv.com -v --no-config
+ cd artifact && wine ./mpv.com -v --no-config
env:
WINEDEBUG: '+loaddll'
+ - name: Run meson tests
+ if: ${{ matrix.wine }}
+ id: tests
+ run: |
+ meson test -C mingw_build
+
+ - name: Print meson test log
+ if: ${{ failure() && steps.tests.outcome == 'failure' }}
+ run: |
+ cat ./mingw_build/meson-logs/testlog.txt
+
- uses: actions/upload-artifact@v4
with:
name: mpv-${{ matrix.target }}
path: mpv-git-*.zip
+ - name: Save Cache
+ uses: actions/cache/save@v4
+ if: always()
+ with:
+ path: ${{ env.CCACHE_DIR }}
+ key: ${{ matrix.target }}-${{ steps.get_time.outputs.timestamp }}
+
+ win32:
+ runs-on: windows-latest
+ env:
+ VS: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise"
+ CC: "ccache clang"
+ CXX: "ccache clang++"
+ CC_LD: "lld"
+ CXX_LD: "lld"
+ WINDRES: "llvm-rc"
+ CCACHE_BASEDIR: ${{ github.workspace }}
+ CCACHE_DIR: "${{ github.workspace }}\\.ccache"
+ CCACHE_MAXSIZE: 500M
+ steps:
+ - name: Disable autocrlf
+ run: |
+ git config --global core.autocrlf false
+ git config --global core.eol lf
+
+ - uses: actions/checkout@v4
+
+ - name: Get time
+ id: get_time
+ run: |
+ "timestamp=$((Get-Date).Ticks)" >> $env:GITHUB_OUTPUT
+
+ - name: Restore cache
+ uses: actions/cache/restore@v4
+ with:
+ path: ${{ env.CCACHE_DIR }}
+ key: x86_64-windows-msvc-${{ steps.get_time.outputs.timestamp }}
+ restore-keys: x86_64-windows-msvc-
+
+ # 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
+ choco install ccache
+
+ - name: Update Meson WrapDB
+ run: |
+ meson wrap update-db
+ # Explicitly download wraps, as nested projects may have older versions of them.
+ meson wrap install expat
+ meson wrap install harfbuzz
+ meson wrap install libpng
+ meson wrap install zlib
+
+ - name: Build
+ id: build
+ run: |
+ $env:PATH = ($env:PATH -split ';' | Where-Object { $_ -ne 'C:\Program Files\LLVM\bin' -and `
+ $_ -ne 'C:\Strawberry\c\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: |
+ $env:PATH = ($env:PATH -split ';' | Where-Object { $_ -ne 'C:\Program Files\LLVM\bin' -and `
+ $_ -ne 'C:\Strawberry\c\bin' }) -join ';'
+ 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/vulkan-*.dll
+ !build/mpv.lib
+
+ - name: Save Cache
+ uses: actions/cache/save@v4
+ if: always()
+ with:
+ path: ${{ env.CCACHE_DIR }}
+ key: x86_64-windows-msvc-${{ steps.get_time.outputs.timestamp }}
+
macos:
runs-on: ${{ matrix.os }}
strategy:
@@ -122,7 +249,7 @@ jobs:
- name: Install dependencies
run: |
brew update
- brew install autoconf automake pkg-config libtool python freetype fribidi little-cms2 \
+ brew install -q autoconf automake pkg-config libtool python freetype fribidi little-cms2 \
luajit libass ffmpeg meson uchardet mujs libplacebo molten-vk vulkan-loader vulkan-headers
- name: Build with meson
@@ -160,7 +287,7 @@ jobs:
path: mpv.tar.gz
linux:
- runs-on: "ubuntu-22.04"
+ runs-on: ubuntu-latest
container:
image: "registry.opensuse.org/home/mia/images/images/mpv-ci:stable-deps"
env:
@@ -206,7 +333,7 @@ jobs:
cat ./build/meson-logs/testlog.txt
linux-fuzz:
- runs-on: "ubuntu-latest"
+ runs-on: ubuntu-latest
container:
image: "registry.opensuse.org/home/mia/images/images/mpv-ci:stable-deps"
env:
@@ -230,7 +357,7 @@ jobs:
cat ./build/meson-logs/meson-log.txt
linux-ffmpeg-4-4:
- runs-on: ubuntu-22.04
+ runs-on: ubuntu-latest
container:
# We want to test ffmpeg 4.4 which alpine 3.15 has exactly.
# Furthermore, this is a very minimal build of mpv without commonly
@@ -377,7 +504,9 @@ jobs:
fail-fast: false
matrix:
sys:
+ - clang32
- clang64
+ - mingw32
- mingw64
- ucrt64
defaults:
@@ -396,10 +525,8 @@ jobs:
update: true
install: git
pacboy: >-
- angleproject:p
ca-certificates:p
cc:p
- diffutils:p
ffmpeg:p
lcms2:p
libarchive:p
@@ -413,18 +540,23 @@ jobs:
ninja:p
pkgconf:p
python:p
- rst2pdf:p
- rubberband:p
shaderc:p
spirv-cross:p
uchardet:p
vapoursynth:p
vulkan-devel:p
+ - name: Install dependencies
+ if: ${{ matrix.sys != 'clang32' && matrix.sys != 'mingw32' }}
+ run: |
+ pacboy --noconfirm -S {angleproject,rst2pdf,rubberband}:p
+
- name: Build with meson
id: build
run: |
./ci/build-msys2.sh meson
+ env:
+ SYS: ${{ matrix.sys }}
- name: Print meson log
if: ${{ failure() && steps.build.outcome == 'failure' }}