diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c624a68..85c6f36 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,8 +25,6 @@ on: env: CARGO_TERM_COLOR: always - # Build dependencies match shell.nix + README Prerequisites section. - LIBCLANG_PATH: /usr/lib/llvm-14/lib jobs: build-test: @@ -43,13 +41,33 @@ jobs: - name: Install system dependencies run: | sudo apt-get update - sudo apt-get install -y --no-install-recommends \ + # 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 llvm-14 + 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. + run: | + set -e + LIBCL=$(find /usr/lib -name 'libclang.so.*' -type f 2>/dev/null | head -1) + test -n "$LIBCL" || { echo "ERROR: libclang.so.* not found under /usr/lib"; exit 1; } + LIBDIR=$(dirname "$LIBCL") + echo "Resolved LIBCLANG_PATH=$LIBDIR" + echo "LIBCLANG_PATH=$LIBDIR" >> "$GITHUB_ENV" - name: Cache cargo registry + build artifacts uses: actions/cache@v4