From 605d7aa6a17c9bcdb3d9369b49cd1f40c59c01a7 Mon Sep 17 00:00:00 2001 From: Kai Graeper Date: Thu, 12 Feb 2026 13:16:10 +0100 Subject: [PATCH 1/2] add build support for arm64_qnx --- .bazelrc | 22 +++++++++++ .github/workflows/docs.yml | 2 + .../workflows/reusable_integration-build.yml | 37 ++++++++++++++++++- .github/workflows/reusable_smoke-test.yml | 13 ++++++- score_toolchains.MODULE.bazel | 4 +- 5 files changed, 74 insertions(+), 4 deletions(-) diff --git a/.bazelrc b/.bazelrc index ddd24a4ed9..2dccd29f79 100644 --- a/.bazelrc +++ b/.bazelrc @@ -13,6 +13,8 @@ common --registry=https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/ common --registry=https://bcr.bazel.build +common --credential_helper=*.qnx.com=%workspace%/integration/scripts/qnx_credential_helper.py +common --credential_helper_timeout="60s" # Flags needed by score_baselibs and communication modules. @@ -44,6 +46,26 @@ build:x86_64-linux --platforms=@score_bazel_platforms//:x86_64-linux-gcc_12.2.0- build:x86_64-linux --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_unknown_linux_gnu build:x86_64-linux --features=-treat_warnings_as_errors # due to baselibs deprecations +build:arm64-linux --config=shared +build:arm64-linux --platforms=@score_bazel_platforms//:aarch64-linux-gcc_12.2.0-posix +build:arm64-linux --features=-treat_warnings_as_errors # due to baselibs deprecations + +build:x86_64-qnx8_0 --sandbox_writable_path=/var/tmp +build:x86_64-qnx8_0 --config=shared +build:x86_64-qnx8_0 --platforms=@score_bazel_platforms//:x86_64-qnx8_0 +build:x86_64-qnx8_0 --extra_toolchains=@score_qcc_x86_64_toolchain//:x86_64-qnx-sdp_8.0.0-posix +build:x86_64-qnx8_0 --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_pc_nto_qnx800 +build:x86_64-qnx8_0 --define=config=build_qnx8 # for lifecycle + + +build:arm64-qnx8_0 --sandbox_writable_path=/var/tmp +build:arm64-qnx8_0 --config=shared +build:arm64-qnx8_0 --platforms=@score_bazel_platforms//:arm64-qnx8_0 +build:arm64-qnx8_0 --extra_toolchains=@score_qcc_aarch64_toolchain//:aarch64-qnx-sdp_8.0.0-posix +build:arm64-qnx8_0 --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_aarch64_unknown_nto_qnx800 +build:arm64-qnx8_0 --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_unknown_linux_gnu +build:arm64-qnx8_0 --define=config=build_qnx8 # for lifecycle + # this is deprecated, use build:x86_64-linux instead build:_bl_common --host_platform=@score_bazel_platforms//:x86_64-linux diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index fa0420bcac..09b2703a1b 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/reusable_integration-build.yml b/.github/workflows/reusable_integration-build.yml index 5aa65f613c..076b4027f3 100644 --- a/.github/workflows/reusable_integration-build.yml +++ b/.github/workflows/reusable_integration-build.yml @@ -56,6 +56,15 @@ on: REPO_READ_TOKEN: description: 'GitHub token with read access to the score modules. Defaults to github.token' required: false + SCORE_QNX_LICENSE: + description: 'Base64-encoded QNX license file for QNX builds.' + required: false + SCORE_QNX_USER: + description: 'Username for QNX license server authentication.' + required: false + SCORE_QNX_PASSWORD: + description: 'Password for QNX license server authentication.' + required: false inputs: known_good: description: 'Content of the known_good.json file to use for the integration test.' @@ -81,7 +90,7 @@ env: jobs: integration-test: - name: Integration Test + name: Integration Test ${{ inputs.config }} runs-on: ${{ inputs.repo_runner_labels != '' && (startsWith(inputs.repo_runner_labels, '[') && fromJSON(inputs.repo_runner_labels) || inputs.repo_runner_labels) || 'ubuntu-latest' }} steps: - name: Clean disk space @@ -102,6 +111,30 @@ jobs: disk-cache: ${{ inputs.config }} # Share repository cache between workflows. repository-cache: true + - name: Prepare QNX license + if: inputs.config == 'arm64-qnx8_0' || inputs.config == 'x86_64-qnx8_0' + env: + SCORE_QNX_LICENSE: ${{ secrets.SCORE_QNX_LICENSE }} + SCORE_QNX_USER: ${{ secrets.SCORE_QNX_USER }} + SCORE_QNX_PASSWORD: ${{ secrets.SCORE_QNX_PASSWORD }} + run: | + set -euo pipefail + if [ -z "${SCORE_QNX_LICENSE}" ]; then + echo "SCORE_QNX_LICENSE secret is not set. QNX builds will fail without a valid license." + exit 1 + fi + if [ -z "${SCORE_QNX_USER}" ]; then + echo "SCORE_QNX_USER secret is not set. QNX builds will fail without authentication." + exit 1 + fi + if [ -z "${SCORE_QNX_PASSWORD}" ]; then + echo "SCORE_QNX_PASSWORD secret is not set. QNX builds will fail without authentication." + exit 1 + fi + + LICENSE_DIR="/opt/score_qnx/license" + sudo mkdir -p "${LICENSE_DIR}" + echo "${SCORE_QNX_LICENSE}" | base64 --decode | sudo tee "${LICENSE_DIR}/licenses" >/dev/null - name: Update known good commits run: | echo "::group::write known_good.json from input" @@ -123,6 +156,8 @@ jobs: python3 scripts/integration_test.py --known-good known_good.updated.json --config "${{ inputs.config }}" env: GITHUB_TOKEN: ${{ secrets.REPO_READ_TOKEN != '' && secrets.REPO_READ_TOKEN || github.token }} + SCORE_QNX_USER: ${{ secrets.SCORE_QNX_USER }} + SCORE_QNX_PASSWORD: ${{ secrets.SCORE_QNX_PASSWORD }} - name: Upload logs artifact if: always() uses: actions/upload-artifact@v4 diff --git a/.github/workflows/reusable_smoke-test.yml b/.github/workflows/reusable_smoke-test.yml index ec9b7ac8c2..81d2f321a0 100644 --- a/.github/workflows/reusable_smoke-test.yml +++ b/.github/workflows/reusable_smoke-test.yml @@ -73,6 +73,15 @@ on: REPO_READ_TOKEN: description: 'Token for reading repositories' required: false + SCORE_QNX_LICENSE: + description: 'Base64-encoded QNX license file for QNX builds.' + required: false + SCORE_QNX_USER: + description: 'Username for QNX license server authentication.' + required: false + SCORE_QNX_PASSWORD: + description: 'Password for QNX license server authentication.' + required: false env: REFERENCE_INTEGRATION_REPO: ${{ vars.reference_integration_repo != '' && vars.reference_integration_repo || 'eclipse-score/reference_integration' }} @@ -141,10 +150,12 @@ jobs: - x86_64-linux # - arm64-linux # Add more configs here as needed - # - arm64-qnx8_0 + - arm64-qnx8_0 # - x86_64-qnx8_0 uses: ./.github/workflows/reusable_integration-build.yml secrets: inherit + # Skip QNX builds if secrets aren't available (e.g., from fork PRs) + if: ${{ !contains(matrix.config, 'qnx') || secrets.SCORE_QNX_LICENSE != '' }} with: known_good: ${{ needs.preparation.outputs.known_good_updated }} config: ${{ matrix.config }} diff --git a/score_toolchains.MODULE.bazel b/score_toolchains.MODULE.bazel index f3a27898f4..9a41a46c9d 100644 --- a/score_toolchains.MODULE.bazel +++ b/score_toolchains.MODULE.bazel @@ -50,10 +50,10 @@ gcc.toolchain( ) use_repo( gcc, + "score_gcc_toolchain", "score_gcc_aarch64_toolchain", - "score_gcc_x86_64_toolchain", - "score_qcc_aarch64_toolchain", "score_qcc_x86_64_toolchain", + "score_qcc_aarch64_toolchain", ) From 926562b9a6b982a760f403e950f19afdd6467f11 Mon Sep 17 00:00:00 2001 From: Kai Graeper Date: Thu, 12 Feb 2026 14:00:14 +0100 Subject: [PATCH 2/2] fix copilot findings --- .bazelrc | 1 - .github/workflows/docs.yml | 2 +- .github/workflows/reusable_integration-build.yml | 2 +- .github/workflows/reusable_smoke-test.yml | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.bazelrc b/.bazelrc index 2dccd29f79..feac858f0e 100644 --- a/.bazelrc +++ b/.bazelrc @@ -14,7 +14,6 @@ common --registry=https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/ common --registry=https://bcr.bazel.build common --credential_helper=*.qnx.com=%workspace%/integration/scripts/qnx_credential_helper.py -common --credential_helper_timeout="60s" # Flags needed by score_baselibs and communication modules. diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 09b2703a1b..58ba025a50 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -28,7 +28,7 @@ on: merge_group: types: [checks_requested] release: - types: [created] + types: [created] jobs: build-docs: diff --git a/.github/workflows/reusable_integration-build.yml b/.github/workflows/reusable_integration-build.yml index 076b4027f3..9df5d61156 100644 --- a/.github/workflows/reusable_integration-build.yml +++ b/.github/workflows/reusable_integration-build.yml @@ -112,7 +112,7 @@ jobs: # Share repository cache between workflows. repository-cache: true - name: Prepare QNX license - if: inputs.config == 'arm64-qnx8_0' || inputs.config == 'x86_64-qnx8_0' + if: contains(inputs.config, 'qnx') env: SCORE_QNX_LICENSE: ${{ secrets.SCORE_QNX_LICENSE }} SCORE_QNX_USER: ${{ secrets.SCORE_QNX_USER }} diff --git a/.github/workflows/reusable_smoke-test.yml b/.github/workflows/reusable_smoke-test.yml index 81d2f321a0..44cef49b61 100644 --- a/.github/workflows/reusable_smoke-test.yml +++ b/.github/workflows/reusable_smoke-test.yml @@ -155,7 +155,7 @@ jobs: uses: ./.github/workflows/reusable_integration-build.yml secrets: inherit # Skip QNX builds if secrets aren't available (e.g., from fork PRs) - if: ${{ !contains(matrix.config, 'qnx') || secrets.SCORE_QNX_LICENSE != '' }} + if: ${{ !contains(matrix.config, 'qnx') || (secrets.SCORE_QNX_LICENSE != '' && secrets.SCORE_QNX_USER != '' && secrets.SCORE_QNX_PASSWORD != '') }} with: known_good: ${{ needs.preparation.outputs.known_good_updated }} config: ${{ matrix.config }}