diff --git a/.bazelrc b/.bazelrc index c2f99da..a270044 100644 --- a/.bazelrc +++ b/.bazelrc @@ -1,3 +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 +# ******************************************************************************* + +# ------------------------------------------------------------------------------- +# Links to S-CORE Bazel registry and Bazel Central Registry +# ------------------------------------------------------------------------------- +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 +common --credential_helper_timeout="60s" + +# ------------------------------------------------------------------------------- +# Default flags (all configurations) +# ------------------------------------------------------------------------------- build --java_language_version=17 build --tool_java_language_version=17 build --java_runtime_version=remotejdk_17 @@ -5,17 +29,31 @@ build --tool_java_runtime_version=remotejdk_17 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 +# Ferrocene must be common compiler for HOST. To ensure metadata compatibility for proc macro crates! +common --extra_toolchains=@score_gcc_x86_64_toolchain//:x86_64-linux-gcc_12.2.0-posix +common --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_unknown_linux_gnu + +# ------------------------------------------------------------------------------- +# Config dedicated to target platform CPU:arm64 and OS:QNX +# ------------------------------------------------------------------------------- build:arm64-qnx --platforms=@score_bazel_platforms//:aarch64-qnx-sdp_8.0.0-posix build:arm64-qnx --extra_toolchains=@score_qcc_aarch64_toolchain//:aarch64-qnx-sdp_8.0.0-posix build:arm64-qnx --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_aarch64_unknown_nto_qnx800 -common --extra_toolchains=@score_gcc_x86_64_toolchain//:x86_64-linux-gcc_12.2.0-posix -common --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_unknown_linux_gnu +# ------------------------------------------------------------------------------- +# Config dedicated to target platform CPU:x86_64 and OS:QNX +# ------------------------------------------------------------------------------- +build:x86_64-qnx --platforms=@score_bazel_platforms//:x86_64-qnx-sdp_8.0.0-posix +build:x86_64-qnx --extra_toolchains=@score_qcc_x86_64_toolchain//:x86_64-qnx-sdp_8.0.0-posix +build:x86_64-qnx --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_pc_nto_qnx800 +# ------------------------------------------------------------------------------- +# Config dedicated to host platform CPU:x86_64 and OS:Linux +# ------------------------------------------------------------------------------- +build:x86_64-linux --platforms=@score_bazel_platforms//:x86_64-linux-gcc_12.2.0-posix +build:x86_64-linux --extra_toolchains=@score_gcc_x86_64_toolchain//:x86_64-linux-gcc_12.2.0-posix +build:x86_64-linux --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_unknown_linux_gnu # ------------------------------------------------------------------------------- # Ferrocene Rust coverage config diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 34bc40c..7bc743b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -68,4 +68,4 @@ jobs: - name: Build with Bazel run: | - bazel build //... + bazel build --config=x86_64-linux //... diff --git a/.github/workflows/build_qnx8.yml b/.github/workflows/build_qnx8.yml index b233347..f11fdf1 100644 --- a/.github/workflows/build_qnx8.yml +++ b/.github/workflows/build_qnx8.yml @@ -23,9 +23,12 @@ jobs: permissions: contents: read pull-requests: read + strategy: + matrix: + config: ['arm64-qnx', 'x86_64-qnx'] with: bazel-target: '//src/...' - bazel-config: 'arm64-qnx' + bazel-config: ${{ matrix.config }} credential-helper: 'scripts/internal/qnx_creds.py' environment-name: 'workflow-approval' secrets: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 24bd399..bcb3dc9 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -27,6 +27,8 @@ on: - main merge_group: types: [checks_requested] + release: + types: [created] jobs: build-docs: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6c5a1df..9dba189 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -45,4 +45,4 @@ jobs: - name: Run Tests via Bazel run: | echo "Running: bazel test //src/..." - bazel test //src/... + bazel test --config=x86_64-linux //src/...