CI / Security audit (RUSTSEC) (push) Failing after 1m31s
CI / Build + Clippy + Test (push) Failing after 4m18s
Second LIBCLANG_PATH failure mode: my 'libclang.so.*' with -type f pattern returned nothing because Debian Bookworm's runtime library is 'libclang-14.so.1' (versioned, with no plain libclang.so.* symlink), and the .so symlink is itself a symlink not a regular file (-type f excludes it). bindgen accepts any of: libclang.so, libclang-*.so, libclang.so.*, libclang-*.so.* — so the broader 'libclang*.so*' (no -type filter) catches every variant. Also broadened search root from /usr/lib to /usr to cover both /usr/lib/x86_64-linux-gnu/ (runtime lib) and /usr/lib/llvm-*/lib/ (dev symlink). Log line now includes the actual matched path so future debugging is one glance.
114 lines
4.1 KiB
YAML
114 lines
4.1 KiB
YAML
# Continuous integration for wl-webrtc.
|
|
#
|
|
# Triggered on push/PR to master. Runs the full quality gate that the recent
|
|
# audit baselined:
|
|
# - clippy: 0 errors (undocumented_unsafe_blocks is deny in Cargo.toml; other
|
|
# warnings are advisory for now).
|
|
# - build --release: integration tests in tests/integration_test.rs shell out
|
|
# to target/release/wl-webrtc, so the release binary must exist before tests
|
|
# run.
|
|
# - test --release: 79 unit + 3 integration; the 1 hardware-ignored test
|
|
# stays ignored in CI (needs Wayland session + VAAPI GPU).
|
|
# - cargo audit: separate job so a RUSTSEC advisory fails the build without
|
|
# conflating with compile errors.
|
|
#
|
|
# The job pins Linux only — the project is Wayland/VAAPI-specific and has no
|
|
# macOS/Windows story. Oracle audit 2026-06-28 P2 plan.
|
|
|
|
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
branches: [master]
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
build-test:
|
|
name: Build + Clippy + Test
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install Rust toolchain (stable)
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: clippy
|
|
|
|
- name: Install system dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
# NOTE: do NOT use --no-install-recommends for libclang-dev — on
|
|
# Debian Bookworm (the node:20-bookworm image used by act_runner
|
|
# under ubuntu-latest) the recommended toolchain bits are needed
|
|
# by bindgen. The pkg-config based deps (pipewire/wayland/etc)
|
|
# are also more reliable without the flag.
|
|
sudo apt-get install -y \
|
|
ffmpeg \
|
|
libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libva-dev \
|
|
libwayland-dev wayland-protocols \
|
|
libdrm-dev \
|
|
libpipewire-0.3-dev \
|
|
libclang-dev clang
|
|
|
|
- name: Resolve LIBCLANG_PATH
|
|
# bindgen needs libclang on the LD path. The actual install location
|
|
# varies by Debian/Ubuntu version (llvm-14, llvm-15, ...), so we
|
|
# discover it dynamically instead of hardcoding /usr/lib/llvm-14/lib.
|
|
# Writing to $GITHUB_ENV propagates the value to subsequent steps
|
|
# inside the act_runner Docker container; the workflow-level `env:`
|
|
# block is not reliably visible there.
|
|
#
|
|
# Find pattern note: Debian Bookworm installs the runtime library as
|
|
# `libclang-14.so.1` (versioned, no plain libclang.so.* symlink),
|
|
# so a strict 'libclang.so.*' pattern returns nothing. The broader
|
|
# 'libclang*.so*' matches every bindgen-compatible filename variant:
|
|
# libclang.so, libclang-14.so, libclang.so.1, libclang-14.so.1.
|
|
run: |
|
|
set -e
|
|
LIBCL=$(find /usr -name 'libclang*.so*' 2>/dev/null | head -1)
|
|
test -n "$LIBCL" || { echo "ERROR: no libclang shared lib found under /usr"; exit 1; }
|
|
LIBDIR=$(dirname "$LIBCL")
|
|
echo "Resolved LIBCLANG_PATH=$LIBDIR (found $LIBCL)"
|
|
echo "LIBCLANG_PATH=$LIBDIR" >> "$GITHUB_ENV"
|
|
|
|
- name: Cache cargo registry + build artifacts
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
target
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock', 'Cargo.toml') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-cargo-
|
|
|
|
- name: Clippy (release, all targets)
|
|
run: cargo clippy --release --all-targets
|
|
|
|
- name: Build release (required before tests)
|
|
run: cargo build --release --all-targets
|
|
|
|
- name: Test (release)
|
|
run: cargo test --release
|
|
|
|
audit:
|
|
name: Security audit (RUSTSEC)
|
|
runs-on: ubuntu-latest
|
|
# Keep separate from build-test so a vulnerability advisory fails the
|
|
# check independently of compile state.
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install Rust toolchain (stable)
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Install cargo-audit
|
|
run: cargo install cargo-audit --locked
|
|
|
|
- name: Audit dependencies
|
|
run: cargo audit --deny warnings
|