Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/bzlmod-lock-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ on:

jobs:
bzlmod-lock-check:
runs-on: ${{ vars.REPO_RUNNER_LABELS && fromJSON(vars.REPO_RUNNER_LABELS) || 'ubuntu-latest' }}
runs-on: ${{ vars.runner_labels_ghub_standard_x64 && fromJSON(vars.runner_labels_ghub_standard_x64) || vars.REPO_RUNNER_LABELS && fromJSON(vars.REPO_RUNNER_LABELS) || 'ubuntu-latest' }}
steps:
- name: Checkout repository (Handle all events)
uses: actions/checkout@v4.2.2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ on:
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
runs-on: ${{ vars.runner_labels_ghub_standard_x64 && fromJSON(vars.runner_labels_ghub_standard_x64) || vars.REPO_RUNNER_LABELS && fromJSON(vars.REPO_RUNNER_LABELS) || 'ubuntu-latest' }}
permissions:
security-events: write
packages: read
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/copyright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ on:

jobs:
copyright-check:
runs-on: ${{ vars.REPO_RUNNER_LABELS && fromJSON(vars.REPO_RUNNER_LABELS) || 'ubuntu-latest' }}
runs-on: ${{ vars.runner_labels_ghub_standard_x64 && fromJSON(vars.runner_labels_ghub_standard_x64) || vars.REPO_RUNNER_LABELS && fromJSON(vars.REPO_RUNNER_LABELS) || 'ubuntu-latest' }}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isnt REPO_RUNNER_LABELS for that ?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. It is for the same thing but more specific/transparent to the reader of the workflow file what runner is intended to be used without being forced to check the runtime logs of a workflow.
And it allows to use differently sized runners within workflows of the same repository. I kept the REPO_RUNNER_LABELS to stay backwards compatible with the current implementation.

For SCore this flexibility might not be required yet but for companies that build a SCORE based middleware distribution and are reusing the workflow/action yaml files in their private GitHub org such flexibilty of the runner selection is already required right now. I would like to use the same GH org wide set variables for all repositories and not use REPO_RUNNER_LABELS for the Score repo forks(resp. manually synced repos) and another set of variables for the purely internal repos.

But in the end I agree it is (at the moment) a cosmetic change and not really required yet. But it does not hurt also to improve sth. before we urgently need it ;)

steps:
- name: Checkout repository
uses: actions/checkout@v4.2.2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cpp-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ permissions:
jobs:
coverage-report:
name: C++ Coverage
runs-on: ${{ vars.REPO_RUNNER_LABELS && fromJSON(vars.REPO_RUNNER_LABELS) || inputs.runner-label }}
runs-on: ${{ vars.runner_labels_ghub_standard_x64 && fromJSON(vars.runner_labels_ghub_standard_x64) || vars.REPO_RUNNER_LABELS && fromJSON(vars.REPO_RUNNER_LABELS) || inputs.runner-label }}

steps:
- name: Checkout repository
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ on:
jobs:
docs-cleanup:
name: Cleanup old documentation
runs-on: ${{ vars.REPO_RUNNER_LABELS && fromJSON(vars.REPO_RUNNER_LABELS) || 'ubuntu-latest' }}
runs-on: ${{ vars.runner_labels_ghub_standard_x64 && fromJSON(vars.runner_labels_ghub_standard_x64) || vars.REPO_RUNNER_LABELS && fromJSON(vars.REPO_RUNNER_LABELS) || 'ubuntu-latest' }}
permissions:
pages: write
contents: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ env:
jobs:
docs-verify:
name: Docs Verification
runs-on: ${{ vars.REPO_RUNNER_LABELS && fromJSON(vars.REPO_RUNNER_LABELS) || 'ubuntu-latest' }}
runs-on: ${{ vars.runner_labels_ghub_standard_x64 && fromJSON(vars.runner_labels_ghub_standard_x64) || vars.REPO_RUNNER_LABELS && fromJSON(vars.REPO_RUNNER_LABELS) || 'ubuntu-latest' }}
outputs:
verification-result: ${{ steps.verify.outcome }}
permissions:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ env:
jobs:
docs-build:
name: Build Documentation
runs-on: ${{ vars.REPO_RUNNER_LABELS && fromJSON(vars.REPO_RUNNER_LABELS) || 'ubuntu-latest' }}
runs-on: ${{ vars.runner_labels_ghub_standard_x64 && fromJSON(vars.runner_labels_ghub_standard_x64) || vars.REPO_RUNNER_LABELS && fromJSON(vars.REPO_RUNNER_LABELS) || 'ubuntu-latest' }}
permissions:
pull-requests: write
contents: read
Expand Down Expand Up @@ -169,7 +169,7 @@ jobs:

docs-deploy:
name: Deploy Documentation to GitHub Pages
runs-on: ${{ vars.REPO_RUNNER_LABELS && fromJSON(vars.REPO_RUNNER_LABELS) || 'ubuntu-latest' }}
runs-on: ${{ vars.runner_labels_ghub_standard_x64 && fromJSON(vars.runner_labels_ghub_standard_x64) || vars.REPO_RUNNER_LABELS && fromJSON(vars.REPO_RUNNER_LABELS) || 'ubuntu-latest' }}
needs: docs-build
concurrency:
group: pages-deploy-${{ github.repository }}-${{ github.ref }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ on:

jobs:
format-check:
runs-on: ${{ vars.REPO_RUNNER_LABELS && fromJSON(vars.REPO_RUNNER_LABELS) || 'ubuntu-latest' }}
runs-on: ${{ vars.runner_labels_ghub_standard_x64 && fromJSON(vars.runner_labels_ghub_standard_x64) || vars.REPO_RUNNER_LABELS && fromJSON(vars.REPO_RUNNER_LABELS) || 'ubuntu-latest' }}
steps:
- name: Checkout repository
uses: actions/checkout@v4.2.2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/license-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ on:

jobs:
license-check:
runs-on: ${{ vars.REPO_RUNNER_LABELS && fromJSON(vars.REPO_RUNNER_LABELS) || 'ubuntu-latest' }}
runs-on: ${{ vars.runner_labels_ghub_standard_x64 && fromJSON(vars.runner_labels_ghub_standard_x64) || vars.REPO_RUNNER_LABELS && fromJSON(vars.REPO_RUNNER_LABELS) || 'ubuntu-latest' }}
permissions:
pull-requests: write
issues: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/local_on_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

self_test:
name: 🔬 Self Test
runs-on: ubuntu-latest
runs-on: ${{ vars.runner_labels_ghub_standard_x64 && fromJSON(vars.runner_labels_ghub_standard_x64) || vars.REPO_RUNNER_LABELS && fromJSON(vars.REPO_RUNNER_LABELS) || 'ubuntu-latest' }}
steps:
- name: 📥 Check out
uses: actions/checkout@v6
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/qnx-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ on:
jobs:
qnx-build:
name: Build QNX target
runs-on: ${{ vars.REPO_RUNNER_LABELS && fromJSON(vars.REPO_RUNNER_LABELS) || 'ubuntu-latest' }}
runs-on: ${{ vars.runner_labels_ghub_standard_x64 && fromJSON(vars.runner_labels_ghub_standard_x64) || vars.REPO_RUNNER_LABELS && fromJSON(vars.REPO_RUNNER_LABELS) || 'ubuntu-latest' }}
environment: ${{ inputs.environment-name }}
permissions:
contents: read
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/required-approvals.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ on:

jobs:
check-approvals:
runs-on: ${{ vars.REPO_RUNNER_LABELS && fromJSON(vars.REPO_RUNNER_LABELS) || 'ubuntu-latest' }}
runs-on: ${{ vars.runner_labels_ghub_standard_x64 && fromJSON(vars.runner_labels_ghub_standard_x64) || vars.REPO_RUNNER_LABELS && fromJSON(vars.REPO_RUNNER_LABELS) || 'ubuntu-latest' }}
permissions:
id-token: write
contents: read
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rust-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ on:
jobs:
rust-coverage:
name: Rust Coverage
runs-on: ${{ vars.REPO_RUNNER_LABELS && fromJSON(vars.REPO_RUNNER_LABELS) || 'ubuntu-latest' }}
runs-on: ${{ vars.runner_labels_ghub_standard_x64 && fromJSON(vars.runner_labels_ghub_standard_x64) || vars.REPO_RUNNER_LABELS && fromJSON(vars.REPO_RUNNER_LABELS) || 'ubuntu-latest' }}
steps:
- name: Checkout repository (Handle all events)
uses: actions/checkout@v4.2.2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/score-pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:

jobs:
bazel-module-name-check:
runs-on: ubuntu-latest
runs-on: ${{ vars.runner_labels_ghub_standard_x64 && fromJSON(vars.runner_labels_ghub_standard_x64) || vars.REPO_RUNNER_LABELS && fromJSON(vars.REPO_RUNNER_LABELS) || 'ubuntu-latest' }}
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ on:
jobs:
static-analysis:
name: Static Code Analysis
runs-on: ${{ vars.REPO_RUNNER_LABELS && fromJSON(vars.REPO_RUNNER_LABELS) || 'ubuntu-latest' }}
runs-on: ${{ vars.runner_labels_ghub_standard_x64 && fromJSON(vars.runner_labels_ghub_standard_x64) || vars.REPO_RUNNER_LABELS && fromJSON(vars.REPO_RUNNER_LABELS) || 'ubuntu-latest' }}
steps:
- name: Checkout repository
uses: actions/checkout@v4.2.2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/template-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ on:

jobs:
repo-sync:
runs-on: ubuntu-latest
runs-on: ${{ vars.runner_labels_ghub_standard_x64 && fromJSON(vars.runner_labels_ghub_standard_x64) || vars.REPO_RUNNER_LABELS && fromJSON(vars.REPO_RUNNER_LABELS) || 'ubuntu-latest' }}
permissions:
contents: write
pull-requests: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ on:
jobs:
unit-tests:
name: Test Execution
runs-on: ubuntu-latest
runs-on: ${{ vars.runner_labels_ghub_standard_x64 && fromJSON(vars.runner_labels_ghub_standard_x64) || vars.REPO_RUNNER_LABELS && fromJSON(vars.REPO_RUNNER_LABELS) || 'ubuntu-latest' }}

steps:
- name: Checkout repository (Handle all events)
Expand Down
59 changes: 37 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@ These workflows integrate with **Bazel** and provide a consistent way to run **d

## Available Workflows

| Workflow | Description |
|-------------------------|--------------------------------------------------------------------|
| **Documentation Build** | Builds project documentation and deploys it to GitHub Pages |
| **Documentation Cleanup** | Cleans up old documentation versions from the `gh-pages` branch |
| **License Check** | Verifies OSS licenses and compliance |
| **Static Code Analysis**| Runs Clang-Tidy, Clippy, Pylint, and other linters |
| **Tests** | Executes tests using GoogleTest, Rust test, or pytest |
| **Rust Coverage** | Computes Rust code coverage and uploads HTML reports |
| **C++ Coverage** | Computes C++ code coverage using LCOV and uploads HTML reports |
| **Formatting Check** | Verifies code formatting using Bazel-based tools |
| **Copyright Check** | Ensures all source files have the required copyright headers |
| **Required Approvals** | Enforces stricter CODEOWNERS rules for multi-team approvals |
| **QNX Build (Gated)** | Builds QNX Bazel targets with environment-gated secrets for forks |
| **Documentation Verification** | Verifies documentation builds correctly and uploads results |
| **CodeQL Scan** | Performs security and quality analysis using GitHub CodeQL |
| **SCORE PR Checks** | Validates Bazel module naming conventions in pull requests |
| **Bzlmod Lockfile Check** | Enforces `MODULE.bazel.lock` consistency via `bazel mod tidy` |
| **Template Sync** | Synchronizes repository with eclipse-score/module_template |
| Workflow | Description |
| ------------------------------ | ----------------------------------------------------------------- |
| **Documentation Build** | Builds project documentation and deploys it to GitHub Pages |
| **Documentation Cleanup** | Cleans up old documentation versions from the `gh-pages` branch |
| **License Check** | Verifies OSS licenses and compliance |
| **Static Code Analysis** | Runs Clang-Tidy, Clippy, Pylint, and other linters |
| **Tests** | Executes tests using GoogleTest, Rust test, or pytest |
| **Rust Coverage** | Computes Rust code coverage and uploads HTML reports |
| **C++ Coverage** | Computes C++ code coverage using LCOV and uploads HTML reports |
| **Formatting Check** | Verifies code formatting using Bazel-based tools |
| **Copyright Check** | Ensures all source files have the required copyright headers |
| **Required Approvals** | Enforces stricter CODEOWNERS rules for multi-team approvals |
| **QNX Build (Gated)** | Builds QNX Bazel targets with environment-gated secrets for forks |
| **Documentation Verification** | Verifies documentation builds correctly and uploads results |
| **CodeQL Scan** | Performs security and quality analysis using GitHub CodeQL |
| **SCORE PR Checks** | Validates Bazel module naming conventions in pull requests |
| **Bzlmod Lockfile Check** | Enforces `MODULE.bazel.lock` consistency via `bazel mod tidy` |
| **Template Sync** | Synchronizes repository with eclipse-score/module_template |

---

Expand Down Expand Up @@ -574,16 +574,31 @@ This setup significantly reduces CI build time and improves reuse across differe
All workflows in this repository use the following logic for selecting the runner:

```yaml
runs-on: ${{ vars.REPO_RUNNER_LABELS && fromJSON(vars.REPO_RUNNER_LABELS) || 'ubuntu-latest' }}
runs-on: ${{ vars.runner_labels_ghub_standard_x64 && fromJSON(vars.runner_labels_ghub_standard_x64) || vars.REPO_RUNNER_LABELS && fromJSON(vars.REPO_RUNNER_LABELS) || 'ubuntu-latest' }}
```

This means:

- If your repository defines a variable named `REPO_RUNNER_LABELS` (e.g., in repository or organization settings), its value will be used as the runner label(s).
- If your repository defines a variable named `runner_labels_ghub_standard_x64` or `REPO_RUNNER_LABELS` (e.g., in repository or organization settings), its value will be used as the runner label(s).
This allows you to use **self-hosted runners** or any custom runner configuration.
- If `REPO_RUNNER_LABELS` is **not set**, the workflow will default to GitHub-hosted `ubuntu-latest`.
- If `runner_labels_ghub_standard_x64` or `REPO_RUNNER_LABELS` is **not set**, the workflow will default to GitHub-hosted `ubuntu-latest`.

**Why?**
This approach allows forked repositories or projects with special requirements to use their own runners, while everyone else gets a reliable default.

> ℹ️ **Tip:** To use a self-hosted runner, set the `REPO_RUNNER_LABELS` variable in your repository or organization settings to the label(s) of your runner.
> ℹ️ **Tip:** To use a self-hosted runner, set the `runner_labels_ghub_standard_x64` or `REPO_RUNNER_LABELS` variable in your repository or organization settings to the label(s) of your runner.

### Runner labels variable naming convention

Since it is very likely the case that different workflows will need different runners of different sizes, oses and architectures to be cost efficiently using the runner infrastructure the variable that specifies the runner labels shall follow this naming convention:

`runner_labels_<os>_<size>_<architecture>`

As of today following runner label variables are supported:

- runner_labels_ghub_standard_x64
- os: ghub - GitHub Ubuntu latest OS image
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should distinguish between ubuntu 22, 24 and 26

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just reflecting the fact that within score we also only used "ubuntu-latest" runners if I am not mistaken. If we decide we want to stick to one specific version then I would change accordingly the variable name as well.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, most workflow use latest = 24. Which is something I'll adjust when I finally start working on workflows... Was hoping to start for weeks.

Nevertheless some jobs must stay on ubuntu 22 for now, as they simply dont work on 24.

- size: standard - Maps to the specs of the "Ubuntu latest" GitHub hosted runner
- architecture: x64 - Maps to the architecture of the standard "Ubuntu latest" GitHub hosted runner. The value is taken from the [GitHub hosted runners reference page](https://docs.github.com/en/actions/reference/runners/github-hosted-runners)

Due to this new naming convention the variable **REPO_RUNNER_LABELS is deprecated** and will be removed eventually!
Loading