- new minimal C OFX plugin fixture (ci_test_plugin.c) compiled into a real .ofx.bundle by build_fixture.sh; the CI step points OFX_PLUGIN_PATH at it and asserts the scan_probe example discovers AND registers it (Linux/macOS) - host bundle binary search now also covers the OFX-standard Win64 platform directory - cd.yml: restore the Windows NSIS packaging job (obsolete oakengine cdylib prebuild dropped) and repair the job indentation that had silently detached the macos/release jobs from the jobs: map; releases now gate on all three platforms
199 lines
7.3 KiB
YAML
199 lines
7.3 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
concurrency:
|
|
group: ci-${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build-test:
|
|
name: Build & test (${{ matrix.os }})
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os:
|
|
- warp-ubuntu-latest-x64-8x
|
|
- warp-macos-15-arm64-6x
|
|
- warp-windows-latest-x64-16x
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
# gpui/ is a git submodule; its crates are workspace members of
|
|
# their own repo and build as path dependencies of oakapp.
|
|
submodules: true
|
|
|
|
- name: Install Rust (stable)
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
# ------------------------------------------------------------------
|
|
# System dependencies
|
|
# ------------------------------------------------------------------
|
|
- name: Install system dependencies (Linux)
|
|
if: runner.os == 'Linux'
|
|
run: |
|
|
# Codec/filter libraries for the ffmpeg-sys-next build feature
|
|
# (see tooling/install-deps.sh).
|
|
tooling/install-deps.sh
|
|
# Real OpenColorIO (ocio-sys real bridge) plus the headless test
|
|
# infra gpui needs: X11, software Mesa Vulkan (lavapipe) and xvfb.
|
|
sudo apt-get install -y \
|
|
libopencolorio-dev \
|
|
libgl1-mesa-dev libgl1-mesa-dri mesa-vulkan-drivers \
|
|
libvulkan-dev libxkbcommon-dev xvfb
|
|
|
|
- name: Install system dependencies (macOS)
|
|
if: runner.os == 'macOS'
|
|
run: |
|
|
tooling/install-deps.sh
|
|
brew install opencolorio
|
|
|
|
- name: Setup MSYS2 (Windows)
|
|
if: runner.os == 'Windows'
|
|
uses: msys2/setup-msys2@v2
|
|
with:
|
|
msystem: UCRT64
|
|
update: true
|
|
install: >-
|
|
git
|
|
mingw-w64-ucrt-x86_64-gcc
|
|
|
|
- name: Install system dependencies (Windows)
|
|
if: runner.os == 'Windows'
|
|
shell: msys2 {0}
|
|
run: |
|
|
bash tooling/install-deps.sh
|
|
pacman -S --needed --noconfirm mingw-w64-ucrt-x86_64-opencolorio
|
|
|
|
# ------------------------------------------------------------------
|
|
# Build environment
|
|
# ------------------------------------------------------------------
|
|
# ocio-sys builds a stub bridge unless these are set; the oakcommon
|
|
# ocioutils tests need the real library (see crates/oakcommon/.cargo/
|
|
# config.toml, which only applies to builds run from that directory).
|
|
- name: Configure build environment (Linux)
|
|
if: runner.os == 'Linux'
|
|
run: |
|
|
echo "OCIO_RS_ENABLE_REAL=1" >> "$GITHUB_ENV"
|
|
echo "OCIO_INSTALL_DIR=/usr" >> "$GITHUB_ENV"
|
|
echo "OCIO_RS_LINK=dynamic" >> "$GITHUB_ENV"
|
|
|
|
- name: Configure build environment (macOS)
|
|
if: runner.os == 'macOS'
|
|
run: |
|
|
echo "OCIO_RS_ENABLE_REAL=1" >> "$GITHUB_ENV"
|
|
echo "OCIO_INSTALL_DIR=/opt/homebrew/opt/opencolorio" >> "$GITHUB_ENV"
|
|
echo "OCIO_RS_LINK=dynamic" >> "$GITHUB_ENV"
|
|
# Homebrew quirks: lame.pc / snappy / libopenjp2.pc live off the
|
|
# default pkg-config search paths (see docs/build.md).
|
|
echo "CFLAGS=-I/opt/homebrew/include" >> "$GITHUB_ENV"
|
|
echo "LDFLAGS=-L/opt/homebrew/lib" >> "$GITHUB_ENV"
|
|
echo "PKG_CONFIG_PATH=/opt/homebrew/lib/pkgconfig/openjpeg" >> "$GITHUB_ENV"
|
|
|
|
- name: Configure build environment (Windows)
|
|
if: runner.os == 'Windows'
|
|
shell: msys2 {0}
|
|
run: |
|
|
echo "OCIO_RS_ENABLE_REAL=1" >> "$GITHUB_ENV"
|
|
echo "OCIO_INSTALL_DIR=/ucrt64" >> "$GITHUB_ENV"
|
|
echo "OCIO_RS_LINK=dynamic" >> "$GITHUB_ENV"
|
|
|
|
# ------------------------------------------------------------------
|
|
# Caches
|
|
# ------------------------------------------------------------------
|
|
# Covers the whole target/ dir plus ~/.cargo; shared across branches
|
|
# of the same OS.
|
|
- name: Cache cargo artifacts
|
|
uses: Swatinem/rust-cache@v2
|
|
with:
|
|
shared-key: oak-workspace
|
|
|
|
# The project FFmpeg (release/8.0, static, all free codecs + hwaccel)
|
|
# is built by tooling/ffmpeg/build-ffmpeg.sh — 10-20 min on a cold
|
|
# cache. It does not depend on the Rust toolchain, so key it on the
|
|
# script itself and keep it out of rust-cache.
|
|
- name: Cache project FFmpeg
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: .cache/ffmpeg
|
|
key: ffmpeg-${{ runner.os }}-${{ hashFiles('tooling/ffmpeg/build-ffmpeg.sh') }}
|
|
|
|
# ------------------------------------------------------------------
|
|
# Project FFmpeg (script + FFMPEG_DIR; see docs/build.md)
|
|
# ------------------------------------------------------------------
|
|
- name: Build project FFmpeg (Linux/macOS)
|
|
if: runner.os != 'Windows'
|
|
run: |
|
|
tooling/ffmpeg/build-ffmpeg.sh
|
|
echo "FFMPEG_DIR=$PWD/.cache/ffmpeg" >> "$GITHUB_ENV"
|
|
|
|
- name: Build project FFmpeg (Windows)
|
|
if: runner.os == 'Windows'
|
|
shell: msys2 {0}
|
|
run: |
|
|
bash tooling/ffmpeg/build-ffmpeg.sh
|
|
echo "FFMPEG_DIR=$(cygpath -m "$PWD/.cache/ffmpeg")" >> "$GITHUB_ENV"
|
|
|
|
# ------------------------------------------------------------------
|
|
# Build & test
|
|
# ------------------------------------------------------------------
|
|
- name: Build (Linux)
|
|
if: runner.os == 'Linux'
|
|
run: cargo build --workspace --locked
|
|
|
|
- name: Build (macOS)
|
|
if: runner.os == 'macOS'
|
|
run: cargo build --workspace --locked
|
|
|
|
- name: Build (Windows)
|
|
if: runner.os == 'Windows'
|
|
shell: msys2 {0}
|
|
run: cargo build --workspace --locked
|
|
|
|
# xvfb + 24-bit screen: the gpui #[gpui::test] tests open real windows
|
|
# and render through wgpu on Mesa's software Vulkan (lavapipe).
|
|
- name: Test (Linux)
|
|
if: runner.os == 'Linux'
|
|
run: xvfb-run -a -s "-screen 0 1920x1080x24" cargo test --workspace --locked
|
|
|
|
- name: Test (macOS)
|
|
if: runner.os == 'macOS'
|
|
run: cargo test --workspace --locked
|
|
|
|
- name: Test (Windows)
|
|
if: runner.os == 'Windows'
|
|
shell: msys2 {0}
|
|
run: cargo test --workspace --locked
|
|
|
|
# ------------------------------------------------------------------
|
|
# OFX plugin discovery end-to-end
|
|
# ------------------------------------------------------------------
|
|
# Build a minimal but real OFX plugin into a .ofx.bundle, point
|
|
# OFX_PLUGIN_PATH at it and let the scan_probe example run the full
|
|
# host path (directory scan -> dlopen -> setHost -> load -> describe
|
|
# -> register). The assertion is the plugin's registration line; CI
|
|
# machines have no system-wide OFX plugins, so the fixture is the
|
|
# only discovery.
|
|
- name: Build OFX fixture plugin (Linux/macOS)
|
|
if: runner.os != 'Windows'
|
|
run: crates/oakplugin/tests/fixtures/build_fixture.sh .cache/ofx-fixture
|
|
|
|
- name: Probe OFX plugin discovery (Linux/macOS)
|
|
if: runner.os != 'Windows'
|
|
run: |
|
|
OFX_PLUGIN_PATH="$PWD/.cache/ofx-fixture" \
|
|
cargo run --locked -p oakplugin --example scan_probe > probe.log 2>&1
|
|
grep -q 'type_id=rs.oak.CiTestPlugin' probe.log
|