2021-05-06 21:10:21 +00:00
|
|
|
name: build
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- ci
|
|
|
|
- 'release/**'
|
2023-09-24 03:13:41 +00:00
|
|
|
paths-ignore:
|
|
|
|
- 'DOCS/**'
|
|
|
|
- 'TOOLS/lua/**'
|
2024-02-06 15:23:33 +00:00
|
|
|
- '.editorconfig'
|
|
|
|
- '.gitignore'
|
|
|
|
- 'Copyright'
|
|
|
|
- 'README.md'
|
|
|
|
- 'RELEASE_NOTES'
|
2021-05-06 21:10:21 +00:00
|
|
|
pull_request:
|
|
|
|
branches: [master]
|
2023-09-24 03:13:41 +00:00
|
|
|
paths-ignore:
|
|
|
|
- 'DOCS/**'
|
|
|
|
- 'TOOLS/lua/**'
|
2024-02-06 15:23:33 +00:00
|
|
|
- '.editorconfig'
|
|
|
|
- '.gitignore'
|
|
|
|
- 'Copyright'
|
|
|
|
- 'README.md'
|
|
|
|
- 'RELEASE_NOTES'
|
2021-05-06 21:10:21 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
mingw:
|
2022-06-06 18:41:26 +00:00
|
|
|
runs-on: ubuntu-22.04
|
2023-07-23 10:36:38 +00:00
|
|
|
env:
|
|
|
|
CCACHE_BASEDIR: ${{ github.workspace }}
|
|
|
|
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
|
|
|
CCACHE_MAXSIZE: 500M
|
2021-05-06 21:10:21 +00:00
|
|
|
strategy:
|
2023-07-23 10:34:40 +00:00
|
|
|
fail-fast: false
|
2021-05-06 21:10:21 +00:00
|
|
|
matrix:
|
|
|
|
target: [i686-w64-mingw32, x86_64-w64-mingw32]
|
|
|
|
steps:
|
2024-01-24 17:29:49 +00:00
|
|
|
- uses: actions/checkout@v4
|
2021-05-06 21:10:21 +00:00
|
|
|
|
2023-07-23 10:36:38 +00:00
|
|
|
- name: Get time
|
|
|
|
id: get_time
|
|
|
|
run: echo "timestamp=`date +%s%N`" >> $GITHUB_OUTPUT
|
|
|
|
|
2024-01-24 17:29:49 +00:00
|
|
|
- uses: actions/cache@v4
|
2023-07-23 10:36:38 +00:00
|
|
|
with:
|
|
|
|
path: ${{ env.CCACHE_DIR }}
|
|
|
|
key: ${{ matrix.target }}-${{ steps.get_time.outputs.timestamp }}
|
|
|
|
restore-keys: ${{ matrix.target }}-
|
|
|
|
|
2021-05-06 21:10:21 +00:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2023-07-23 10:34:06 +00:00
|
|
|
sudo dpkg --add-architecture i386
|
2021-05-06 21:10:21 +00:00
|
|
|
sudo apt-get update
|
2023-07-23 10:36:38 +00:00
|
|
|
sudo apt-get install -y autoconf automake pkg-config g++-mingw-w64 gcc-multilib python3-pip ninja-build nasm wine wine32 wine64 ccache
|
2023-03-27 23:11:46 +00:00
|
|
|
sudo python3 -m pip install meson
|
2021-05-06 21:10:21 +00:00
|
|
|
|
2022-09-27 13:13:02 +00:00
|
|
|
- name: Build libraries
|
|
|
|
run: |
|
|
|
|
./ci/build-mingw64.sh
|
|
|
|
env:
|
|
|
|
TARGET: ${{ matrix.target }}
|
|
|
|
|
2021-11-07 19:29:11 +00:00
|
|
|
- name: Build with meson
|
2023-02-26 19:05:49 +00:00
|
|
|
id: build
|
2021-05-06 21:10:21 +00:00
|
|
|
run: |
|
2023-01-29 06:31:44 +00:00
|
|
|
./ci/build-mingw64.sh meson pack
|
2021-05-06 21:10:21 +00:00
|
|
|
env:
|
|
|
|
TARGET: ${{ matrix.target }}
|
|
|
|
|
2021-11-07 19:29:11 +00:00
|
|
|
- name: Print meson log
|
2023-03-14 20:08:40 +00:00
|
|
|
if: ${{ failure() && steps.build.outcome == 'failure' }}
|
2021-11-07 19:29:11 +00:00
|
|
|
run: |
|
2022-09-27 13:13:02 +00:00
|
|
|
cat ./build/meson-logs/meson-log.txt
|
2021-11-07 19:29:11 +00:00
|
|
|
|
2023-08-20 11:54:28 +00:00
|
|
|
- name: Functional test
|
|
|
|
id: tests
|
|
|
|
run: |
|
|
|
|
cd artifact && wine64 ./mpv.com -v --no-config
|
|
|
|
env:
|
|
|
|
WINEDEBUG: '+loaddll'
|
|
|
|
|
2022-09-27 13:32:21 +00:00
|
|
|
- uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: mpv-${{ matrix.target }}
|
|
|
|
path: mpv-git-*.zip
|
|
|
|
|
2021-07-23 09:24:38 +00:00
|
|
|
macos:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
cc:
|
|
|
|
- "clang"
|
2023-09-26 12:12:31 +00:00
|
|
|
cxx:
|
|
|
|
- "clang++"
|
2021-07-23 09:24:38 +00:00
|
|
|
os:
|
2022-05-02 20:32:36 +00:00
|
|
|
- "macos-12"
|
2023-09-21 17:39:57 +00:00
|
|
|
- "macos-13"
|
2024-02-24 18:14:23 +00:00
|
|
|
- "macos-14"
|
2024-02-21 20:12:40 +00:00
|
|
|
include:
|
|
|
|
- os: "macos-12"
|
|
|
|
arch: "intel"
|
|
|
|
- os: "macos-13"
|
|
|
|
arch: "intel"
|
2024-02-24 18:14:23 +00:00
|
|
|
- os: "macos-14"
|
|
|
|
arch: "arm"
|
|
|
|
xcode: "Xcode_15.2"
|
2021-07-23 09:24:38 +00:00
|
|
|
steps:
|
2024-01-24 17:29:49 +00:00
|
|
|
- uses: actions/checkout@v4
|
2021-07-23 09:24:38 +00:00
|
|
|
|
2022-11-11 16:38:06 +00:00
|
|
|
- name: Remove stray upstream python binary symlinks under /usr/local
|
|
|
|
run: |
|
|
|
|
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete -print
|
|
|
|
brew unlink python && brew link --overwrite python
|
|
|
|
|
2024-02-24 18:14:23 +00:00
|
|
|
- name: Change Xcode version
|
|
|
|
if: ${{ matrix.xcode != '' }}
|
|
|
|
run: |
|
|
|
|
sudo xcode-select -s /Applications/${{ matrix.xcode }}.app
|
|
|
|
|
2021-07-23 09:24:38 +00:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
brew update
|
2024-02-22 19:02:43 +00:00
|
|
|
brew install autoconf automake pkg-config libtool python freetype fribidi little-cms2 \
|
|
|
|
luajit libass ffmpeg meson uchardet mujs libplacebo molten-vk vulkan-loader vulkan-headers
|
2021-11-07 19:29:11 +00:00
|
|
|
|
|
|
|
- name: Build with meson
|
2023-02-26 19:05:49 +00:00
|
|
|
id: build
|
2021-11-07 19:29:11 +00:00
|
|
|
run: |
|
2022-11-12 14:27:07 +00:00
|
|
|
./ci/build-macos.sh
|
2021-11-07 19:29:11 +00:00
|
|
|
env:
|
|
|
|
CC: "${{ matrix.cc }}"
|
2023-09-26 12:12:31 +00:00
|
|
|
CXX: "${{ matrix.cxx }}"
|
2021-11-07 19:29:11 +00:00
|
|
|
TRAVIS_OS_NAME: "${{ matrix.os }}"
|
|
|
|
|
2024-02-21 20:12:40 +00:00
|
|
|
- name: Create App Bundle
|
|
|
|
run: |
|
|
|
|
meson compile -C build macos-bundle
|
|
|
|
tar -czvf mpv.tar.gz -C build mpv.app
|
|
|
|
|
2021-11-07 19:29:11 +00:00
|
|
|
- name: Print meson log
|
2023-03-14 20:08:40 +00:00
|
|
|
if: ${{ failure() && steps.build.outcome == 'failure' }}
|
2021-11-07 19:29:11 +00:00
|
|
|
run: |
|
|
|
|
cat ./build/meson-logs/meson-log.txt
|
2021-07-23 09:24:38 +00:00
|
|
|
|
2023-02-26 19:05:49 +00:00
|
|
|
- name: Run meson tests
|
|
|
|
id: tests
|
|
|
|
run: |
|
|
|
|
meson test -C build
|
|
|
|
|
|
|
|
- name: Print meson test log
|
2023-03-14 20:08:40 +00:00
|
|
|
if: ${{ failure() && steps.tests.outcome == 'failure' }}
|
2023-02-26 19:05:49 +00:00
|
|
|
run: |
|
|
|
|
cat ./build/meson-logs/testlog.txt
|
|
|
|
|
2024-02-21 20:12:40 +00:00
|
|
|
- uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: mpv-${{ matrix.os }}-${{ matrix.arch }}
|
|
|
|
path: mpv.tar.gz
|
|
|
|
|
2021-07-25 09:01:06 +00:00
|
|
|
linux:
|
2022-11-05 17:48:08 +00:00
|
|
|
runs-on: "ubuntu-22.04"
|
2021-07-25 09:01:06 +00:00
|
|
|
container:
|
2022-04-19 03:19:31 +00:00
|
|
|
image: "registry.opensuse.org/home/mia/images/images/mpv-ci:stable-deps"
|
2021-07-25 09:01:06 +00:00
|
|
|
env:
|
2023-09-26 12:12:31 +00:00
|
|
|
CC: "${{ matrix.config.cc }}"
|
|
|
|
CXX: "${{ matrix.config.cxx }}"
|
2021-07-25 09:01:06 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-09-26 12:12:31 +00:00
|
|
|
config:
|
|
|
|
- {
|
|
|
|
cc: "gcc",
|
|
|
|
cxx: "g++",
|
|
|
|
}
|
|
|
|
- {
|
|
|
|
cc: "clang",
|
|
|
|
cxx: "clang++",
|
|
|
|
}
|
2021-07-25 09:01:06 +00:00
|
|
|
steps:
|
2024-01-24 17:29:49 +00:00
|
|
|
- uses: actions/checkout@v4
|
2021-07-25 09:01:06 +00:00
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2022-04-21 18:53:35 +00:00
|
|
|
# workaround to avoid "fatal: unsafe repository" error
|
|
|
|
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
2021-11-07 19:29:11 +00:00
|
|
|
|
|
|
|
- name: Build with meson
|
2023-02-26 19:05:49 +00:00
|
|
|
id: build
|
2021-11-07 19:29:11 +00:00
|
|
|
run: |
|
2022-11-12 14:27:07 +00:00
|
|
|
./ci/build-tumbleweed.sh
|
2021-11-07 19:29:11 +00:00
|
|
|
|
|
|
|
- name: Print meson log
|
2023-03-14 20:08:40 +00:00
|
|
|
if: ${{ failure() && steps.build.outcome == 'failure' }}
|
2021-11-07 19:29:11 +00:00
|
|
|
run: |
|
|
|
|
cat ./build/meson-logs/meson-log.txt
|
2021-07-25 09:01:06 +00:00
|
|
|
|
2023-02-26 19:05:49 +00:00
|
|
|
- name: Run meson tests
|
|
|
|
id: tests
|
|
|
|
run: |
|
|
|
|
meson test -C build
|
|
|
|
|
|
|
|
- name: Print meson test log
|
2023-03-14 20:08:40 +00:00
|
|
|
if: ${{ failure() && steps.tests.outcome == 'failure' }}
|
2023-02-26 19:05:49 +00:00
|
|
|
run: |
|
|
|
|
cat ./build/meson-logs/testlog.txt
|
|
|
|
|
2024-02-25 16:37:03 +00:00
|
|
|
linux-ffmpeg-4-4:
|
|
|
|
runs-on: ubuntu-22.04
|
|
|
|
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
|
|
|
|
# used features to test build compatibility. Musl is a nice bonus as well
|
|
|
|
image: alpine:3.15
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
apk update
|
|
|
|
apk add \
|
|
|
|
binutils \
|
|
|
|
ffmpeg-dev \
|
|
|
|
gcc \
|
|
|
|
git \
|
|
|
|
g++ \
|
|
|
|
libass-dev \
|
|
|
|
lua5.2-dev \
|
|
|
|
pulseaudio-dev \
|
|
|
|
libx11-dev \
|
|
|
|
libxfixes-dev \
|
|
|
|
libxkbcommon-dev \
|
|
|
|
libxrandr-dev \
|
|
|
|
libxpresent-dev \
|
|
|
|
libxscrnsaver-dev \
|
|
|
|
musl-dev \
|
|
|
|
py3-pip \
|
|
|
|
samurai
|
|
|
|
pip install meson
|
|
|
|
|
|
|
|
- name: Build with meson
|
|
|
|
id: build
|
|
|
|
run: |
|
|
|
|
./ci/build-linux-old.sh
|
|
|
|
|
|
|
|
- name: Print meson log
|
|
|
|
if: ${{ failure() && steps.build.outcome == 'failure' }}
|
|
|
|
run: |
|
|
|
|
cat ./build/meson-logs/meson-log.txt
|
|
|
|
|
|
|
|
- name: Run meson tests
|
|
|
|
id: tests
|
|
|
|
run: |
|
|
|
|
meson test -C build
|
|
|
|
|
|
|
|
- name: Print meson test log
|
|
|
|
if: ${{ failure() && steps.tests.outcome == 'failure' }}
|
|
|
|
run: |
|
|
|
|
cat ./build/meson-logs/testlog.txt
|
|
|
|
|
2024-02-24 18:38:06 +00:00
|
|
|
openbsd:
|
|
|
|
runs-on: ubuntu-latest # until https://github.com/actions/runner/issues/385
|
|
|
|
timeout-minutes: 30 # avoid any weirdness with the VM
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Test in OpenBSD VM
|
|
|
|
uses: cross-platform-actions/action@v0.23.0
|
|
|
|
with:
|
|
|
|
operating_system: openbsd
|
|
|
|
version: '7.4'
|
|
|
|
run: |
|
|
|
|
sudo pkg_add -U \
|
|
|
|
cmake \
|
|
|
|
ffmpeg \
|
|
|
|
git \
|
|
|
|
libarchive \
|
|
|
|
libbluray \
|
|
|
|
libcaca \
|
|
|
|
libcdio-paranoia \
|
|
|
|
libdvdnav \
|
|
|
|
libiconv \
|
|
|
|
libv4l \
|
|
|
|
libxkbcommon \
|
|
|
|
luajit \
|
|
|
|
meson \
|
|
|
|
openal \
|
|
|
|
pkgconf \
|
|
|
|
pulseaudio \
|
|
|
|
python3 \
|
|
|
|
rubberband \
|
|
|
|
sdl2 \
|
|
|
|
shaderc \
|
|
|
|
spirv-cross \
|
|
|
|
spirv-headers \
|
|
|
|
uchardet \
|
|
|
|
vulkan-loader \
|
|
|
|
vulkan-headers \
|
|
|
|
zimg
|
|
|
|
./ci/build-openbsd.sh
|
|
|
|
meson test -C build
|
|
|
|
|
2021-07-25 20:24:05 +00:00
|
|
|
freebsd:
|
2023-10-24 17:58:37 +00:00
|
|
|
runs-on: ubuntu-latest # until https://github.com/actions/runner/issues/385
|
|
|
|
timeout-minutes: 30 # avoid any weirdness with the VM
|
2021-07-25 20:24:05 +00:00
|
|
|
steps:
|
2024-01-24 17:29:49 +00:00
|
|
|
- uses: actions/checkout@v4
|
2021-07-25 20:24:05 +00:00
|
|
|
- name: Test in FreeBSD VM
|
2024-02-23 19:42:58 +00:00
|
|
|
uses: cross-platform-actions/action@v0.23.0
|
2021-07-25 20:24:05 +00:00
|
|
|
with:
|
2023-10-23 15:48:47 +00:00
|
|
|
operating_system: freebsd
|
2024-02-23 19:42:58 +00:00
|
|
|
version: '14.0'
|
2023-10-23 15:48:47 +00:00
|
|
|
run: |
|
|
|
|
sudo pkg update
|
|
|
|
sudo pkg install -y \
|
|
|
|
alsa-lib \
|
2021-11-07 19:29:11 +00:00
|
|
|
cmake \
|
2021-07-25 20:24:05 +00:00
|
|
|
evdev-proto \
|
|
|
|
ffmpeg \
|
2023-10-23 15:48:47 +00:00
|
|
|
git \
|
|
|
|
iconv \
|
2021-07-25 20:24:05 +00:00
|
|
|
jackit \
|
|
|
|
libarchive \
|
|
|
|
libbluray \
|
|
|
|
libcaca \
|
|
|
|
libcdio-paranoia \
|
|
|
|
libdvdnav \
|
2023-10-23 15:48:47 +00:00
|
|
|
libplacebo \
|
|
|
|
libXinerama \
|
|
|
|
libxkbcommon \
|
|
|
|
libxpresent \
|
|
|
|
libXv \
|
|
|
|
luajit \
|
|
|
|
meson \
|
2021-07-25 20:24:05 +00:00
|
|
|
mujs \
|
2023-10-23 15:48:47 +00:00
|
|
|
openal-soft \
|
2022-08-18 10:14:46 +00:00
|
|
|
pipewire \
|
2023-10-23 15:48:47 +00:00
|
|
|
pkgconf \
|
2021-07-25 20:24:05 +00:00
|
|
|
pulseaudio \
|
2023-10-23 15:48:47 +00:00
|
|
|
python3 \
|
2021-07-25 20:24:05 +00:00
|
|
|
rubberband \
|
|
|
|
sekrit-twc-zimg \
|
2023-10-23 15:48:47 +00:00
|
|
|
sdl2 \
|
|
|
|
sndio \
|
2021-07-25 20:24:05 +00:00
|
|
|
uchardet \
|
|
|
|
v4l_compat \
|
2023-10-23 15:48:47 +00:00
|
|
|
vulkan-headers \
|
|
|
|
wayland-protocols
|
|
|
|
./ci/build-freebsd.sh
|
|
|
|
meson test -C build
|
2022-10-27 17:26:21 +00:00
|
|
|
|
2023-01-10 04:54:25 +00:00
|
|
|
msys2:
|
|
|
|
runs-on: windows-latest
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
sys:
|
|
|
|
- clang64
|
|
|
|
- mingw64
|
|
|
|
- ucrt64
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: msys2 {0}
|
|
|
|
steps:
|
2023-10-23 14:26:37 +00:00
|
|
|
- name: Disable autocrlf
|
|
|
|
shell: pwsh
|
|
|
|
run: |
|
|
|
|
git config --global core.autocrlf false
|
|
|
|
git config --global core.eol lf
|
2024-01-24 17:29:49 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-01-10 04:54:25 +00:00
|
|
|
- uses: msys2/setup-msys2@v2
|
|
|
|
with:
|
|
|
|
msystem: ${{ matrix.sys }}
|
|
|
|
update: true
|
|
|
|
install: git
|
|
|
|
pacboy: >-
|
2024-01-13 18:21:34 +00:00
|
|
|
angleproject:p
|
2023-06-07 21:18:54 +00:00
|
|
|
ca-certificates:p
|
2023-01-10 04:54:25 +00:00
|
|
|
cc:p
|
|
|
|
diffutils:p
|
|
|
|
ffmpeg:p
|
|
|
|
lcms2:p
|
|
|
|
libarchive:p
|
|
|
|
libass:p
|
|
|
|
libcdio-paranoia:p
|
|
|
|
libdvdnav:p
|
|
|
|
libjpeg-turbo:p
|
|
|
|
libplacebo:p
|
2023-04-29 17:14:55 +00:00
|
|
|
lua51:p
|
2023-07-27 20:47:46 +00:00
|
|
|
meson:p
|
2023-01-10 04:54:25 +00:00
|
|
|
ninja:p
|
|
|
|
pkgconf:p
|
2023-07-27 20:47:46 +00:00
|
|
|
python:p
|
2023-01-10 04:54:25 +00:00
|
|
|
rst2pdf:p
|
|
|
|
rubberband:p
|
|
|
|
shaderc:p
|
|
|
|
spirv-cross:p
|
|
|
|
uchardet:p
|
|
|
|
vapoursynth:p
|
|
|
|
vulkan:p
|
|
|
|
|
|
|
|
- name: Build with meson
|
2023-02-26 19:05:49 +00:00
|
|
|
id: build
|
2023-01-10 04:54:25 +00:00
|
|
|
run: |
|
|
|
|
./ci/build-msys2.sh meson
|
|
|
|
|
|
|
|
- name: Print meson log
|
2023-03-14 20:08:40 +00:00
|
|
|
if: ${{ failure() && steps.build.outcome == 'failure' }}
|
2023-02-26 19:05:49 +00:00
|
|
|
run: |
|
|
|
|
cat ./build/meson-logs/meson-log.txt
|
|
|
|
|
|
|
|
- name: Run meson tests
|
|
|
|
id: tests
|
|
|
|
run: |
|
|
|
|
meson test -C build
|
|
|
|
|
|
|
|
- name: Print meson test log
|
2023-03-14 20:08:40 +00:00
|
|
|
if: ${{ failure() && steps.tests.outcome == 'failure' }}
|
2023-01-10 04:54:25 +00:00
|
|
|
run: |
|
2023-02-26 19:05:49 +00:00
|
|
|
cat ./build/meson-logs/testlog.txt
|