From 508fa8b4082db9c20fd07f5e97a503205bb3f685 Mon Sep 17 00:00:00 2001 From: Edison Jwa Date: Thu, 11 Jun 2026 20:44:56 +0900 Subject: [PATCH] ci: add Linux multi-distro matrix and coverage reporting (TODO-052,053) Add Docker-based Linux build matrix (Ubuntu, Fedora, Arch) for platform-specific issue detection. Add cargo-llvm-cov coverage job with artifact upload. --- .github/workflows/ci.yml | 64 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 29ed404..a9e40fd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -181,3 +181,67 @@ jobs: - uses: Swatinem/rust-cache@v2 - name: cargo check --workspace run: cargo check --workspace --locked + + linux-multi-distro: + name: Linux build (${{ matrix.distro }}) + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - distro: ubuntu + image: ubuntu:24.04 + install: | + apt-get update + apt-get install -y curl build-essential pkg-config \ + libasound2-dev libpulse-dev libdbus-1-dev libsdl2-dev libopus-dev + - distro: fedora + image: fedora:latest + install: | + dnf install -y curl gcc pkg-config \ + alsa-lib-devel pulseaudio-libs-devel dbus-devel SDL2-devel opus-devel + - distro: arch + image: archlinux:latest + install: | + pacman -Syu --noconfirm + pacman -S --noconfirm curl base-devel pkg-config \ + alsa-lib pulseaudio dbus sdl2 opus + container: + image: ${{ matrix.image }} + steps: + - uses: actions/checkout@v4 + - name: Install system dependencies + run: ${{ matrix.install }} + - name: Install Rust + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" + - name: cargo check --workspace + run: cargo check --workspace + + coverage: + name: cargo llvm-cov + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: System deps + run: | + sudo apt-get update + sudo apt-get install -y \ + libasound2-dev libpulse-dev pkg-config \ + libdbus-1-dev libsdl2-dev libopus-dev + - uses: dtolnay/rust-toolchain@stable + with: + components: llvm-tools-preview + - uses: Swatinem/rust-cache@v2 + - name: Install cargo-llvm-cov + run: cargo install --locked cargo-llvm-cov + - name: Generate coverage + env: + CHANORA_DISABLE_KEYRING: "1" + run: cargo llvm-cov --workspace --lcov --output-path lcov.info + - name: Upload coverage artifact + uses: actions/upload-artifact@v4 + with: + name: lcov-report + path: lcov.info