From 7ba6c1838c5d7f0f09d62262876597bbaceefcbb Mon Sep 17 00:00:00 2001 From: Ethan Smith Date: Tue, 28 Apr 2026 12:43:08 -0700 Subject: [PATCH] Run our OSS CI jobs in parallel rather than sequence. Update CMake action to cache the CMake build directory betweeen runs. PiperOrigin-RevId: 907126439 --- .github/workflows/rust.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index ad33ae240..9bb44c89e 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -22,10 +22,26 @@ jobs: - uses: actions/checkout@v6 - name: Test Cargo project run: cargo test --verbose --workspace --exclude 'rs_bindings_from_cc*' --exclude '*_sys' --no-fail-fast + + test_cmake: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v6 + - name: Install ccache + run: sudo apt-get update && sudo apt-get install -y ccache + - name: Cache CMake with ccache + uses: actions/cache@v5 + with: + path: ~/.cache/ccache + key: ${{ runner.os }}-ccache-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-ccache- - name: Test CMake project run: | cd examples/build_systems/cmake - cmake -B build -S . + cmake -B build -S . -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache cmake --build build --parallel cd build ctest --output-on-failure --parallel 2