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
1 change: 1 addition & 0 deletions .bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8.7.0
27 changes: 27 additions & 0 deletions .github/workflows/bzlmod-lock.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# *******************************************************************************
# 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: Bzlmod Lockfile Check
on:
pull_request:
types: [opened, reopened, synchronize]
merge_group:
types: [checks_requested]
permissions:
contents: read
jobs:
# Runs `bazel mod tidy` and `bazel mod deps --lockfile_mode=error`, so a
# MODULE.bazel change that was not accompanied by a regenerated
# MODULE.bazel.lock fails here instead of silently re-resolving. This matters
# because .bazelrc points at the mutable main branch of the score registry.
bzlmod-lock:
uses: eclipse-score/cicd-workflows/.github/workflows/bzlmod-lock-check.yml@93aac16ada7d247bbb6ae926509ddea74cf5213a # v0.0.2
27 changes: 27 additions & 0 deletions .github/workflows/copyright.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# *******************************************************************************
# 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 checks
on:
pull_request:
types: [opened, reopened, synchronize]
merge_group:
types: [checks_requested]
permissions:
contents: read
jobs:
# The target is passed explicitly because these live in //tools rather than in
# the root package - see tools/BUILD.bazel for why.
copyright-check:
uses: eclipse-score/cicd-workflows/.github/workflows/copyright.yml@93aac16ada7d247bbb6ae926509ddea74cf5213a # v0.0.2
with:
bazel-target: run //tools:copyright-check
27 changes: 27 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# *******************************************************************************
# 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: Formatting checks
on:
pull_request:
types: [opened, reopened, synchronize]
merge_group:
types: [checks_requested]
permissions:
contents: read
jobs:
# The target is passed explicitly because these live in //tools rather than in
# the root package - see tools/BUILD.bazel for why.
formatting-check:
uses: eclipse-score/cicd-workflows/.github/workflows/format.yml@93aac16ada7d247bbb6ae926509ddea74cf5213a # v0.0.2
with:
bazel-target: test --test_output=errors //tools:format.check
46 changes: 46 additions & 0 deletions .github/workflows/tests.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: Tests
on:
pull_request:
types: [opened, reopened, synchronize]
push:
branches:
- main
merge_group:
types: [checks_requested]
permissions:
contents: read
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
# Do not flood CI with superseded runs on a PR.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
unit_tests:
name: Unit tests
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: Checkout repository
uses: actions/checkout@v4.2.2
- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.18.0
with:
bazelisk-cache: true
disk-cache: unit_tests
repository-cache: true
cache-save: ${{ github.ref == 'refs/heads/main' }}
- name: Run unit tests
run: bazel test --test_output=errors //tests/...
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
bazel-*
MODULE.bazel.lock

__pycache__
.ruff_cache
26 changes: 24 additions & 2 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# *******************************************************************************
# 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
# *******************************************************************************

# SBOM Generation Package
#
# This package provides Bazel-native SBOM (Software Bill of Materials) generation
Expand All @@ -7,15 +20,24 @@
# - load("@score_sbom//:defs.bzl", "sbom")
# - use_extension("@score_sbom//:extensions.bzl", "sbom_metadata")

load("@rules_python//python:defs.bzl", "py_library")

package(default_visibility = ["//visibility:public"])

exports_files([
"defs.bzl",
"extensions.bzl",
"cpp_metadata.json",
"crates_metadata.json",
"BUILD.bazel",
"MODULE.bazel",
"npm_wrapper.sh",
])

# Source directories handed to //tools:copyright-check as directory artifacts.
exports_files([
".github",
"internal",
"scripts",
"tests",
])

# Filegroup for all SBOM-related bzl files
Expand Down
14 changes: 7 additions & 7 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module(
compatibility_level = 1,
)

bazel_dep(name = "rules_python", version = "1.4.1")
bazel_dep(name = "rules_python", version = "1.5.1")

PYTHON_VERSION = "3.12"

Expand All @@ -27,10 +27,10 @@ python.toolchain(
python_version = PYTHON_VERSION,
)

# score_tooling provides score_py_pytest test infrastructure (dev only)
bazel_dep(name = "score_tooling", dev_dependency = True)
# score_tooling provides score_py_pytest test infrastructure plus the
# //tools:format.check and //tools:copyright-check targets (dev only).
bazel_dep(name = "score_tooling", version = "1.3.1", dev_dependency = True)

local_path_override(
module_name = "score_tooling",
path = "../tooling",
)
# Formatters behind use_format_targets(); dev-only, same as score_tooling.
bazel_dep(name = "aspect_rules_lint", version = "2.3.0", dev_dependency = True)
bazel_dep(name = "buildifier_prebuilt", version = "8.5.1", dev_dependency = True)
Loading
Loading