Playground #523
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
push: | |
branches: | |
- master | |
- ci | |
- 'release/**' | |
paths-ignore: | |
- 'DOCS/**' | |
- 'TOOLS/lua/**' | |
- '.editorconfig' | |
- '.github/ISSUE_TEMPLATE/**' | |
- '.github/PULL_REQUEST_TEMPLATE' | |
- '.gitignore' | |
- 'Copyright' | |
- 'README.md' | |
- 'RELEASE_NOTES' | |
pull_request: | |
branches: [master] | |
paths-ignore: | |
- 'DOCS/**' | |
- 'TOOLS/lua/**' | |
- '.editorconfig' | |
- '.github/ISSUE_TEMPLATE/**' | |
- '.github/PULL_REQUEST_TEMPLATE' | |
- '.gitignore' | |
- 'Copyright' | |
- 'README.md' | |
- 'RELEASE_NOTES' | |
jobs: | |
mingw: | |
runs-on: ubuntu-24.04 | |
env: | |
CCACHE_BASEDIR: ${{ github.workspace }} | |
CCACHE_DIR: ${{ github.workspace }}/.ccache | |
CCACHE_MAXSIZE: 500M | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- target: x86_64-w64-mingw32 | |
wine: wine64 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get time | |
id: get_time | |
run: echo "timestamp=`date +%s%N`" >> $GITHUB_OUTPUT | |
- 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 | |
run: | | |
sudo dpkg --add-architecture i386 | |
sudo apt-get update | |
sudo apt-get install -y ccache g++-mingw-w64 gcc-multilib meson nasm ninja-build pkg-config ${{ matrix.wine }} | |
- name: Install Meson Wraps | |
run: | | |
mkdir subprojects -p | |
meson wrap install mujs | |
- name: Build libraries | |
run: | | |
./ci/build-mingw64.sh | |
env: | |
TARGET: ${{ matrix.target }} | |
- name: Build with meson | |
id: build | |
run: | | |
./ci/build-mingw64.sh meson pack | |
env: | |
TARGET: ${{ matrix.target }} | |
- name: Print meson log | |
if: ${{ failure() && steps.build.outcome == 'failure' }} | |
run: | | |
cat ./mingw_build/meson-logs/meson-log.txt | |
- name: Functional test | |
run: | | |
cd artifact && wine ./mpv.com -v --no-config | |
env: | |
WINEDEBUG: '+loaddll' | |
- name: Run meson tests | |
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 }} |