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"
|
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
|
|
|
|
|
2021-07-23 09:24:38 +00:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
brew update
|
2024-02-17 23:19:44 +00:00
|
|
|
brew install autoconf automake pkg-config libtool python freetype fribidi little-cms2 luajit libass ffmpeg meson libplacebo
|
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 }}"
|
|
|
|
|
|
|
|
- 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
|
|
|
|
|
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
|
|
|
|
|
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
|
2023-10-23 15:48:47 +00:00
|
|
|
uses: cross-platform-actions/action@v0.19.1
|
2021-07-25 20:24:05 +00:00
|
|
|
with:
|
2023-10-23 15:48:47 +00:00
|
|
|
operating_system: freebsd
|
|
|
|
version: '13.2'
|
|
|
|
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
|