Migrate to a modern build system (meson) #97
Workflow file for this run
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, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install dependencies | |
run: | | |
sudo apt update | |
sudo apt install libmpv-dev libglib2.0-dev libavformat-dev meson ninja-build | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Build | |
run: | | |
mkdir build | |
meson setup build | |
ninja -C build | |
- name: Upload binary | |
uses: actions/upload-artifact@v3 | |
with: | |
name: mpris.so | |
path: build/libmpris.so | |
if-no-files-found: error | |
- name: Prepare for test | |
run: | | |
sudo apt install mpv playerctl sound-theme-freedesktop bash dbus xvfb xauth jq socat gawk | |
- name: Run tests | |
run: | | |
ninja -C build test | |
- name: Check git files unmodified | |
run: | | |
git diff --exit-code HEAD | |
- name: Check .gitignore matches generated files | |
run: | | |
! git ls-files --others --exclude-standard | grep . | |
- name: Cleanup generated files | |
run: | | |
ninja -C build clean | |
- name: Check cleanup removed generated files | |
run: | | |
! git ls-files --others | grep . | grep -v build/ |