Skip to content

Drop unused TOKEN_CLOSE #4

Drop unused TOKEN_CLOSE

Drop unused TOKEN_CLOSE #4

Workflow file for this run

name: Meson CI
on:
push:
branches: [ master, ci ]
pull_request:
branches: [ master ]
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: Windows MSVC Release,
os: windows-latest,
msvc: true,
pkgmanager: choco,
shell: 'powershell',
buildtype: release,
args: '-Ddefault_library=static --wrap-mode=forcefallback'
}
- {
name: Windows MinGW Release,
os: windows-latest,
msvc: false,
pkgmanager: msys,
msystem: MINGW64,
shell: 'msys2 {0}',
buildtype: debugoptimized,
args: ''
}
- {
name: Ubuntu Debug,
os: ubuntu-latest,
buildtype: debugoptimized,
args: ''
}
- {
name: macOS Debug,
os: macos-latest,
buildtype: debugoptimized,
args: ''
}
defaults:
run:
shell: ${{ matrix.config.shell || 'bash' }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Setup MSys2
if: matrix.config.pkgmanager == 'msys'
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.config.msystem }}
update: false
- name: Setup MSVC
if: matrix.config.os == 'windows-latest' && matrix.config.msvc == true
uses: ilammy/msvc-dev-cmd@v1
- name: Install dependecies with choco
if: matrix.config.pkgmanager == 'choco'
run: |
# for whatever reason choco insist on a reboot if it installs meson
choco install ninja nasm python
python -m pip install --upgrade pip
pip install meson
- name: Install dependencies
if: matrix.config.pkgmanager != 'choco'
run: |
case "${{ matrix.config.pkgmanager || matrix.config.os }}" in
msys)
pre="$MINGW_PACKAGE_PREFIX"
pacman --noconfirm -S \
$pre-gcc $pre-meson $pre-ninja nasm \
$pre-fribidi $pre-freetype $pre-harfbuzz \
$pre-fontconfig $pre-libpng
;;
macos-*)
brew install nasm ninja pkg-config meson
;;
ubuntu-*)
sudo apt-get update
sudo apt-get install ninja-build build-essential pkg-config nasm \
libfreetype-dev libfontconfig-dev libharfbuzz-dev libfribidi-dev \
python3-pip
# Drop once 24.04 is available in GHA
pip3 install meson
;;
esac
- name: Set up WrapDB
if: matrix.config.pkgmanager == 'choco' || matrix.config.os == 'macos-latest'
run: |
meson wrap update-db
- name: Configure
run: meson setup build ${{ matrix.config.args }} -Dbuildtype=${{ matrix.config.buildtype }}
- name: Build
run: meson compile -C build
- name: Dump Meson Debug Info
if: failure()
run: cat build/meson-logs/meson-log.txt
build-muon:
runs-on: ubuntu-latest
container:
image: alpine:latest
strategy:
fail-fast: false
matrix:
cc: [gcc]
steps:
- name: install deps
run: |
# muon is in edge but not yet in 3.19 (last line are muon build and test deps)
apk add nasm ${{ matrix.cc }} musl-dev samurai \
fontconfig-dev freetype-dev fribidi-dev harfbuzz-dev \
libpng-dev \
git pkgconf-dev pkgconf g++
- name: build muon
run: |
git clone --depth=1 https://git.sr.ht/~lattis/muon
cd muon
sh ./bootstrap.sh build_bootstrap
build_bootstrap/muon setup build
build_bootstrap/muon -C build samu
build_bootstrap/muon -C build test
build_bootstrap/muon -C build install
- name: checkout code
uses: actions/checkout@v4
- name: configure
run: |
muon setup -Dtest=true build
- name: build
run: |
samu -C build
- name: check binary works
run: |
build/test/libass_test /tmp/out.png compare/test/sub1.ass 0.5
- name: lint style (informational)
run: |
# `muon fmt -q` already lets us check _if_ there’d be changes, but
# doesn’t show what would change. `git diff` doesn’t want to work
# (even with increased fetch-depth) either, possibly due to container env
LINT_FILES="$(find . -name "meson.build" | sort)"
for f in $LINT_FILES ; do
cp "$f" "${f}.org"
done
if muon fmt -q $LINT_FILES ; then
echo "ok"
else
muon fmt -i $LINT_FILES
for f in $LINT_FILES ; do
git diff --no-index "${f}.org" "$f" || :
done
# currently formatting rules are being tweaked;
# maybe reformat and fail here after muon 0.3.0 is released
exit 0
fi
- name: validate meson.build
run: |
# our test build above doesn't hit all conditional paths
# for now ignore warnings, only fail on errors
muon analyze
build-from-tarball:
runs-on: ubuntu-latest
container:
# currently GHA’s ubuntu-latest still has a too old meson
image: debian:stable
strategy:
fail-fast: false
matrix:
cc: [gcc]
steps:
- name: install dependencies
run: |
apt-get update #&& sudo apt-get upgrade
apt-get install -y --no-install-recommends \
autoconf automake make libtool \
libfontconfig1-dev libfreetype6-dev libfribidi-dev \
libharfbuzz-dev nasm ${{ matrix.cc }} \
libpng-dev meson ninja-build
- name: checkout code
uses: actions/checkout@v4
- name: setup distdir
run: |
autoreconf -ivf .
./configure
make distdir
ls -ld libass-*
- name: meson build in distdir
run: |
cd libass-*/
meson setup build
ninja -C build
DESTIDR="$PWD/TEST_INSTALL" ninja -C build install