The Linux job could not get past the linker: libobs-wrapper asks for the OBS 32 scene-item calls and the distro's libobs (30.0.2 on noble, and the OBS PPA publishes no libobs-dev at all) does not have them. That is the state the job has been in, so nothing was building. The daemon ships on Windows, where obs.lib rides with the libobs crate, so the build that matters is the Windows one and cargo-xwin compiles it from the Linux runner with the MSVC runtime and SDK it downloads. The Linux job stays as formatting and clippy over every target: clippy stops at type checking, so it still compiles the cfg(target_os = "linux") paths without linking them. Tests need a machine that can run the exe, so they stay local for now.
77 lines
2.2 KiB
YAML
77 lines
2.2 KiB
YAML
name: record-daemon
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
RUST_BACKTRACE: 1
|
|
|
|
jobs:
|
|
# Type-checks the daemon on Linux: formatting, and clippy over every target, which compiles
|
|
# the cfg(target_os = "linux") paths without linking them. Linking is the Windows job's.
|
|
check:
|
|
name: Check and lint (Linux)
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: record-daemon
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Install Rust toolchain
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: rustfmt, clippy
|
|
|
|
- name: Check format
|
|
run: cargo fmt --check
|
|
|
|
- name: Install system build dependencies
|
|
# pkg-config finds libobs for its build script; nothing is linked here, so the distro's
|
|
# version is enough even though the Windows build links a newer obs.lib.
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y pkg-config libglib2.0-dev libobs-dev libc6-dev clang libwayland-dev
|
|
|
|
- name: Lint
|
|
run: cargo clippy --all-targets --all-features
|
|
|
|
# The daemon ships on Windows and links Windows' obs.lib, so that is the build worth checking.
|
|
# It cross-compiles from the Linux runner: obs.lib rides with the libobs crate, and cargo-xwin
|
|
# brings the MSVC runtime and the Windows SDK. Tests need a machine that can run the exe, so
|
|
# they stay local: `cargo test` in record-daemon on Windows.
|
|
build:
|
|
name: Build (Windows x64)
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: record-daemon
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Install Rust toolchain
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
targets: x86_64-pc-windows-msvc
|
|
|
|
- name: Install the cross linker
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y clang lld llvm
|
|
|
|
- name: Install cargo-xwin
|
|
run: cargo install cargo-xwin --locked
|
|
|
|
- name: Build
|
|
run: cargo xwin build --target x86_64-pc-windows-msvc
|
|
env:
|
|
RUSTFLAGS: -Dwarnings
|