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
32 changes: 18 additions & 14 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,28 @@ build --tool_java_language_version=17
build --java_runtime_version=remotejdk_17
build --tool_java_runtime_version=remotejdk_17

build:x86_64-linux --platforms=@score_bazel_platforms//:x86_64-linux
build:x86_64-linux --define=config=x86_64-linux

build:x86_64-qnx --platforms=@score_bazel_platforms//:x86_64-qnx
build:x86_64-qnx --extra_toolchains=@toolchains_qnx_qcc//:qcc_x86_64
build:x86_64-qnx --define=config=x86_64-qnx

build:arm64-qnx --platforms=@score_toolchains_rust//platforms:aarch64-unknown-qnx8_0
build:arm64-qnx --platforms=@score_bazel_platforms//:arm64-qnx
build:arm64-qnx --extra_toolchains=@toolchains_qnx_qcc//:qcc_aarch64
build:arm64-qnx --define=config=arm64-qnx

test --test_output=errors

common --registry=https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/
common --registry=https://bcr.bazel.build
common --credential_helper=*.qnx.com=%workspace%/scripts/internal/qnx_creds.py

build:x86_64-linux --platforms=@score_bazel_platforms//:x86_64-linux
build:x86_64-linux --define=config=x86_64-linux

build:build_qnx8 --platforms=@score_bazel_platforms//:arm64-qnx8_0
build:build_qnx8 --extra_toolchains=@toolchains_qnx_qcc//:qcc_aarch64
build:build_qnx8 --extra_toolchains=@score_toolchains_rust//toolchains/aarch64-unknown-qnx8_0:toolchain_aarch64_qnx8_0
build:build_qnx8 --define=config=build_qnx8

# TODO: Enable when rust toolchain for x86_64-qnx becomes available
# build:x86_64-qnx --platforms=@score_bazel_platforms//:x86_64-qnx
# build:x86_64-qnx --extra_toolchains=@toolchains_qnx_qcc//:qcc_x86_64
# build:x86_64-qnx --define=config=x86_64-qnx

# score::mw::log
common --@score_baselibs//score/mw/log/flags:KRemote_Logging=False
common --@score_baselibs//score/json:base_library=nlohmann

## default is a stdout logger which looks like dlt logs
## uncomment below to use score::mw::log instead of the stdout logger
# build --cxxopt=-DLC_LOG_SCORE_MW_LOG
Expand All @@ -36,4 +38,6 @@ build --cxxopt=-Wno-deprecated-declarations

build --strip=never
build --enable_bzlmod
#build --verbose_failures

common --extra_toolchains=@gcc_toolchain//:host_gcc_12
common --extra_toolchains=@score_toolchains_rust//toolchains/x86_64-unknown-linux-gnu:toolchain_x86_64_linux
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.3.0
8.4.2
60 changes: 60 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# *******************************************************************************
# 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: Bazel Build

on:
pull_request:
types: [opened, reopened, synchronize]
merge_group:
types: [checks_requested]

jobs:
build:
name: Build Bazel Code
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2

- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.15.0
with:
bazelisk-version: 1.26.0 # newest LTS before 1 Jun 2025
disk-cache: true
repository-cache: true
bazelisk-cache: true

- 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: Cache Bazel output base
uses: actions/cache@v4
with:
path: |
${{ env.BAZEL_OUTPUT_BASE }}/action_cache
${{ env.BAZEL_OUTPUT_BASE }}/bazel-out
${{ env.BAZEL_OUTPUT_BASE }}/external
${{ env.BAZEL_OUTPUT_BASE }}/execroot
key: bazel-ob-v2-${{ runner.os }}-${{ hashFiles('.bazelversion', 'MODULE.bazel', 'MODULE.bazel.lock', '**/*.bzl', 'Cargo.lock') }}
restore-keys: |
bazel-ob-v2-${{ runner.os }}-

- name: Build with Bazel
run: |
bazel build //...
35 changes: 0 additions & 35 deletions .github/workflows/build_and_test_host_gcc.yml

This file was deleted.

34 changes: 34 additions & 0 deletions .github/workflows/build_qnx8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# *******************************************************************************
# 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: QNX8 Build
on:
pull_request_target:
types: [opened, reopened, synchronize]
merge_group:
types: [checks_requested]
jobs:
qnx-build:
uses: eclipse-score/cicd-workflows/.github/workflows/qnx-build.yml@main
permissions:
contents: read
pull-requests: read
with:
bazel-target: '//src/...'
bazel-config: 'build_qnx8'
credential-helper: 'scripts/internal/qnx_creds.py'
environment-name: 'workflow-approval'
secrets:
score-qnx-license: ${{ secrets.SCORE_QNX_LICENSE }}
score-qnx-user: ${{ secrets.SCORE_QNX_USER }}
score-qnx-password: ${{ secrets.SCORE_QNX_PASSWORD }}
5 changes: 3 additions & 2 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# *******************************************************************************
# Copyright (c) 2024 Contributors to the Eclipse Foundation
# Copyright (c) 2025 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
Expand All @@ -18,7 +18,8 @@ on:
types: [opened, reopened, synchronize]
merge_group:
types: [checks_requested]

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
formatting-check:
uses: eclipse-score/cicd-workflows/.github/workflows/format.yml@main
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/gitlint.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# *******************************************************************************
# Copyright (c) 2024 Contributors to the Eclipse Foundation
# Copyright (c) 2025 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
Expand All @@ -15,6 +15,8 @@ name: Gitlint check
on:
pull_request:
types: [opened, synchronize, reopened]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
lint-commits:
name: check-commit-messages
Expand All @@ -29,3 +31,4 @@ jobs:
uses: ./.github/actions/gitlint
with:
pr-number: ${{ github.event.number }}
base-branch: ${{ github.event.pull_request.base.ref }}
55 changes: 55 additions & 0 deletions .github/workflows/lint_clippy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# *******************************************************************************
# 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@v3
with:
fetch-depth: 0

- name: Cache Cargo registry, git deps & target
uses: actions/cache@v3
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
27 changes: 27 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# *******************************************************************************
# 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: Tests
on:
pull_request_target:
types: [opened, reopened, synchronize]
merge_group:
types: [checks_requested]
jobs:
test:
uses: eclipse-score/cicd-workflows/.github/workflows/test.yml@main
permissions:
contents: read
pull-requests: read
with:
bazel-target: 'test //src/...'
77 changes: 71 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,74 @@
demo/tmp
demo/config/tmp
# Prerequisites
*.d

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dylib
*.dll

# Fortran module files
*.mod
*.smod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app


# Bazel
bazel-*
.vscode
rust-project.json
MODULE.bazel.lock
user.bazelrc

# Ruff
.ruff_cache

# docs:incremental and docs:ide_support build artifacts
/_build

# Vale - editorial style guide
.vale.ini
styles/

# direnv - folder-specific bash configuration
.envrc

# Python
.venv
__pycache__/
/.coverage

# Rust
debug/
target/
MODULE.lock.bazel
_build/
/build/

*~
.*swp
.*swo

# pytest reports
tests/**/*.html
tests/**/*.xml

# VS Code files
.vscode*
*.orig
.venv_docs
3 changes: 3 additions & 0 deletions .vscode/rustfmt.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

bazel run @score_tooling//format_checker:rustfmt_with_policies
Loading
Loading