Skip to content

Commit f2ac0f6

Browse files
authored
Basic repo setup: formatting, copyrights (#163)
* bazel: add starlark, formatting, copyright checks * format: apply for python * format: apply for rust * format: apply for bazel * format: apply for yaml * format: apply copyright headers * cicd: add format checks * update known_good script to match expected bazel formatting * format: empty line in the end for bash * cicd: use reusable format check
1 parent 52d57b0 commit f2ac0f6

File tree

96 files changed

+1623
-1138
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+1623
-1138
lines changed

.github/codeql/codeql-config.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
1+
# *******************************************************************************
2+
# Copyright (c) 2026 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+
# *******************************************************************************
113
name: "Custom CodeQL Configuration for MISRA"
2-
314
paths:
415
- repos
516
paths-ignore:
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# *******************************************************************************
2+
# Copyright (c) 2026 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+
# *******************************************************************************
113
deviations: []
214
guideline-recategorizations: []
315
deviation-permits: []

.github/tools/qnx_credential_helper.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,7 @@ def eprint(*args, **kwargs):
4949
eprint("Failed getting credentials from .netrc")
5050
sys.exit(1)
5151

52-
data = urllib.parse.urlencode(
53-
{"userlogin": login, "password": password, "UseCookie": "1"}
54-
)
52+
data = urllib.parse.urlencode({"userlogin": login, "password": password, "UseCookie": "1"})
5553
data = data.encode("ascii")
5654

5755
cookie_jar = http.cookiejar.CookieJar()
@@ -65,7 +63,7 @@ def eprint(*args, **kwargs):
6563
sys.exit(1)
6664

6765
cookies = {c.name: c.value for c in list(cookie_jar)}
68-
if not "myQNX" in cookies:
66+
if "myQNX" not in cookies:
6967
eprint("Failed to get myQNX cookie from login page")
7068
sys.exit(1)
7169

.github/workflows/build_and_test_autosd.yml

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,69 +10,56 @@
1010
#
1111
# SPDX-License-Identifier: Apache-2.0
1212
# *******************************************************************************
13-
1413
name: AutoSD - Build & Integration Test
15-
1614
on:
1715
pull_request:
1816
types: [opened, reopened, synchronize]
19-
2017
merge_group:
2118
types: [checks_requested]
22-
2319
push:
2420
branches:
2521
- main
26-
2722
jobs:
2823
build:
2924
name: x86_64
3025
runs-on: ubuntu-latest
31-
3226
steps:
3327
- name: Clean disk space
3428
uses: eclipse-score/more-disk-space@v1
35-
3629
- name: Checkout repository
3730
uses: actions/checkout@v4
38-
3931
- name: Setup Bazel
4032
uses: bazel-contrib/[email protected]
4133
with:
4234
bazelisk-cache: true
4335
disk-cache: ${{ github.workflow }}
4436
repository-cache: true
4537
cache-save: ${{ github.event_name == 'push' }}
46-
4738
- name: Install System Dependencies
4839
run: |
4940
sudo apt-get update -y
5041
sudo apt-get install -y podman curl qemu-system createrepo-c
51-
5242
- name: Build Showcases
5343
run: |
5444
bazel build --config autosd-x86_64 //images/autosd_x86_64:image
5545
working-directory: ./images/autosd_x86_64
56-
5746
- name: Copy showcases_all folder
5847
run: |
5948
set -e
6049
mkdir -p ./images/autosd_x86_64/build/rpms
6150
cp -R bazel-bin/showcases/showcases_all ./images/autosd_x86_64/build/files/
62-
6351
- name: Install AIB Tools
6452
run: |
6553
curl -o auto-image-builder.sh "https://gitlab.com/CentOS/automotive/src/automotive-image-builder/-/raw/main/auto-image-builder.sh?ref_type=heads"
6654
chmod +x auto-image-builder.sh
6755
working-directory: ./images/autosd_x86_64/build
68-
6956
- name: Build AutoSD QEMU (x86_64)
7057
run: |
7158
export AIB_LOCAL_CONTAINER_STORAGE=$PWD/_build/containers-storage
7259
7360
mkdir -p _build/containers-storage
7461
sudo -E ./auto-image-builder.sh build-builder --distro=autosd10-sig
75-
62+
7663
sudo -E ./auto-image-builder.sh build \
7764
--distro=autosd10-sig \
7865
--target=qemu \
@@ -85,26 +72,23 @@ jobs:
8572
8673
sudo chown $(id -u):$(id -u) _build/disk.qcow2
8774
working-directory: ./images/autosd_x86_64/build
88-
8975
- name: Enable KVM group perms
9076
run: |
9177
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
9278
sudo udevadm control --reload-rules
9379
sudo udevadm trigger --name-match=kvm
94-
9580
- name: Test QEMU image
9681
run: |
9782
sshcmd() {
9883
sshpass -p "$SSH_PASSWORD" ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p 2222 root@localhost $@
9984
}
100-
85+
10186
./scripts/run_qemu
102-
87+
10388
sshcmd 'cat /etc/os-release'
10489
working-directory: ./images/autosd_x86_64/build
10590
env:
10691
SSH_PASSWORD: password
107-
10892
- name: Archive QEMU disk image (x86_64)
10993
uses: actions/upload-artifact@v4
11094
with:

.github/workflows/build_and_test_ebclfsa.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,12 @@
1010
#
1111
# SPDX-License-Identifier: Apache-2.0
1212
# *******************************************************************************
13-
1413
name: EB corbos Linux for Safety Applications - Build & Integration Test
15-
1614
on:
1715
pull_request:
1816
types: [opened, reopened, synchronize]
1917
merge_group:
2018
types: [checks_requested]
21-
2219
push:
2320
branches:
2421
- main
@@ -28,26 +25,21 @@ jobs:
2825
runs-on: ubuntu-latest
2926
container:
3027
image: ghcr.io/eclipse-score/devcontainer:v1.1.0
31-
3228
steps:
3329
- name: Clean disk space
3430
uses: eclipse-score/more-disk-space@v1
35-
3631
- name: Checkout repository
3732
uses: actions/checkout@v4
38-
3933
- name: Setup Bazel
4034
uses: bazel-contrib/[email protected]
4135
with:
4236
bazelisk-cache: true
4337
disk-cache: ${{ github.workflow }}
4438
repository-cache: true
4539
cache-save: ${{ github.event_name == 'push' }}
46-
4740
- name: Build for EB corbos Linux for Safety Applications and run tests
4841
run: |
4942
bazel build --config=eb-aarch64 //images/ebclfsa_aarch64/scrample_integration:run
50-
5143
- name: Upload test logs
5244
uses: actions/upload-artifact@v5
5345
with:

.github/workflows/build_and_test_linux.yml

Lines changed: 24 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#
1111
# SPDX-License-Identifier: Apache-2.0
1212
# *******************************************************************************
13-
1413
name: Linux - Build & Integration Test
1514
on:
1615
workflow_dispatch:
@@ -21,33 +20,27 @@ on:
2120
branches:
2221
- main
2322
jobs:
24-
x86_64:
25-
runs-on: ubuntu-latest
26-
permissions:
27-
contents: write # required to upload release assets
28-
29-
steps:
30-
- name: Clean disk space
31-
uses: eclipse-score/more-disk-space@v1
32-
33-
- name: Checkout repository
34-
uses: actions/[email protected]
35-
36-
- name: Set up Docker Buildx
37-
uses: docker/[email protected]
38-
39-
- name: Setup Bazel
40-
uses: bazel-contrib/[email protected]
41-
with:
42-
bazelisk-cache: true
43-
disk-cache: ${{ github.workflow }}
44-
repository-cache: true
45-
cache-save: ${{ github.event_name == 'push' }}
46-
47-
- name: Build image
48-
run: |
49-
bazel build --config=linux-x86_64 //images/linux_x86_64:image
50-
51-
- name: Integration tests
52-
run: |
53-
bazel test --config=linux-x86_64 //feature_integration_tests/itf:linux_x86_64
23+
x86_64:
24+
runs-on: ubuntu-latest
25+
permissions:
26+
contents: write # required to upload release assets
27+
steps:
28+
- name: Clean disk space
29+
uses: eclipse-score/more-disk-space@v1
30+
- name: Checkout repository
31+
uses: actions/[email protected]
32+
- name: Set up Docker Buildx
33+
uses: docker/[email protected]
34+
- name: Setup Bazel
35+
uses: bazel-contrib/[email protected]
36+
with:
37+
bazelisk-cache: true
38+
disk-cache: ${{ github.workflow }}
39+
repository-cache: true
40+
cache-save: ${{ github.event_name == 'push' }}
41+
- name: Build image
42+
run: |
43+
bazel build --config=linux-x86_64 //images/linux_x86_64:image
44+
- name: Integration tests
45+
run: |
46+
bazel test --config=linux-x86_64 //feature_integration_tests/itf:linux_x86_64

.github/workflows/build_and_test_qnx.yml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,15 @@
1010
#
1111
# SPDX-License-Identifier: Apache-2.0
1212
# *******************************************************************************
13-
1413
name: QNX8 - Build & Integration Test
1514
on:
1615
pull_request_target:
1716
types: [opened, reopened, synchronize]
18-
1917
merge_group:
2018
types: [checks_requested]
21-
2219
push:
2320
branches:
2421
- main
25-
2622
jobs:
2723
qnx-build-x86_64:
2824
name: x86_64
@@ -31,22 +27,19 @@ jobs:
3127
permissions:
3228
contents: read
3329
pull-requests: read
34-
3530
steps:
3631
- name: Checkout repository (Handle all events)
3732
uses: actions/[email protected]
3833
with:
3934
ref: ${{ github.head_ref || github.event.pull_request.head.ref || github.ref }}
4035
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
41-
4236
- name: Setup Bazel with shared caching
4337
uses: bazel-contrib/[email protected]
4438
with:
4539
disk-cache: ${{ github.workflow }}
4640
repository-cache: true
4741
bazelisk-cache: true
4842
cache-save: ${{ github.event_name == 'push' }}
49-
5043
- name: Prepare QNX license
5144
env:
5245
SCORE_QNX_LICENSE: ${{ secrets.SCORE_QNX_LICENSE }}
@@ -56,33 +49,27 @@ jobs:
5649
LICENSE_DIR="/opt/score_qnx/license"
5750
sudo mkdir -p "${LICENSE_DIR}"
5851
echo "${SCORE_QNX_LICENSE}" | base64 --decode | sudo tee "${LICENSE_DIR}/licenses" >/dev/null
59-
6052
- name: Install qemu
6153
run: |
6254
sudo apt-get update
6355
sudo apt-get install -y qemu-system
64-
6556
- name: Enable KVM group perms
6657
run: |
6758
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
6859
sudo udevadm control --reload-rules
6960
sudo udevadm trigger --name-match=kvm
70-
7161
- name: Allow unprivileged user namespaces
7262
run: |
7363
sudo sysctl kernel.apparmor_restrict_unprivileged_userns=0
74-
7564
- name: Build with QNX toolchain
7665
env:
7766
SCORE_QNX_USER: ${{ secrets.SCORE_QNX_USER }}
7867
SCORE_QNX_PASSWORD: ${{ secrets.SCORE_QNX_PASSWORD }}
7968
run: |
8069
bazel build --config qnx-x86_64 //images/qnx_x86_64:image
81-
8270
- name: Run integration tests
8371
run: |
8472
bazel test --config=itf-qnx-x86_64 //feature_integration_tests/itf:qnx_x86_64
85-
8673
- name: Cleanup QNX license
8774
if: always()
8875
run: sudo rm -rf /opt/score_qnx

0 commit comments

Comments
 (0)