67 lines
2.0 KiB
YAML
67 lines
2.0 KiB
YAML
# Builds the Windows .exe and the Linux binary. Runs on GitHub Actions as-is;
|
|
# Gitea/Forgejo Actions also read this folder but need a Windows runner registered.
|
|
name: Build
|
|
|
|
on:
|
|
push:
|
|
tags: ["v*"]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
# ubuntu-22.04 keeps the glibc requirement at 2.35 so the binary runs on older distros.
|
|
os: [windows-latest, ubuntu-22.04]
|
|
runs-on: ${{ matrix.os }}
|
|
env:
|
|
QT_QPA_PLATFORM: offscreen
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- name: Install Qt runtime libraries (bundled into the Linux binary)
|
|
if: runner.os == 'Linux'
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y libegl1 libxkbcommon-x11-0 libxcb-cursor0 libxcb-icccm4 \
|
|
libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-shape0 libxcb-xkb1
|
|
|
|
- name: Install Python dependencies
|
|
run: python -m pip install -r requirements-dev.txt
|
|
|
|
- name: Download ffmpeg
|
|
run: python scripts/fetch_ffmpeg.py
|
|
|
|
- name: Run tests
|
|
run: python -m pytest -q
|
|
env:
|
|
FFWRAP_FFMPEG_DIR: ffmpeg/bin
|
|
|
|
- name: Build executable
|
|
run: python build.py --ffmpeg-dir ffmpeg/bin
|
|
|
|
- name: Smoke test the built executable
|
|
shell: bash
|
|
run: python scripts/smoke_test.py dist/package/FFmpegWrapper/FFmpegWrapper$([ "$RUNNER_OS" = Windows ] && echo .exe) smoke-${{ runner.os }}.png
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: FFmpegWrapper-${{ runner.os }}
|
|
path: |
|
|
dist/FFmpegWrapper-*.zip
|
|
dist/FFmpegWrapper-*.tar.gz
|
|
smoke-${{ runner.os }}.png
|
|
|
|
- name: Attach to release
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
files: |
|
|
dist/FFmpegWrapper-*.zip
|
|
dist/FFmpegWrapper-*.tar.gz
|