Skip to content

Commit edf72c8

Browse files
committed
Align autosd and workflows
1 parent 3b68c33 commit edf72c8

23 files changed

+195
-105
lines changed

.github/workflows/build_and_test_autosd.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ jobs:
4444
4545
- name: Build Lola Demo
4646
run: |
47-
bazel build --config=bl-x86_64-linux-autosd //:lola-demo
48-
working-directory: ./autosd
47+
bazel build --config=autosd-x86_64 //images/autosd_x86_64:lola-demo
48+
working-directory: ./integration
4949

5050
- name: Copy RPMs
5151
run: |

.github/workflows/build_and_test_ebclfsa.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ jobs:
3838

3939
- name: Build for EB corbos Linux for Safety Applications and run tests
4040
run: |
41-
bazel build --config=aarch64-ebclfsa //scrample_integration:run
42-
bazel build --config=aarch64-ebclfsa //persistency_integration:run
43-
working-directory: ./ebclfsa
41+
bazel build --config=eb-aarch64 //images/ebclfsa_aarch64/scrample_integration:run
42+
bazel build --config=eb-aarch64 //images/ebclfsa_aarch64/persistency_integration:run
43+
working-directory: ./integration
4444

4545
- name: Upload test logs
4646
uses: actions/upload-artifact@v5

.github/workflows/build_and_test_on_every_pr.yml

Lines changed: 0 additions & 56 deletions
This file was deleted.
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# *******************************************************************************
2+
# Copyright (c) 2025 Contributors to the Eclipse Foundation
3+
#
4+
# See the NOTICE file(s) distributed with this work for additional
5+
# information regarding copyright ownership.
6+
#
7+
# This program and the accompanying materials are made available under the
8+
# terms of the Apache License Version 2.0 which is available at
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# SPDX-License-Identifier: Apache-2.0
12+
# *******************************************************************************
13+
14+
name: QNX8 Build
15+
on:
16+
pull_request:
17+
types: [opened, reopened, synchronize]
18+
merge_group:
19+
types: [checks_requested]
20+
21+
jobs:
22+
qnx-build-x86_64:
23+
name: Build QNX target
24+
runs-on: ${{ vars.REPO_RUNNER_LABELS && fromJSON(vars.REPO_RUNNER_LABELS) || 'ubuntu-latest' }}
25+
environment: ${{ inputs.environment-name }}
26+
permissions:
27+
contents: read
28+
pull-requests: read
29+
30+
steps:
31+
- name: Checkout repository (Handle all events)
32+
uses: actions/checkout@v4.2.2
33+
with:
34+
ref: ${{ github.head_ref || github.event.pull_request.head.ref || github.ref }}
35+
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
36+
37+
- name: Setup Bazel with shared caching
38+
uses: bazel-contrib/setup-bazel@0.18.0
39+
with:
40+
disk-cache: ${{ inputs.bazel-disk-cache }}
41+
repository-cache: true
42+
bazelisk-cache: true
43+
cache-save: ${{ github.event_name == 'push' }}
44+
45+
- name: Prepare QNX license
46+
env:
47+
SCORE_QNX_LICENSE: ${{ secrets.score-qnx-license }}
48+
run: |
49+
set -euo pipefail
50+
51+
LICENSE_DIR="/opt/score_qnx/license"
52+
sudo mkdir -p "${LICENSE_DIR}"
53+
echo "${SCORE_QNX_LICENSE}" | base64 --decode | sudo tee "${LICENSE_DIR}/licenses" >/dev/null
54+
55+
- name: Build with QNX toolchain
56+
env:
57+
SCORE_QNX_USER: ${{ secrets.score-qnx-user }}
58+
SCORE_QNX_PASSWORD: ${{ secrets.score-qnx-password }}
59+
run: |
60+
set -euo pipefail
61+
62+
CRED_HELPER="${{ inputs.credential-helper }}"
63+
if [[ "${CRED_HELPER}" != /* ]]; then
64+
CRED_HELPER="${GITHUB_WORKSPACE}/${CRED_HELPER}"
65+
fi
66+
67+
if [[ ! -f "${CRED_HELPER}" ]]; then
68+
echo "Credential helper not found at ${CRED_HELPER}" >&2
69+
exit 1
70+
fi
71+
72+
if [[ ! -x "${CRED_HELPER}" ]]; then
73+
chmod +x "${CRED_HELPER}"
74+
fi
75+
76+
echo "Using credential helper at ${CRED_HELPER}"
77+
bazel run --config qnx-x86_64 //images/qnx_x86_64:image
78+
working-directory: ./integration
79+
80+
- name: Cleanup QNX license
81+
if: always()
82+
run: sudo rm -rf /opt/score_qnx

README.md

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,9 @@ The reference integration workspace serves as a single Bazel build environment t
1111
- Prepare for release validation workflows
1212

1313

14-
## Structure
14+
## Structure of integration folder
1515

16-
Repository structure
17-
18-
```
19-
- bazel_common
20-
- showcases
21-
- images
22-
- image1
23-
- showcases (symlink to ../../showcases)
24-
- bazel_common (symlink to ../../bazel_common)
25-
- runners
26-
- runner1 (symlink to ../../../runners/runner1)
27-
- image2
28-
...
29-
- runners
30-
- runner1
31-
- runner2
32-
```
33-
34-
The basic idea is that we use `symlinks` to share all common functionalities to achieve `DRY` rule.
16+
Intention for each folder is described below
3517

3618
### bazel_common
3719
Used to keep a common bazel functionalities for `images` like:
@@ -46,14 +28,16 @@ Used to keep `S-CORE` wide **showcases** implementation to showcase S-CORE in ce
4628
- proxy target bundling all `standalone` examples from all `S-CORE` repos to deploy then as single bazel target into image
4729
- implementation of certain **showcases** that shall be deployed into images
4830

31+
#### cli
32+
33+
Contains a CLI tool to be used on runner that is showcasing the S-CORE functionality. It will provide superior user experience and will guide user to run examples.
34+
How to use it in Your image, look [here](./integration/showcases/cli/README.md)
4935

5036
### images
5137
Used to keep concrete `images` for given target platform as bazel modules. Each platform shall have it's own folder with name `{platform}_{arch}` ie. `qnx_aarch64`.
5238

5339
This `images` shall:
54-
- symlink other shared folders (`bazel_common`, `showcases`) to receive common functionality.
55-
- symlink supported `runner` (if any)
56-
- deploy all `usecases` into image so they can be run inside
40+
- deploy all `showcases` into image so they can be run inside
5741
- other specific code for given `image`
5842

5943
### runners

integration/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Integration directory
2+
3+
## Get started
4+
5+
Simply run `./score_starter` and select which integration You want to run. Once running, You will be guided by our welcome cli to run selected examples.

integration/bazel_common/bundlers.bzl

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,22 @@ load("@rules_pkg//pkg:mappings.bzl", "pkg_files")
33

44

55
def score_pkg_bundle(name, bins, config_data= None, package_dir = None, other_package_files = []):
6-
"""Creates a reusable bundle: pkg_files → pkg_tar → untar"""
6+
"""
7+
Creates a reusable bundle by chaining Bazel packaging rules:
8+
- Collects binaries and config files into a pkg_files target, renaming them into subdirectories.
9+
- Packs them into a tar archive using pkg_tar, optionally with additional package files and a custom package directory.
10+
- Extracts the tar archive using a custom untar rule.
11+
Why:
12+
- Group related binaries and config files into a single package for distribution or deployment.
13+
- Group files from multiple targets into one package so deploying them into image is easy, consistent and same for each image.
14+
Args:
15+
name: Base name for all generated targets.
16+
bins: List of binary file labels to include in the bundle (placed in 'bin/').
17+
config_data: Optional list of config file labels to include (placed in 'configs/').
18+
package_dir: Optional directory path for the package root inside the tar archive.
19+
other_package_files: Optional list of additional `NAME_pkg_files` to include in the tar archive that was created by other `score_pkg_bundle` targets.
20+
21+
"""
722

823
all_files_name = name + "_pkg_files"
924
bundle_name = name + "_pkg_tar"
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)