Skip to content
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
795b03f
Use composite action
MTomBosch May 7, 2026
e03893a
Merge branch 'main' into feature/setup-qnx-comp-action
MTomBosch May 7, 2026
40cc84f
Reduce code base due to usage of setup qnx comp action
MTomBosch May 7, 2026
dea9c41
Fix sha of comp action
MTomBosch May 7, 2026
bc14756
Fix Path to action.yml
MTomBosch May 7, 2026
2c157db
Support qnx-license-dir input param
MTomBosch May 8, 2026
a6af6fa
Update setup-qnx-sdp comp action link
MTomBosch May 8, 2026
abd64de
Fix path to comp action
MTomBosch May 8, 2026
601bf47
Update comp action ref
MTomBosch May 8, 2026
a302e80
Make lic server a var and not a secret
MTomBosch May 8, 2026
684d7de
Update comp action ref
MTomBosch May 8, 2026
292b550
Update comp action ref
MTomBosch May 8, 2026
d50730e
Applied yamlfmt formatting to get compatible with precommit check yam…
MTomBosch May 8, 2026
b604d47
Improved license cleanup logic
MTomBosch May 8, 2026
676041d
Update action ref
MTomBosch May 8, 2026
72abc4d
Fail workflow if license cannot be cleaned up
MTomBosch May 8, 2026
6c1bdde
Applied pre-commit hook
MTomBosch May 8, 2026
ab0e311
Update action ref
MTomBosch May 8, 2026
6fe99fc
Better "always" handling
MTomBosch May 8, 2026
a46a27c
First time using setup-qnx js action
MTomBosch May 11, 2026
9049a41
Cleanup no more required as it is done by setup-qnx action
MTomBosch May 11, 2026
8dff835
Update action ref
MTomBosch May 12, 2026
36e39fc
Update action ref
MTomBosch May 12, 2026
d8a8411
Update action ref
MTomBosch May 12, 2026
b13f5a5
Update action ref
MTomBosch May 12, 2026
9e16374
Update action ref
MTomBosch May 12, 2026
f5d6e5a
Use score action
MTomBosch May 18, 2026
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
110 changes: 39 additions & 71 deletions .github/workflows/qnx-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,54 +17,58 @@ on:
workflow_call:
inputs:
bazel-target:
description: "Bazel target to build with the QNX toolchain"
description: Bazel target to build with the QNX toolchain
required: false
default: "//..."
default: //...
type: string
bazel-config:
description: "Bazel configuration to use for QNX builds"
description: Bazel configuration to use for QNX builds
required: false
default: "x86_64-qnx"
default: x86_64-qnx
type: string
credential-helper:
description: "Relative or absolute path to the QNX credential helper script"
description: Relative or absolute path to the QNX credential helper script
required: false
default: ".github/tools/qnx_credential_helper.py"
default: .github/tools/qnx_credential_helper.py
type: string
environment-name:
description: "Environment gating access to QNX secrets"
description: Environment gating access to QNX secrets
required: false
default: "workflow-approval"
default: workflow-approval
type: string
bazel-disk-cache:
description: "Enable Bazel disk cache on GitHub. The value can be a string to use as cache key for separating workflows"
description: Enable Bazel disk cache on GitHub. The value can be a string to use as cache key for separating workflows
required: false
default: "true"
default: 'true'
type: string
extra-bazel-flags:
description: "Additional Bazel flags to pass to the build command (whitespace separated)"
description: Additional Bazel flags to pass to the build command (whitespace separated)
required: false
default: ""
default: ''
type: string
bazel-test-target:
description: "Bazel test targets to run with the QNX toolchain (leave empty to skip tests)"
description: Bazel test targets to run with the QNX toolchain (leave empty to skip tests)
required: false
default: ""
default: ''
type: string
extra-bazel-test-flags:
description: "Additional Bazel flags to pass to the test command (whitespace separated)"
description: Additional Bazel flags to pass to the test command (whitespace separated)
required: false
default: ''
type: string
score-qnx-license-server:
description: Address of the QNX license server (e.g. '6287@license-server-hostname'). Configures user.bazelrc with related action env vars.
required: false
default: ""
type: string
Comment thread
AlexanderLanin marked this conversation as resolved.
secrets:
score-qnx-license:
description: "Base64-encoded QNX license content"
description: Base64-encoded QNX license content
required: true
score-qnx-user:
description: "QNX account username"
description: QNX account username
required: true
score-qnx-password:
description: "QNX account password"
description: QNX account password
required: true

jobs:
Expand All @@ -84,8 +88,9 @@ jobs:

qnx-build:
name: Build QNX target
# always run this job, because the approval is sometimes skipped by intention
if: always()
# run this job always unless the workflow was canceled; approval may still be skipped by intention
# Do not use always(), see https://docs.github.com/en/actions/reference/workflows-and-actions/expressions#always
if: ${{ !cancelled() }}
needs: approval
runs-on: ${{ vars.runner_labels_ghub_standard_x64 && fromJSON(vars.runner_labels_ghub_standard_x64) || vars.REPO_RUNNER_LABELS && fromJSON(vars.REPO_RUNNER_LABELS) || 'ubuntu-latest' }}
permissions:
Expand All @@ -94,64 +99,35 @@ jobs:

steps:
- name: Checkout repository (Handle all events)
uses: actions/checkout@v4.2.2
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
with:
ref: ${{ github.head_ref || github.event.pull_request.head.ref || github.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}

- name: Setup Bazel with shared caching
uses: bazel-contrib/setup-bazel@0.18.0
uses: bazel-contrib/setup-bazel@c5acdfb288317d0b5c0bbd7a396a3dc868bb0f86 #v0.19.0
with:
disk-cache: ${{ inputs.bazel-disk-cache }}
repository-cache: true
Comment thread
AlexanderLanin marked this conversation as resolved.
bazelisk-cache: true
cache-save: ${{ github.event_name == 'push' }}

- name: Prepare QNX license
env:
SCORE_QNX_LICENSE: ${{ secrets.score-qnx-license }}
run: |
set -euo pipefail

if [[ -z "${SCORE_QNX_LICENSE}" ]]; then
echo "::error::score-qnx-license secret is not set."
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: Prepare credential helper
run: |
set -euo pipefail

CRED_HELPER="${{ inputs.credential-helper }}"
if [[ "${CRED_HELPER}" != /* ]]; then
CRED_HELPER="${GITHUB_WORKSPACE}/${CRED_HELPER}"
fi

if [[ ! -f "${CRED_HELPER}" ]]; then
echo "::error::Credential helper not found at ${CRED_HELPER}" >&2
exit 1
fi

if [[ ! -x "${CRED_HELPER}" ]]; then
chmod +x "${CRED_HELPER}"
fi

echo "CRED_HELPER=${CRED_HELPER}" >> "${GITHUB_ENV}"
- name: Setup QNX SDP usage
uses: eclipse-score/cicd-actions/setup-qnx-sdp@e558daa74b7a12d839ab0d85083bb81118992813 # 2026-05-18
with:
qnx-license: ${{ secrets.score-qnx-license }}
qnx-license-server: ${{ inputs.score-qnx-license-server }}
qnx-user: ${{ secrets.score-qnx-user }}
qnx-password: ${{ secrets.score-qnx-password }}
qnx-credential-helper: ${{ inputs.credential-helper }}
qnx-license-dir: /opt/score_qnx/license

- name: Build with QNX toolchain
env:
SCORE_QNX_USER: ${{ secrets.score-qnx-user }}
SCORE_QNX_PASSWORD: ${{ secrets.score-qnx-password }}
run: |
set -euo pipefail

echo "Using credential helper at ${CRED_HELPER}"
bazel build --config ${{ inputs.bazel-config }} \
--credential_helper=*.qnx.com="${CRED_HELPER}" ${{ inputs.extra-bazel-flags }} -- \
--credential_helper=*.qnx.com="${QNX_CREDENTIAL_HELPER}" ${{ inputs.extra-bazel-flags }} -- \
${{ inputs.bazel-target }}

- name: Install qemu
Expand All @@ -169,17 +145,9 @@ jobs:

- name: Test with QNX toolchain
if: inputs.bazel-test-target != ''
env:
SCORE_QNX_USER: ${{ secrets.score-qnx-user }}
SCORE_QNX_PASSWORD: ${{ secrets.score-qnx-password }}
run: |
set -euo pipefail

echo "Using credential helper at ${CRED_HELPER}"
bazel test --config ${{ inputs.bazel-config }} \
--credential_helper=*.qnx.com="${CRED_HELPER}" ${{ inputs.extra-bazel-test-flags }} -- \
--credential_helper=*.qnx.com="${QNX_CREDENTIAL_HELPER}" ${{ inputs.extra-bazel-test-flags }} -- \
${{ inputs.bazel-test-target }}

- name: Cleanup QNX license
if: always()
run: sudo rm -rf /opt/score_qnx
Loading