Improve GitHub CI hygiene, caching, and path filters - Ignore docs/** and **.md on C++ build workflows (linux, macos, windows, android, bazel) so doc-only changes do not trigger heavy C++/CUDA/NDK builds. - Add least-privilege permissions (contents: read) to all workflows. - Set CCACHE_COMPRESS=1 and CCACHE_MAXSIZE=500M so per-run ccache archives do not evict static dependency caches. - Run Windows MSVC tests in parallel via CTEST_PARALLEL_LEVEL. - Set fail-fast: false on build matrices so one flake does not cancel healthy legs, and cap strategy.max-parallel at 4 on linux, macos, and android to leave runner capacity for sync-to-gerrit.yaml. - Add .github/dependabot.yml for monthly GitHub Actions updates. Change-Id: Id9d932bb708318316682c171e39cbb5197e21d82
diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..3a626c3 --- /dev/null +++ b/.github/dependabot.yml
@@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: monthly
diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index c69a4dd..43b3bbd 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml
@@ -1,6 +1,17 @@ name: Android -on: [push, pull_request] +on: + push: + paths-ignore: + - 'docs/**' + - '**.md' + pull_request: + paths-ignore: + - 'docs/**' + - '**.md' + +permissions: + contents: read jobs: build-android: @@ -10,11 +21,14 @@ run: shell: bash -e -o pipefail {0} env: + CCACHE_COMPRESS: 1 CCACHE_DIR: ${{github.workspace}}/ccache + CCACHE_MAXSIZE: 500M CMAKE_GENERATOR: Ninja DEBIAN_FRONTEND: noninteractive strategy: - fail-fast: true + fail-fast: false + max-parallel: 4 matrix: os: - ubuntu-26.04
diff --git a/.github/workflows/bazel.yml b/.github/workflows/bazel.yml index 8c91a09..1212bc3 100644 --- a/.github/workflows/bazel.yml +++ b/.github/workflows/bazel.yml
@@ -1,6 +1,17 @@ name: Bazel -on: [push, pull_request] +on: + push: + paths-ignore: + - 'docs/**' + - '**.md' + pull_request: + paths-ignore: + - 'docs/**' + - '**.md' + +permissions: + contents: read jobs: build:
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 780e75c..2fa7dfb 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml
@@ -7,6 +7,9 @@ pull_request: workflow_dispatch: +permissions: + contents: read + concurrency: group: pages-${{ github.ref }} cancel-in-progress: true
diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 0446909..79cae55 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml
@@ -1,6 +1,17 @@ name: Linux -on: [push, pull_request] +on: + push: + paths-ignore: + - 'docs/**' + - '**.md' + pull_request: + paths-ignore: + - 'docs/**' + - '**.md' + +permissions: + contents: read jobs: build: @@ -11,11 +22,14 @@ run: shell: bash -e -o pipefail {0} env: + CCACHE_COMPRESS: 1 CCACHE_DIR: ${{github.workspace}}/ccache + CCACHE_MAXSIZE: 500M CMAKE_GENERATOR: Ninja DEBIAN_FRONTEND: noninteractive strategy: - fail-fast: true + fail-fast: false + max-parallel: 4 matrix: os: - ubuntu:24.04
diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 8d986d7..92faace 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml
@@ -1,6 +1,17 @@ name: macOS -on: [push, pull_request] +on: + push: + paths-ignore: + - 'docs/**' + - '**.md' + pull_request: + paths-ignore: + - 'docs/**' + - '**.md' + +permissions: + contents: read jobs: build: @@ -10,12 +21,15 @@ run: shell: bash -e -o pipefail {0} env: + CCACHE_COMPRESS: 1 CCACHE_DIR: ${{github.workspace}}/ccache + CCACHE_MAXSIZE: 500M CMAKE_GENERATOR: Ninja HOMEBREW_NO_AUTO_UPDATE: 1 HOMEBREW_NO_INSTALL_CLEANUP: 1 strategy: - fail-fast: true + fail-fast: false + max-parallel: 4 matrix: os: - macos-15
diff --git a/.github/workflows/reuse.yml b/.github/workflows/reuse.yml index aa45850..79ad25d 100644 --- a/.github/workflows/reuse.yml +++ b/.github/workflows/reuse.yml
@@ -2,6 +2,9 @@ on: [push, pull_request] +permissions: + contents: read + jobs: lint: name: REUSE compliance
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 66d3120..bd2eca2 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml
@@ -1,6 +1,17 @@ name: Windows -on: [push, pull_request] +on: + push: + paths-ignore: + - 'docs/**' + - '**.md' + pull_request: + paths-ignore: + - 'docs/**' + - '**.md' + +permissions: + contents: read jobs: build-mingw: @@ -10,9 +21,11 @@ run: shell: msys2 {0} env: + CCACHE_COMPRESS: 1 CCACHE_DIR: ${{github.workspace}}/ccache + CCACHE_MAXSIZE: 500M strategy: - fail-fast: true + fail-fast: false matrix: build_type: [Release] sys: [ucrt64] @@ -82,11 +95,13 @@ run: shell: powershell env: + CCACHE_COMPRESS: 1 CCACHE_DIR: ${{github.workspace}}/ccache + CCACHE_MAXSIZE: 500M CMAKE_GENERATOR: ${{matrix.generator}} CMAKE_GENERATOR_PLATFORM: ${{matrix.arch}} strategy: - fail-fast: true + fail-fast: false matrix: arch: - x64 @@ -298,6 +313,7 @@ env: CTEST_OUTPUT_ON_FAILURE: 1 run: | + $env:CTEST_PARALLEL_LEVEL = $env:NUMBER_OF_PROCESSORS cmake --build build_${{matrix.build_type}}/ ` --config ${{matrix.build_type}} ` --target RUN_TESTS