Skip to content

Commit 3de64b3

Browse files
Try quality stage
1 parent b5cee08 commit 3de64b3

2 files changed

Lines changed: 559 additions & 522 deletions

File tree

.github/workflows/builds.yml

Lines changed: 50 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -547,10 +547,11 @@ jobs:
547547
cmake --build build --parallel
548548
'
549549
550-
# Lightweight job: configure-only to produce compile_commands.json + generated
551-
# protobuf headers for clang-tidy, without waiting for the full build.
552-
configure:
553-
name: Configure (compile database)
550+
# ---------- Quality Checks ----------
551+
# Full linux-x64 build that produces the compile database and runs unit tests.
552+
# Downstream quality jobs (clang-tidy, coverage, sanitizers) depend on this.
553+
quality-build:
554+
name: Quality Build (linux-x64)
554555
runs-on: ubuntu-latest
555556

556557
steps:
@@ -560,6 +561,9 @@ jobs:
560561
submodules: recursive
561562
fetch-depth: 1
562563

564+
- name: Pull LFS files
565+
run: git lfs pull
566+
563567
- name: Install deps (Ubuntu)
564568
run: |
565569
set -eux
@@ -582,33 +586,66 @@ jobs:
582586
with:
583587
toolchain: stable
584588

589+
- name: Cache Cargo registry
590+
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
591+
with:
592+
path: |
593+
~/.cargo/registry
594+
~/.cargo/git
595+
key: ${{ runner.os }}-quality-cargo-reg-${{ hashFiles('**/Cargo.lock') }}
596+
restore-keys: ${{ runner.os }}-quality-cargo-reg-
597+
598+
- name: Cache Cargo target
599+
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
600+
with:
601+
path: client-sdk-rust/target
602+
key: ${{ runner.os }}-quality-cargo-target-${{ hashFiles('**/Cargo.lock') }}
603+
restore-keys: |
604+
${{ runner.os }}-quality-cargo-target-
605+
585606
- name: Set Linux build environment
586607
run: |
587608
echo "CXXFLAGS=-Wno-deprecated-declarations" >> $GITHUB_ENV
588609
echo "CFLAGS=-Wno-deprecated-declarations" >> $GITHUB_ENV
589610
LLVM_VERSION=$(llvm-config --version | cut -d. -f1)
590611
echo "LIBCLANG_PATH=/usr/lib/llvm-${LLVM_VERSION}/lib" >> $GITHUB_ENV
591612
592-
- name: CMake configure
593-
run: cmake --preset linux-release-all
613+
- name: Build
614+
run: |
615+
chmod +x build.sh
616+
./build.sh debug-all
594617
595-
- name: Generate protobuf headers
596-
run: cmake --build build-release --target livekit_proto
618+
- name: Run unit tests
619+
run: |
620+
build-debug/bin/livekit_unit_tests \
621+
--gtest_output=xml:build-debug/unit-test-results.xml
622+
623+
- name: Upload test results
624+
if: always()
625+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
626+
with:
627+
name: test-results-quality-linux-x64
628+
path: build-debug/unit-test-results.xml
629+
retention-days: 7
597630

598631
- name: Upload compile database
599632
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
600633
with:
601634
name: compile-database
602635
path: |
603-
build-release/compile_commands.json
604-
build-release/generated/
605-
build-release/_deps/*-src/
636+
build-debug/compile_commands.json
637+
build-debug/generated/
638+
build-debug/_deps/*-src/
606639
include/livekit/build.h
607640
retention-days: 1
608641

642+
- name: Clean after build (best-effort)
643+
if: always()
644+
run: ./build.sh clean-all || true
645+
609646
clang-tidy:
610647
name: clang-tidy
611-
needs: configure
648+
needs: quality-build
612649
runs-on: ubuntu-latest
613650
continue-on-error: false
614651
if: ${{ !cancelled() }}
@@ -653,7 +690,7 @@ jobs:
653690
with:
654691
style: ''
655692
tidy-checks: ''
656-
database: build-release
693+
database: build-debug
657694
files-changed-only: false
658695
lines-changed-only: false
659696
extensions: 'c,cpp,cc,cxx'

0 commit comments

Comments
 (0)