Skip to content

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #58

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #58

Workflow file for this run

name: pyass
on: [push, pull_request]
jobs:
test-unix:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
env:
LIBASS_DIR: libass-dir
steps:
- uses: actions/checkout@v2
with:
fetch: 1
- name: Install nasm on Ubuntu
if: matrix.os == 'ubuntu-latest'
env:
LINK: http://debian-archive.trafficmanager.net/debian/pool/main/n/nasm
NASM_VERSION: 2.14.02-1
run: |
curl -LO $LINK/nasm_${NASM_VERSION}_amd64.deb
sudo dpkg -i nasm_${NASM_VERSION}_amd64.deb
- name: Install nasm and harfbuzz on MacOS
if: matrix.os == 'macos-latest'
run: |
brew install nasm harfbuzz
- name: Install Python 3.7 version
uses: actions/setup-python@v1
with:
python-version: '3.7'
architecture: 'x64'
- name: Install setuptools and wheel
run: |
pip install setuptools wheel
- name: Install meson and ninja
run: |
pip install meson ninja
- name: Install libass
env:
LINK: https://github.com/Luni-4/libass
run: |
git clone --depth 1 -b bubblesub-libass $LINK
cd libass
meson build -Dprefix=$HOME/$LIBASS_DIR \
--wrap-mode=forcefallback \
--buildtype release
ninja -C build
ninja -C build install
- name: Move out libass libraries on Ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
mv $HOME/$LIBASS_DIR/lib/x86_64-linux-gnu/* $HOME/$LIBASS_DIR/lib
- name: Set environment variables
run: |
echo "::set-env name=LD_LIBRARY_PATH::$HOME/$LIBASS_DIR/lib"
- name: Run C-test
run: |
cp data/* libass/test
cd libass/test
gcc -o test test.c \
-I$HOME/$LIBASS_DIR/include -L$HOME/$LIBASS_DIR/lib -lass -lpng
./test black.png sub 0
- name: Install pyass
run: |
pip install .
- name: Install test packages
run: |
pip install numpy Pillow
- name: Run test
run: |
export DYLD_FALLBACK_LIBRARY_PATH=$HOME/$LIBASS_DIR/lib
python examples/blend_sub.py "data/blend.png" "data/sub" 0.0
test-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
fetch: 1
- name: Install nasm
run: |
$NASM_VERSION="2.14.02"
$LINK="https://www.nasm.us/pub/nasm/releasebuilds/$NASM_VERSION/win64"
curl --ssl-no-revoke -LO "$LINK/nasm-$NASM_VERSION-win64.zip"
7z e -y "nasm-$NASM_VERSION-win64.zip" -o"C:\nasm"
echo "::add-path::C:\nasm"
- name: Set msys2 environment variables
run: |
echo "::add-path::C:/msys64/usr/bin"
echo "::add-path::C:/msys64/mingw64/bin"
- name: First msys2 run
run: |
bash -lc 'exit'
- name: Install Python 3.7 version
uses: actions/setup-python@v1
with:
python-version: '3.7'
architecture: 'x64'
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel
- name: Install meson and ninja
run: |
pip install meson ninja
- name: Install build packages
run: |
pacman -S --needed --ask=20 --noconfirm mingw-w64-x86_64-fribidi `
mingw-w64-x86_64-harfbuzz
- name: Build libass
run: |
$LIBASS_REPO = "https://github.com/Luni-4/libass"
git clone --depth 1 -b bubblesub-libass $LIBASS_REPO libass-build
cd libass-build
meson build `
--buildtype release `
-Ddirectwrite=enabled `
-Dharfbuzz:default_library=static `
-Dlibpng:default_library=static `
-Dzlib:default_library=static `
-Dfribidi:default_library=static `
-Dfreetype:default_library=static
ninja -C build
- name: Install pyass
run: |
Move-Item -Path libass-build\build\libass\libass.dll -Destination .
pip install .
- name: Install test packages
run: |
pip install numpy Pillow
- name: Run test
run: |
python examples/blend_sub.py "data/blend.png" "data/sub" 0.0