Skip to content
Merged
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
14 changes: 14 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
build --java_language_version=17
build --tool_java_language_version=17
build --java_runtime_version=remotejdk_17
build --tool_java_runtime_version=remotejdk_17
build --@score-baselibs//score/json:base_library=nlohmann
build --@score-baselibs//score/mw/log/flags:KRemote_Logging=False

test --test_output=errors

common --registry=https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/
common --registry=https://bcr.bazel.build

# allow empty globs for docs
build --noincompatible_disallow_empty_glob
1 change: 1 addition & 0 deletions .bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8.3.0
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: Bugfix
about: 'Issue to track a bugfix'
title: 'Bugfix: Your bugfix title'
labels: 'codeowner_review'
assignees: ''

---

> [!IMPORTANT]
> Make sure to link this issue with the PR for your bugfix.
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/improvement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: Improvement
about: 'Issue to track a improvement'
title: 'Improvement: Your improvement title'
labels: 'codeowner_review'
assignees: ''

---

> [!IMPORTANT]
> Make sure to link this issue with the PR for your improvement.
19 changes: 19 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/bug_fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Bugfix

> [!IMPORTANT]
> Use this template only for bugfixes that do not influence topics covered by contribution requests or improvements.

> [!CAUTION]
> Make sure to submit your pull-request as **Draft** until you are ready to have it reviewed by the Committers.

## Description

[A short description of the bug being fixed by the contribution.]

## Related ticket

> [!IMPORTANT]
> Please replace `[ISSUE-NUMBER]` with the issue-number that tracks this bug fix. If there is no such
> ticket yet, create one via [this issue template](../ISSUE_TEMPLATE/new?template=bug_fix.md).

closes [ISSUE-NUMBER] (bugfix ticket)
19 changes: 19 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/improvement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Improvement

> [!IMPORTANT]
> Use this template only for improvement that do not influence topics covered by contribution requests or bug fixes.

> [!CAUTION]
> Make sure to submit your pull-request as **Draft** until you are ready to have it reviewed by the Committers.

## Description

[A short description of the improvement being addressed by the contribution.]

## Related ticket

> [!IMPORTANT]
> Please replace `[ISSUE-NUMBER]` with the issue-number that tracks this bug fix. If there is no such
> ticket yet, create one via [this issue template](../ISSUE_TEMPLATE/new?template=improvement.md).

closes [ISSUE-NUMBER] (improvement ticket)
47 changes: 47 additions & 0 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# *******************************************************************************
# 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: Security Audit

on:
pull_request:
branches: [main]
push:
branches: [main]
merge_group:
types: [checks_requested]
schedule:
# Run weekly on Monday at 06:00 UTC to catch newly disclosed advisories
- cron: "0 6 * * 1"

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
cargo-audit:
name: Cargo Audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install cargo-audit
uses: taiki-e/install-action@23db74cab27cd77071e076a00b569de9549cf0dd # v2.48.8
with:
tool: cargo-audit@0.22.1

- name: Run cargo audit
run: cargo audit
77 changes: 77 additions & 0 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# *******************************************************************************
# 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: Build & Test

on:
pull_request:
branches: [main]
push:
branches: [main]
merge_group:
types: [checks_requested]

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
cargo-build-test:
name: Cargo Build & Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Rust nightly
uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly-2025-07-14

- name: Cache cargo registry & target
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-test-

- name: Build all crates
run: cargo build --workspace

- name: Run tests (IPC tests run serially)
run: cargo test --workspace --all-targets

bazel-build-test:
name: Bazel Build & Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.14.0
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}-bazel
repository-cache: true

- name: Bazel build (excluding docs — score_plantuml requires local runfiles)
run: bazel build //src/... //tests/...

- name: Bazel test (excluding docs)
run: bazel test //src/... //tests/...
46 changes: 46 additions & 0 deletions .github/workflows/copyright.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# *******************************************************************************
# 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: Copyright Check

on:
pull_request:
branches: [main]
push:
branches: [main]
merge_group:
types: [checks_requested]

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
copyright:
name: Copyright Header Validation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.14.0
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}-bazel
repository-cache: true

- name: Check copyright headers
run: bazel run //:copyright.check
98 changes: 98 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# *******************************************************************************
# 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: Coverage

on:
pull_request:
branches: [main]
push:
branches: [main]
merge_group:
types: [checks_requested]

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
COVERAGE_THRESHOLD: 90

jobs:
coverage:
name: Code Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Rust nightly
uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly-2025-07-14
components: llvm-tools-preview

- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov

- name: Cache cargo registry & target
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-cov-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-cov-

- name: Generate coverage (LCOV)
run: cargo llvm-cov --workspace --exclude xtask --ignore-filename-regex 'test_utils|dfm_test_utils' --lcov --output-path lcov.info

- name: Generate coverage summary
id: coverage
run: |
# Extract total line coverage percentage from cargo-llvm-cov text output
REPORT=$(cargo llvm-cov --workspace --exclude xtask --ignore-filename-regex 'test_utils|dfm_test_utils' --no-run 2>&1)
echo "$REPORT"

# Parse the TOTAL line for line coverage
TOTAL_LINE_COV=$(echo "$REPORT" | grep '^TOTAL' | awk '{print $(NF-3)}' | tr -d '%')
echo "total_coverage=$TOTAL_LINE_COV" >> "$GITHUB_OUTPUT"
echo "### Coverage Report" >> "$GITHUB_STEP_SUMMARY"
echo "" >> "$GITHUB_STEP_SUMMARY"
echo "**Total line coverage: ${TOTAL_LINE_COV}%**" >> "$GITHUB_STEP_SUMMARY"
echo "" >> "$GITHUB_STEP_SUMMARY"
echo '```' >> "$GITHUB_STEP_SUMMARY"
echo "$REPORT" >> "$GITHUB_STEP_SUMMARY"
echo '```' >> "$GITHUB_STEP_SUMMARY"

- name: Upload coverage artifact
uses: actions/upload-artifact@v4
with:
name: coverage-lcov
path: lcov.info
retention-days: 30

- name: Enforce coverage threshold
run: |
COVERAGE="${{ steps.coverage.outputs.total_coverage }}"
THRESHOLD="${{ env.COVERAGE_THRESHOLD }}"
echo "Coverage: ${COVERAGE}%, Threshold: ${THRESHOLD}%"
if (( $(echo "$COVERAGE < $THRESHOLD" | bc -l) )); then
echo "::error::Coverage ${COVERAGE}% is below threshold ${THRESHOLD}%"
exit 1
fi
echo "Coverage ${COVERAGE}% meets threshold ${THRESHOLD}%"
Loading
Loading