Skip to content

Commit e290d66

Browse files
authored
Merge pull request #1 from qorix-group/arkjedrz_base-changes
bazel: Base changes to repository
2 parents 77024a2 + 4b51f0c commit e290d66

38 files changed

+794
-223
lines changed

.bazelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ test --test_output=errors
77

88
common --registry=https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/
99
common --registry=https://bcr.bazel.build
10+
common --credential_helper=*.qnx.com=%workspace%/scripts/internal/qnx_creds.py
11+
12+
build:build_qnx8 --platforms=@score_toolchains_rust//platforms:aarch64-unknown-qnx8_0

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8.3.0
1+
8.4.2
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: Bug report
3+
about: Create a report for a bug
4+
title: 'Bug: Your bug title'
5+
labels: 'bug'
6+
assignees: ''
7+
8+
---
9+
10+
### Describe the bug:
11+
<!-- A clear and concise description of what the bug is. -->
12+
13+
### Steps to reproduce the behavior:
14+
1.
15+
2.
16+
17+
### Observed behavior:
18+
19+
### Expected behavior
20+
21+
### Occurrence:
22+
<!-- Sporadic / Always -->
23+
24+
### Attachments / Logs:

.github/actions/gitlint/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# *******************************************************************************
2-
# Copyright (c) 2024 Contributors to the Eclipse Foundation
2+
# Copyright (c) 2025 Contributors to the Eclipse Foundation
33
#
44
# See the NOTICE file(s) distributed with this work for additional
55
# information regarding copyright ownership.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: 'Setup Rust Build Environment'
2+
description: 'Checks out code, installs protoc, and caches cargo dependencies'
3+
4+
inputs:
5+
repo-token:
6+
description: 'GitHub token for protoc downloads'
7+
required: true
8+
9+
10+
runs:
11+
using: "composite"
12+
steps:
13+
- name: Checkout Repository
14+
uses: actions/checkout@v4
15+
16+
- name: Install protoc 26.1
17+
uses: arduino/setup-protoc@v3
18+
with:
19+
version: 26.1
20+
repo-token: ${{ inputs.repo-token }}
21+
22+
- name: Cache cargo & target
23+
uses: actions/cache@v3
24+
with:
25+
path: |
26+
~/.cargo/registry
27+
~/.cargo/git
28+
target
29+
~/.cargo/bin
30+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
31+
restore-keys: |
32+
${{ runner.os }}-cargo-
33+
- name: Install cargo-tarpaulin if not already installed
34+
run: |
35+
if ! command -v cargo-tarpaulin > /dev/null; then
36+
cargo install cargo-tarpaulin --version 0.32.7 --locked
37+
else
38+
echo "cargo-tarpaulin is already installed"
39+
fi
40+
shell: bash

.github/pull_request_template.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<!-- markdownlint-disable MD013 Line breaks on the bullet list lines are also present on the github renderer, therefore no line length limitation -->
2+
<!-- markdownlint-disable MD041 On the github PR template we want to start with '## Headline' -->
3+
4+
## Notes for Reviewer
5+
<!-- Items in addition to the checklist below that the reviewer should look for -->
6+
7+
## Pre-Review Checklist for the PR Author
8+
9+
* [ ] PR title is short, expressive and meaningful
10+
* [ ] Commits are properly organized
11+
* [ ] Relevant issues are linked in the [References](#references) section
12+
* [ ] Tests are conducted
13+
* [ ] Unit tests are added
14+
15+
## Checklist for the PR Reviewer
16+
17+
* [ ] Commits are properly organized and messages are according to the guideline
18+
* [ ] Unit tests have been written for new behavior
19+
* [ ] Public API is documented
20+
* [ ] PR title describes the changes
21+
22+
## Post-review Checklist for the PR Author
23+
24+
* [ ] All open points are addressed and tracked via issues
25+
26+
## References
27+
28+
<!-- Use either 'Closes #123' or 'Relates to #123' to reference the corresponding issue. -->
29+
30+
Closes # <!-- Add issue number after '#' -->
31+
32+
<!-- markdownlint-enable MD041 -->
33+
<!-- markdownlint-enable MD013 -->
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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: "Setup Rust Build Environment"
15+
description: "Checks out code, installs protoc, and caches cargo dependencies"
16+
17+
inputs:
18+
repo-token:
19+
description: "GitHub token for protoc downloads"
20+
required: true
21+
22+
runs:
23+
using: "composite"
24+
steps:
25+
- name: Checkout Repository
26+
uses: actions/checkout@v4
27+
28+
- name: Install protoc 26.1
29+
uses: arduino/setup-protoc@v3
30+
with:
31+
version: 26.1
32+
repo-token: ${{ inputs.repo-token }}
33+
34+
- name: Cache cargo & target
35+
uses: actions/cache@v3
36+
with:
37+
path: |
38+
~/.cargo/registry
39+
~/.cargo/git
40+
target
41+
~/.cargo/bin
42+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
43+
restore-keys: |
44+
${{ runner.os }}-cargo-
45+
- name: Install cargo-tarpaulin if not already installed
46+
run: |
47+
if ! command -v cargo-tarpaulin > /dev/null; then
48+
cargo install cargo-tarpaulin --version 0.32.7 --locked
49+
else
50+
echo "cargo-tarpaulin is already installed"
51+
fi
52+
shell: bash

.github/workflows/build.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
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: Bazel Build
15+
16+
on:
17+
pull_request:
18+
types: [opened, reopened, synchronize]
19+
merge_group:
20+
types: [checks_requested]
21+
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
SCORE_QNX_USER: ${{ secrets.SCORE_QNX_USER }}
25+
SCORE_QNX_PASSWORD: ${{ secrets.SCORE_QNX_PASSWORD }}
26+
SCORE_QNX_LICENSE: ${{ secrets.SCORE_QNX_LICENSE }}
27+
jobs:
28+
build:
29+
name: Build Bazel Code
30+
runs-on: ${{ vars.REPO_RUNNER_LABELS && fromJSON(vars.REPO_RUNNER_LABELS) || 'ubuntu-latest' }}
31+
steps:
32+
- name: Checkout code
33+
uses: actions/[email protected]
34+
35+
- name: Install protoc 26.1
36+
uses: arduino/setup-protoc@v3
37+
with:
38+
version: 26.1
39+
repo-token: ${{ secrets.GITHUB_TOKEN }}
40+
41+
- name: Setup Bazel
42+
uses: bazel-contrib/[email protected]
43+
with:
44+
bazelisk-version: 1.26.0 # newest LTS before 1 Jun 2025
45+
disk-cache: true
46+
repository-cache: true
47+
bazelisk-cache: true
48+
49+
- name: Bazel info (discover paths)
50+
id: bazel-info
51+
run: |
52+
echo "BAZEL_OUTPUT_BASE=$(bazel info output_base)" >> $GITHUB_ENV
53+
echo "BAZEL_USER_ROOT=$(bazel info output_user_root)" >> $GITHUB_ENV
54+
echo "BAZEL_REPO_CACHE=$(bazel info repository_cache)" >> $GITHUB_ENV
55+
bazel info
56+
57+
- name: Cache Bazel output base
58+
uses: actions/cache@v4
59+
with:
60+
path: |
61+
${{ env.BAZEL_OUTPUT_BASE }}/action_cache
62+
${{ env.BAZEL_OUTPUT_BASE }}/bazel-out
63+
${{ env.BAZEL_OUTPUT_BASE }}/external
64+
${{ env.BAZEL_OUTPUT_BASE }}/execroot
65+
key: bazel-ob-v2-${{ runner.os }}-${{ hashFiles('.bazelversion', 'MODULE.bazel', 'MODULE.bazel.lock', '**/*.bzl', 'Cargo.lock') }}
66+
restore-keys: |
67+
bazel-ob-v2-${{ runner.os }}-
68+
69+
- name: Build with Bazel
70+
run: |
71+
bazel build //...
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
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: cargo build, test, coverage and miri report
15+
16+
on:
17+
push:
18+
branches: [main, development]
19+
pull_request:
20+
branches: [main, development]
21+
types: [opened, ready_for_review, reopened, synchronize]
22+
23+
env:
24+
CARGO_TERM_COLOR: always
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
27+
jobs:
28+
cargo-checks:
29+
#permissions for docs deployment
30+
permissions:
31+
contents: write
32+
pages: write
33+
id-token: write
34+
runs-on: ${{ vars.REPO_RUNNER_LABELS && fromJSON(vars.REPO_RUNNER_LABELS) || 'ubuntu-latest' }}
35+
timeout-minutes: 45 # minutes is the maximum allowed for a cold run
36+
steps:
37+
- name: Checkout Repository
38+
uses: actions/checkout@v4
39+
40+
- name: Setup Rust Build Environment
41+
uses: ./.github/actions/setup-rust-build
42+
with:
43+
repo-token: ${{ secrets.GITHUB_TOKEN }}
44+
45+
# ---------- BUILD ----------
46+
- name: Cargo build
47+
run: cargo build --verbose
48+
49+
# ---------- TARPAULIN(TEST + COVERAGE) ----------
50+
- name: Run tests under coverage
51+
run: cargo +nightly tarpaulin --version 0.32.7 --skip-clean --out Html --verbose --no-dead-code --engine llvm --all-features
52+
53+
- name: Upload coverage report
54+
uses: actions/upload-artifact@v4
55+
with:
56+
name: coverage-report
57+
path: tarpaulin-report.html
58+
59+
# ---------- MIRI ----------
60+
- name: Install nightly + miri (minimal profile)
61+
uses: actions-rs/toolchain@v1
62+
if: github.event.pull_request.draft == false
63+
with:
64+
toolchain: nightly-2025-05-30
65+
profile: minimal
66+
components: miri
67+
override: true
68+
69+
- name: Prefetch crates for nightly
70+
if: github.event.pull_request.draft == false
71+
run: cargo +nightly-2025-05-30 fetch --locked
72+
73+
- name: Purge Miri artifacts
74+
if: github.event.pull_request.draft == false
75+
run: |
76+
rm -rf target/miri
77+
rm -rf ~/.cache/miri
78+
79+
- name: Prefetch and build dependencies for Miri
80+
if: github.event.pull_request.draft == false
81+
run: cargo +nightly-2025-05-30 miri setup
82+
83+
- name: Run Miri and save report
84+
if: github.event.pull_request.draft == false
85+
env:
86+
CARGO_INCREMENTAL: "0" # turn off incremental
87+
run: |
88+
set -o pipefail
89+
cargo +nightly-2025-05-30 miri test --workspace \
90+
-- --skip test_mt_one_pop_one_stealer \
91+
--skip test_mt_one_push_mpmc_one_stealer \
92+
--skip test_one_producer_multi_stealer_mt_thread \
93+
--skip test_one_producer_one_stealer_mt_thread \
94+
2>&1 | tee miri_report.txt

.github/workflows/copyright.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# *******************************************************************************
2-
# Copyright (c) 2024 Contributors to the Eclipse Foundation
2+
# Copyright (c) 2025 Contributors to the Eclipse Foundation
33
#
44
# See the NOTICE file(s) distributed with this work for additional
55
# information regarding copyright ownership.
@@ -17,6 +17,9 @@ on:
1717
types: [opened, reopened, synchronize]
1818
merge_group:
1919
types: [checks_requested]
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
2023
jobs:
2124
copyright-check:
2225
uses: eclipse-score/cicd-workflows/.github/workflows/copyright.yml@main

0 commit comments

Comments
 (0)