From b9986beb3b6183c2bdef21f59df000249bfd6fb8 Mon Sep 17 00:00:00 2001 From: Daniel Thwaites Date: Wed, 12 Aug 2026 11:32:21 +0100 Subject: [PATCH] Combine check workflows --- .github/workflows/build.yml | 51 ----- .github/workflows/code_coverage.yml | 47 ----- .github/workflows/gitlint.yml | 34 ---- .github/workflows/license_check.yml | 33 ---- .github/workflows/lint_clippy.yml | 55 ------ .github/workflows/on-pr-target.yml | 100 ++++++++++ .github/workflows/on-pr.yml | 209 +++++++++++++++++++- .github/workflows/qnx8.yml | 50 ----- .github/workflows/reference-integration.yml | 29 --- .github/workflows/sanitizers.yml | 56 ------ .github/workflows/test_and_docs.yml | 64 ------ 11 files changed, 306 insertions(+), 422 deletions(-) delete mode 100644 .github/workflows/build.yml delete mode 100644 .github/workflows/code_coverage.yml delete mode 100644 .github/workflows/gitlint.yml delete mode 100644 .github/workflows/license_check.yml delete mode 100644 .github/workflows/lint_clippy.yml create mode 100644 .github/workflows/on-pr-target.yml delete mode 100644 .github/workflows/qnx8.yml delete mode 100644 .github/workflows/reference-integration.yml delete mode 100644 .github/workflows/sanitizers.yml delete mode 100644 .github/workflows/test_and_docs.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 8b056bc631..0000000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,51 +0,0 @@ -# ******************************************************************************* -# Copyright (c) 2026 Contributors to the Eclipse Foundation -# -# See the NOTICE file(s) distributed with this work for additional -# information regarding copyright ownership. -# -# This program and the accompanying materials are made available under the -# terms of the Apache License Version 2.0 which is available at -# https://www.apache.org/licenses/LICENSE-2.0 -# -# SPDX-License-Identifier: Apache-2.0 -# ******************************************************************************* -name: Bazel Build - -on: - pull_request: - types: [opened, reopened, synchronize] - merge_group: - types: [checks_requested] - push: - branches: - - main -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - config: [x86_64-linux, arm64-linux] - steps: - - name: Checkout code - uses: actions/checkout@v7 - - - name: Setup Bazel - uses: bazel-contrib/setup-bazel@0.19.0 - with: - bazelisk-cache: true - disk-cache: ${{ github.workflow }}-${{ matrix.config }} - repository-cache: true - cache-save: ${{ github.event_name == 'push' }} - - - name: Bazel info (discover paths) - id: bazel-info - run: | - echo "BAZEL_OUTPUT_BASE=$(bazel info output_base)" >> $GITHUB_ENV - echo "BAZEL_USER_ROOT=$(bazel info output_user_root)" >> $GITHUB_ENV - echo "BAZEL_REPO_CACHE=$(bazel info repository_cache)" >> $GITHUB_ENV - bazel info - - - name: Build with Bazel - run: | - bazel build --lockfile_mode=error --config ${{ matrix.config }} //score/... //examples/... diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml deleted file mode 100644 index 15920899eb..0000000000 --- a/.github/workflows/code_coverage.yml +++ /dev/null @@ -1,47 +0,0 @@ -# ******************************************************************************* -# Copyright (c) 2026 Contributors to the Eclipse Foundation -# -# See the NOTICE file(s) distributed with this work for additional -# information regarding copyright ownership. -# -# This program and the accompanying materials are made available under the -# terms of the Apache License Version 2.0 which is available at -# https://www.apache.org/licenses/LICENSE-2.0 -# -# SPDX-License-Identifier: Apache-2.0 -# ******************************************************************************* -name: Code Coverage -on: - pull_request: - types: [opened, reopened, synchronize] - push: - branches: - - main - merge_group: - types: [checks_requested] - release: - types: [created] - -jobs: - cpp: - uses: eclipse-score/cicd-workflows/.github/workflows/cpp-coverage.yml@d5dfe332bab87edb629ae691dd4c83923712ec3d # v0.0.0 - with: - bazel-target: "//score/..." - bazel-config: "x86_64-linux" - extra-bazel-flags: "--test_output=errors --nocache_test_results --lockfile_mode=error --test_lang_filters=-rust,-miri" - artifact-name-suffix: "_cpp" - retention-days: 10 - # Accepting temporarily a lower coverage for the following reasons: - # - The coverage report is not accurate (does not include all files, includes mocks, etc.) - # - Some of the code (e.g. control client) is about to be replaced so testing it now does not make sense - # However, it is still more transparent to report a lower coverage rather than excluding various classes from the report - min-coverage: 66 - rust: - uses: eclipse-score/cicd-workflows/.github/workflows/rust-coverage.yml@d5dfe332bab87edb629ae691dd4c83923712ec3d # v0.0.0 - with: - bazel-test-targets: "//score/..." - bazel-test-config-flags: "--config=x86_64-linux --config=ferrocene-coverage --lockfile_mode=error --test_lang_filters=-cc,-miri" - bazel-test-args: "--test_output=errors --nocache_test_results --build_tag_filters=-miri,-loom --test_tag_filters=-miri,-loom" - coverage-target: "//:rust_coverage" - coverage-artifact-name: "rust-coverage-html" - min-coverage: 93 diff --git a/.github/workflows/gitlint.yml b/.github/workflows/gitlint.yml deleted file mode 100644 index 49e9406952..0000000000 --- a/.github/workflows/gitlint.yml +++ /dev/null @@ -1,34 +0,0 @@ -# ******************************************************************************* -# Copyright (c) 2025 Contributors to the Eclipse Foundation -# -# See the NOTICE file(s) distributed with this work for additional -# information regarding copyright ownership. -# -# This program and the accompanying materials are made available under the -# terms of the Apache License Version 2.0 which is available at -# https://www.apache.org/licenses/LICENSE-2.0 -# -# SPDX-License-Identifier: Apache-2.0 -# ******************************************************************************* - -name: Gitlint check -on: - pull_request: - types: [opened, synchronize, reopened] -env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -jobs: - lint-commits: - name: check-commit-messages - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v7 - with: - fetch-depth: 0 - - name: Run Gitlint Action - if: ${{ github.event_name == 'pull_request' }} - uses: ./.github/actions/gitlint - with: - pr-number: ${{ github.event.number }} - base-branch: ${{ github.event.pull_request.base.ref }} diff --git a/.github/workflows/license_check.yml b/.github/workflows/license_check.yml deleted file mode 100644 index 17cc05e24c..0000000000 --- a/.github/workflows/license_check.yml +++ /dev/null @@ -1,33 +0,0 @@ -# ******************************************************************************* -# Copyright (c) 2025 Contributors to the Eclipse Foundation -# -# See the NOTICE file(s) distributed with this work for additional -# information regarding copyright ownership. -# -# This program and the accompanying materials are made available under the -# terms of the Apache License Version 2.0 which is available at -# https://www.apache.org/licenses/LICENSE-2.0 -# -# SPDX-License-Identifier: Apache-2.0 -# ******************************************************************************* - -name: License check preparation -on: - pull_request_target: - types: [opened, reopened, synchronize] - merge_group: - types: [checks_requested] - -permissions: - pull-requests: write - issues: write - - -jobs: - license-check: - uses: eclipse-score/cicd-workflows/.github/workflows/license-check.yml@93aac16ada7d247bbb6ae926509ddea74cf5213a # v0.0.2 - with: - repo-url: "${{ github.server_url }}/${{ github.repository }}" - bazel-target: "run --lockfile_mode=error //:license-check" - secrets: - dash-api-token: ${{ secrets.ECLIPSE_GITLAB_API_TOKEN }} diff --git a/.github/workflows/lint_clippy.yml b/.github/workflows/lint_clippy.yml deleted file mode 100644 index d635cf1bbd..0000000000 --- a/.github/workflows/lint_clippy.yml +++ /dev/null @@ -1,55 +0,0 @@ -# ******************************************************************************* -# Copyright (c) 2025 Contributors to the Eclipse Foundation -# -# See the NOTICE file(s) distributed with this work for additional -# information regarding copyright ownership. -# -# This program and the accompanying materials are made available under the -# terms of the Apache License Version 2.0 which is available at -# https://www.apache.org/licenses/LICENSE-2.0 -# -# SPDX-License-Identifier: Apache-2.0 -# ******************************************************************************* - -name: clippy check - -on: - pull_request: - branches: [main, development] - types: [opened, ready_for_review, reopened, synchronize] - -env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -jobs: - lint-clippy: - timeout-minutes: 6 # 6 minutes is the maximum allowed for a cold run - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v7 - with: - fetch-depth: 0 - - - name: Cache Cargo registry, git deps & target - uses: actions/cache@v6 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - target - key: ${{ runner.os }}-cargo-lint-clippy-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - ${{ runner.os }}-cargo-lint-clippy- - - - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: 1.90.0 - override: true - components: clippy - - - name: check clippy errors - uses: actions-rs/cargo@v1 - with: - command: clippy - args: --all-features --all-targets --workspace -- -D warnings diff --git a/.github/workflows/on-pr-target.yml b/.github/workflows/on-pr-target.yml new file mode 100644 index 0000000000..9c78a98c1a --- /dev/null +++ b/.github/workflows/on-pr-target.yml @@ -0,0 +1,100 @@ +# ******************************************************************************* +# Copyright (c) 2025 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************* + +# Note: Checks here are difficult to modify, because they always use the definition +# from the main branch. Prefer using on-pr.yml if at all possible. + +name: PR Target + +on: + pull_request_target: + types: [opened, reopened, synchronize] + merge_group: + types: [checks_requested] + push: + branches: + - main + +permissions: + pull-requests: write + issues: write + +jobs: + qnx-build: + name: Build and test ${{ matrix.bazel-config }} + strategy: + fail-fast: false + matrix: + bazel-config: [unit-tests-x86_64-qnx, unit-tests-arm64-qnx] + uses: eclipse-score/cicd-workflows/.github/workflows/qnx-build.yml@d5dfe332bab87edb629ae691dd4c83923712ec3d + permissions: + contents: read + pull-requests: read + with: + bazel-target: "//score/... //examples/..." + bazel-config: ${{ matrix.bazel-config }} + bazel-test-target: "//examples/... //score/... //tests/..." + credential-helper: "scripts/internal/qnx_creds.py" + bazel-disk-cache: ${{ matrix.bazel-config }} + secrets: + score-qnx-license: ${{ secrets.SCORE_QNX_LICENSE }} + score-qnx-user: ${{ secrets.SCORE_QNX_USER }} + score-qnx-password: ${{ secrets.SCORE_QNX_PASSWORD }} + + # This is only here as a dependency of the documentation, the main test job is in on-pr.yml. + testlogs: + name: Upload test logs + uses: eclipse-score/cicd-workflows/.github/workflows/tests.yml@93aac16ada7d247bbb6ae926509ddea74cf5213a # v0.0.2 + permissions: + contents: read + with: + bazel-target: 'test --lockfile_mode=error //score/... //tests/... //scripts/... --config=x86_64-linux' + upload-name: 'bazel-testlogs' + + docs-build: + name: Build documentation + needs: testlogs + uses: eclipse-score/cicd-workflows/.github/workflows/docs.yml@93aac16ada7d247bbb6ae926509ddea74cf5213a # v0.0.2 + permissions: + contents: write + pages: write + pull-requests: write + id-token: write + with: + # the bazel-target depends on your repo specific docs_targets configuration (e.g. "suffix") + bazel-target: "--lockfile_mode=error //:docs -- --github_user=${{ github.repository_owner }} --github_repo=${{ github.event.repository.name }}" + retention-days: 3 + tests-report-artifact: bazel-testlogs + + license-check: + name: License check + uses: eclipse-score/cicd-workflows/.github/workflows/license-check.yml@93aac16ada7d247bbb6ae926509ddea74cf5213a # v0.0.2 + with: + repo-url: "${{ github.server_url }}/${{ github.repository }}" + bazel-target: "run --lockfile_mode=error //:license-check" + secrets: + dash-api-token: ${{ secrets.ECLIPSE_GITLAB_API_TOKEN }} + + ready: + name: Ready to merge + needs: + - qnx-build + - docs-build + - license-check + runs-on: ubuntu-slim + permissions: {} + if: always() + steps: + - name: Fail if any required job did not succeed + if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') + run: false diff --git a/.github/workflows/on-pr.yml b/.github/workflows/on-pr.yml index 768236c8b1..04a91990b3 100644 --- a/.github/workflows/on-pr.yml +++ b/.github/workflows/on-pr.yml @@ -10,9 +10,8 @@ # # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* -name: On PR Checks -permissions: - contents: read +name: PR + on: pull_request: types: [opened, reopened, synchronize] @@ -21,6 +20,210 @@ on: push: branches: - main + jobs: common: + name: Common checks + permissions: + contents: read uses: eclipse-score/cicd-workflows/.github/workflows/on-pr.yml@on-pr/v0.0.0 + + build: + name: Build ${{ matrix.bazel-config }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + bazel-config: [x86_64-linux, arm64-linux] + permissions: + contents: read + steps: + - name: Checkout code + uses: actions/checkout@v7 + + - name: Setup Bazel + uses: bazel-contrib/setup-bazel@0.19.0 + with: + bazelisk-cache: true + disk-cache: ${{ github.workflow }}-${{ matrix.bazel-config }} + repository-cache: true + cache-save: ${{ github.event_name == 'push' }} + + - name: Build with Bazel + run: | + bazel build --lockfile_mode=error --config ${{ matrix.bazel-config }} //score/... //examples/... + + test: + name: Test ${{ matrix.bazel-config }} + strategy: + fail-fast: false + matrix: + bazel-config: [x86_64-linux, arm64-linux] + # TODO: GitHub provides ARM servers but the workflow template does not allow to use them. + exclude: + - bazel-config: arm64-linux + uses: eclipse-score/cicd-workflows/.github/workflows/tests.yml@93aac16ada7d247bbb6ae926509ddea74cf5213a # v0.0.2 + permissions: + contents: read + with: + bazel-target: 'test --lockfile_mode=error //score/... //tests/... //scripts/... --config=${{ matrix.bazel-config }}' + + reference-integration: + name: Reference integration + # TODO: restore job once fixed. https://github.com/eclipse-score/lifecycle/issues/84 + if: false + uses: eclipse-score/reference_integration/.github/workflows/reusable_smoke-test.yml@main + secrets: inherit + with: + repo_runner_labels: 'ubuntu-latest' + module_name: 'score_lifecycle_health' + target_branch: 'main' + + sanitizers: + name: ${{ matrix.name }} + runs-on: ubuntu-latest + permissions: + contents: read + strategy: + fail-fast: false + matrix: + include: + - name: ASAN + UBSAN + LSAN + bazel-config: asan_ubsan_lsan + - name: TSAN + bazel-config: tsan + steps: + - name: Checkout code + uses: actions/checkout@v7 + + - name: Setup Bazel + uses: bazel-contrib/setup-bazel@0.19.0 + with: + bazelisk-cache: true + disk-cache: ${{ github.workflow }}-${{ matrix.bazel-config }} + repository-cache: true + cache-save: ${{ github.event_name == 'push' }} + + - name: Run tests with sanitizers + run: | + bazel test --lockfile_mode=error --config=${{ matrix.bazel-config }} --config=x86_64-linux //score/... //tests/... --verbose_failures + + - name: Upload test logs on failure + if: failure() + uses: actions/upload-artifact@v7 + with: + name: bazel-testlogs-${{ matrix.bazel-config }}-${{ github.run_id }} + path: bazel-testlogs/ + retention-days: 7 + + clippy: + name: Clippy + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - uses: actions/checkout@v7 + with: + fetch-depth: 0 + + - name: Cache Cargo registry, git deps & target + uses: actions/cache@v6 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-lint-clippy-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo-lint-clippy- + + - name: Install Rust toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: 1.90.0 + override: true + components: clippy + + - name: check clippy errors + uses: actions-rs/cargo@v1 + with: + command: clippy + args: --all-features --all-targets --workspace -- -D warnings + + cpp-coverage: + name: C++ coverage + uses: eclipse-score/cicd-workflows/.github/workflows/cpp-coverage.yml@d5dfe332bab87edb629ae691dd4c83923712ec3d # v0.0.0 + permissions: + contents: read + with: + bazel-target: "//score/..." + bazel-config: "x86_64-linux" + extra-bazel-flags: "--test_output=errors --nocache_test_results --lockfile_mode=error --test_lang_filters=-rust,-miri" + artifact-name-suffix: "_cpp" + retention-days: 10 + # Accepting temporarily a lower coverage for the following reasons: + # - The coverage report is not accurate (does not include all files, includes mocks, etc.) + # - Some of the code (e.g. control client) is about to be replaced so testing it now does not make sense + # However, it is still more transparent to report a lower coverage rather than excluding various classes from the report + min-coverage: 66 + + rust-coverage: + name: Rust coverage + uses: eclipse-score/cicd-workflows/.github/workflows/rust-coverage.yml@d5dfe332bab87edb629ae691dd4c83923712ec3d # v0.0.0 + permissions: + contents: read + with: + bazel-test-targets: "//score/..." + bazel-test-config-flags: "--config=x86_64-linux --config=ferrocene-coverage --lockfile_mode=error --test_lang_filters=-cc,-miri" + bazel-test-args: "--test_output=errors --nocache_test_results --build_tag_filters=-miri,-loom --test_tag_filters=-miri,-loom" + coverage-target: "//:rust_coverage" + coverage-artifact-name: "rust-coverage-html" + min-coverage: 93 + + docs-check: + name: Check documentation + uses: eclipse-score/cicd-workflows/.github/workflows/docs-verify.yml@93aac16ada7d247bbb6ae926509ddea74cf5213a # v0.0.2 + permissions: + pull-requests: write + contents: read + with: + bazel-docs-verify-target: "--lockfile_mode=error //:docs_check" + + gitlint: + name: Check commit messages + runs-on: ubuntu-latest + if: ${{ github.event_name == 'pull_request' }} + permissions: + contents: read + steps: + - name: Checkout code + uses: actions/checkout@v7 + with: + fetch-depth: 0 + - name: Run Gitlint Action + uses: ./.github/actions/gitlint + with: + pr-number: ${{ github.event.number }} + base-branch: ${{ github.event.pull_request.base.ref }} + + ready: + name: Ready to merge + needs: + - common + - build + - test + - reference-integration + - sanitizers + - clippy + - cpp-coverage + - rust-coverage + - docs-check + - gitlint + runs-on: ubuntu-slim + permissions: {} + if: always() + steps: + - name: Fail if any required job did not succeed + if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') + run: false diff --git a/.github/workflows/qnx8.yml b/.github/workflows/qnx8.yml deleted file mode 100644 index 4016446fd8..0000000000 --- a/.github/workflows/qnx8.yml +++ /dev/null @@ -1,50 +0,0 @@ -# ******************************************************************************* -# Copyright (c) 2026 Contributors to the Eclipse Foundation -# -# See the NOTICE file(s) distributed with this work for additional -# information regarding copyright ownership. -# -# This program and the accompanying materials are made available under the -# terms of the Apache License Version 2.0 which is available at -# https://www.apache.org/licenses/LICENSE-2.0 -# -# SPDX-License-Identifier: Apache-2.0 -# ******************************************************************************* - -name: QNX8 Build & Test -on: - pull_request_target: - types: [opened, reopened, synchronize] - push: - branches: - - main - merge_group: - types: [checks_requested] - workflow_call: -jobs: - qnx-build: - name: Build and Test ${{ matrix.bazel-config }} - strategy: - fail-fast: false - matrix: - include: - - bazel-config: unit-tests-x86_64-qnx - bazel-test-target: //examples/... //score/... //tests/... - - bazel-config: unit-tests-arm64-qnx - bazel-test-target: //examples/... //score/... //tests/... - extra-bazel-test-flags: "--test_timeout=120,600,1800,7200" # Increase test timeout due to QEMU emulation - uses: eclipse-score/cicd-workflows/.github/workflows/qnx-build.yml@d5dfe332bab87edb629ae691dd4c83923712ec3d - permissions: - contents: read - pull-requests: read - with: - bazel-target: "//score/... //examples/..." - bazel-config: ${{ matrix.bazel-config }} - bazel-test-target: ${{ matrix.bazel-test-target }} - credential-helper: "scripts/internal/qnx_creds.py" - bazel-disk-cache: ${{ matrix.bazel-config }} - secrets: - score-qnx-license: ${{ secrets.SCORE_QNX_LICENSE }} - score-qnx-user: ${{ secrets.SCORE_QNX_USER }} - score-qnx-password: ${{ secrets.SCORE_QNX_PASSWORD }} - diff --git a/.github/workflows/reference-integration.yml b/.github/workflows/reference-integration.yml deleted file mode 100644 index 737b695f19..0000000000 --- a/.github/workflows/reference-integration.yml +++ /dev/null @@ -1,29 +0,0 @@ -# ******************************************************************************* -# Copyright (c) 2026 Contributors to the Eclipse Foundation -# -# See the NOTICE file(s) distributed with this work for additional -# information regarding copyright ownership. -# -# This program and the accompanying materials are made available under the -# terms of the Apache License Version 2.0 which is available at -# https://www.apache.org/licenses/LICENSE-2.0 -# -# SPDX-License-Identifier: Apache-2.0 -# ******************************************************************************* - -name: Reference Integration Build -on: - pull_request: - types: [opened, reopened, synchronize] - merge_group: - types: [checks_requested] -jobs: - integration: - # TODO: restore job once fixed. https://github.com/eclipse-score/lifecycle/issues/84 - if: false - uses: eclipse-score/reference_integration/.github/workflows/reusable_smoke-test.yml@main - secrets: inherit - with: - repo_runner_labels: 'ubuntu-latest' - module_name: 'score_lifecycle_health' - target_branch: 'main' diff --git a/.github/workflows/sanitizers.yml b/.github/workflows/sanitizers.yml deleted file mode 100644 index 13dfd51a6a..0000000000 --- a/.github/workflows/sanitizers.yml +++ /dev/null @@ -1,56 +0,0 @@ -# ******************************************************************************* -# Copyright (c) 2026 Contributors to the Eclipse Foundation -# -# See the NOTICE file(s) distributed with this work for additional -# information regarding copyright ownership. -# -# This program and the accompanying materials are made available under the -# terms of the Apache License Version 2.0 which is available at -# https://www.apache.org/licenses/LICENSE-2.0 -# -# SPDX-License-Identifier: Apache-2.0 -# ******************************************************************************* -name: Sanitizers - -permissions: - contents: read - -on: - pull_request: - types: [opened, reopened, synchronize] - merge_group: - types: [checks_requested] - push: - branches: - - main - -jobs: - sanitizers: - runs-on: ubuntu-24.04 - strategy: - fail-fast: false - matrix: - config: [asan_ubsan_lsan, tsan] - steps: - - name: Checkout code - uses: actions/checkout@v7 - - - name: Setup Bazel - uses: bazel-contrib/setup-bazel@0.19.0 - with: - bazelisk-cache: true - disk-cache: ${{ github.workflow }}-${{ matrix.config }} - repository-cache: true - cache-save: ${{ github.event_name == 'push' }} - - - name: Run tests with sanitizers - run: | - bazel test --lockfile_mode=error --config=${{ matrix.config }} --config=x86_64-linux //score/... //tests/... --verbose_failures - - - name: Upload test logs on failure - if: failure() - uses: actions/upload-artifact@v7 - with: - name: bazel-testlogs-${{ matrix.config }}-${{ github.run_id }} - path: bazel-testlogs/ - retention-days: 7 diff --git a/.github/workflows/test_and_docs.yml b/.github/workflows/test_and_docs.yml deleted file mode 100644 index 346c5c269f..0000000000 --- a/.github/workflows/test_and_docs.yml +++ /dev/null @@ -1,64 +0,0 @@ -# ******************************************************************************* -# Copyright (c) 2025 Contributors to the Eclipse Foundation -# -# See the NOTICE file(s) distributed with this work for additional -# information regarding copyright ownership. -# -# This program and the accompanying materials are made available under the -# terms of the Apache License Version 2.0 which is available at -# https://www.apache.org/licenses/LICENSE-2.0 -# -# SPDX-License-Identifier: Apache-2.0 -# ******************************************************************************* - -name: Documentation - -permissions: - contents: write - pages: write - pull-requests: write - id-token: write - -on: - pull_request_target: - types: [opened, reopened, synchronize] # Allows forks to trigger the docs build - push: - branches: - - main - merge_group: - types: [checks_requested] - release: - types: [created] - -jobs: - docs-verify: - uses: eclipse-score/cicd-workflows/.github/workflows/docs-verify.yml@93aac16ada7d247bbb6ae926509ddea74cf5213a # v0.0.2 - permissions: - pull-requests: write - contents: read - with: - bazel-docs-verify-target: "--lockfile_mode=error //:docs_check" - run-tests: - uses: eclipse-score/cicd-workflows/.github/workflows/tests.yml@93aac16ada7d247bbb6ae926509ddea74cf5213a # v0.0.2 - permissions: - contents: read - pull-requests: read - with: - bazel-target: 'test --lockfile_mode=error //score/... //tests/... //scripts/... --config=x86_64-linux' - upload-name: 'bazel-testlogs' - packages: 'fakechroot' - build-docs: - needs: run-tests - if: ${{ needs.run-tests.result == 'success' }} - uses: eclipse-score/cicd-workflows/.github/workflows/docs.yml@93aac16ada7d247bbb6ae926509ddea74cf5213a # v0.0.2 - permissions: - contents: write - pages: write - pull-requests: write - id-token: write - - with: - # the bazel-target depends on your repo specific docs_targets configuration (e.g. "suffix") - bazel-target: "--lockfile_mode=error //:docs -- --github_user=${{ github.repository_owner }} --github_repo=${{ github.event.repository.name }}" - retention-days: 3 - tests-report-artifact: bazel-testlogs