generated from eclipse-score/module_template
-
Notifications
You must be signed in to change notification settings - Fork 3
bazel: Base changes to repository #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
vinodreddy-g
merged 6 commits into
eclipse-score:main
from
qorix-group:arkjedrz_base-changes
Nov 18, 2025
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
e13e85f
bazel: Base changes to repository
arkjedrz 823ed39
bazel: add placeholder as an example
arkjedrz d4327ee
bazel: remove xtask runs
arkjedrz 1ac692a
bazel: post-review fixes
arkjedrz 44d2c2d
bazel: add copyright checks to examples and cocs
arkjedrz 4b51f0c
bazel: small fixes
arkjedrz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 8.3.0 | ||
| 8.4.2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| --- | ||
| name: Bug report | ||
| about: Create a report for a bug | ||
| title: 'Bug: Your bug title' | ||
| labels: 'bug' | ||
| assignees: '' | ||
|
|
||
| --- | ||
|
|
||
| ### Describe the bug: | ||
| <!-- A clear and concise description of what the bug is. --> | ||
|
|
||
| ### Steps to reproduce the behavior: | ||
| 1. | ||
| 2. | ||
|
|
||
| ### Observed behavior: | ||
|
|
||
| ### Expected behavior | ||
|
|
||
| ### Occurrence: | ||
| <!-- Sporadic / Always --> | ||
|
|
||
| ### Attachments / Logs: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| name: 'Setup Rust Build Environment' | ||
| description: 'Checks out code, installs protoc, and caches cargo dependencies' | ||
|
|
||
| inputs: | ||
| repo-token: | ||
| description: 'GitHub token for protoc downloads' | ||
| required: true | ||
|
|
||
|
|
||
| runs: | ||
| using: "composite" | ||
| steps: | ||
| - name: Checkout Repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Install protoc 26.1 | ||
| uses: arduino/setup-protoc@v3 | ||
| with: | ||
| version: 26.1 | ||
| repo-token: ${{ inputs.repo-token }} | ||
|
|
||
| - name: Cache cargo & target | ||
| uses: actions/cache@v3 | ||
| with: | ||
| path: | | ||
| ~/.cargo/registry | ||
| ~/.cargo/git | ||
| target | ||
| ~/.cargo/bin | ||
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-cargo- | ||
| - name: Install cargo-tarpaulin if not already installed | ||
| run: | | ||
| if ! command -v cargo-tarpaulin > /dev/null; then | ||
| cargo install cargo-tarpaulin --version 0.32.7 --locked | ||
| else | ||
| echo "cargo-tarpaulin is already installed" | ||
| fi | ||
| shell: bash |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| <!-- markdownlint-disable MD013 Line breaks on the bullet list lines are also present on the github renderer, therefore no line length limitation --> | ||
| <!-- markdownlint-disable MD041 On the github PR template we want to start with '## Headline' --> | ||
|
|
||
| ## Notes for Reviewer | ||
| <!-- Items in addition to the checklist below that the reviewer should look for --> | ||
|
|
||
| ## Pre-Review Checklist for the PR Author | ||
|
|
||
| * [ ] PR title is short, expressive and meaningful | ||
| * [ ] Commits are properly organized | ||
| * [ ] Relevant issues are linked in the [References](#references) section | ||
| * [ ] Tests are conducted | ||
| * [ ] Unit tests are added | ||
|
|
||
| ## Checklist for the PR Reviewer | ||
|
|
||
| * [ ] Commits are properly organized and messages are according to the guideline | ||
| * [ ] Unit tests have been written for new behavior | ||
| * [ ] Public API is documented | ||
| * [ ] PR title describes the changes | ||
|
|
||
| ## Post-review Checklist for the PR Author | ||
|
|
||
| * [ ] All open points are addressed and tracked via issues | ||
|
|
||
| ## References | ||
|
|
||
| <!-- Use either 'Closes #123' or 'Relates to #123' to reference the corresponding issue. --> | ||
|
|
||
| Closes # <!-- Add issue number after '#' --> | ||
|
|
||
| <!-- markdownlint-enable MD041 --> | ||
| <!-- markdownlint-enable MD013 --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| # ******************************************************************************* | ||
| # Copyright (c) 2025 Contributors to the Eclipse Foundation | ||
| # | ||
| # See the NOTICE file(s) distributed with this work for additional | ||
| # information regarding copyright ownership. | ||
| # | ||
| # This program and the accompanying materials are made available under the | ||
| # terms of the Apache License Version 2.0 which is available at | ||
| # https://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # ******************************************************************************* | ||
|
|
||
| name: "Setup Rust Build Environment" | ||
| description: "Checks out code, installs protoc, and caches cargo dependencies" | ||
|
|
||
| inputs: | ||
| repo-token: | ||
| description: "GitHub token for protoc downloads" | ||
| required: true | ||
|
|
||
| runs: | ||
| using: "composite" | ||
| steps: | ||
| - name: Checkout Repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Install protoc 26.1 | ||
| uses: arduino/setup-protoc@v3 | ||
| with: | ||
| version: 26.1 | ||
| repo-token: ${{ inputs.repo-token }} | ||
|
|
||
| - name: Cache cargo & target | ||
| uses: actions/cache@v3 | ||
| with: | ||
| path: | | ||
| ~/.cargo/registry | ||
| ~/.cargo/git | ||
| target | ||
| ~/.cargo/bin | ||
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-cargo- | ||
| - name: Install cargo-tarpaulin if not already installed | ||
| run: | | ||
| if ! command -v cargo-tarpaulin > /dev/null; then | ||
| cargo install cargo-tarpaulin --version 0.32.7 --locked | ||
| else | ||
| echo "cargo-tarpaulin is already installed" | ||
| fi | ||
| shell: bash |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| # ******************************************************************************* | ||
| # Copyright (c) 2025 Contributors to the Eclipse Foundation | ||
| # | ||
| # See the NOTICE file(s) distributed with this work for additional | ||
| # information regarding copyright ownership. | ||
| # | ||
| # This program and the accompanying materials are made available under the | ||
| # terms of the Apache License Version 2.0 which is available at | ||
| # https://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # ******************************************************************************* | ||
|
|
||
| name: Bazel Build | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, reopened, synchronize] | ||
| merge_group: | ||
| types: [checks_requested] | ||
|
|
||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| SCORE_QNX_USER: ${{ secrets.SCORE_QNX_USER }} | ||
| SCORE_QNX_PASSWORD: ${{ secrets.SCORE_QNX_PASSWORD }} | ||
| SCORE_QNX_LICENSE: ${{ secrets.SCORE_QNX_LICENSE }} | ||
| jobs: | ||
| build: | ||
| name: Build Bazel Code | ||
| runs-on: ${{ vars.REPO_RUNNER_LABELS && fromJSON(vars.REPO_RUNNER_LABELS) || 'ubuntu-latest' }} | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/[email protected] | ||
|
|
||
| - name: Install protoc 26.1 | ||
| uses: arduino/setup-protoc@v3 | ||
| with: | ||
| version: 26.1 | ||
| repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Setup Bazel | ||
| uses: bazel-contrib/[email protected] | ||
| with: | ||
| bazelisk-version: 1.26.0 # newest LTS before 1 Jun 2025 | ||
| disk-cache: true | ||
| repository-cache: true | ||
| bazelisk-cache: true | ||
|
|
||
| - name: Bazel info (discover paths) | ||
| id: bazel-info | ||
| run: | | ||
| echo "BAZEL_OUTPUT_BASE=$(bazel info output_base)" >> $GITHUB_ENV | ||
| echo "BAZEL_USER_ROOT=$(bazel info output_user_root)" >> $GITHUB_ENV | ||
| echo "BAZEL_REPO_CACHE=$(bazel info repository_cache)" >> $GITHUB_ENV | ||
| bazel info | ||
|
|
||
| - name: Cache Bazel output base | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| ${{ env.BAZEL_OUTPUT_BASE }}/action_cache | ||
| ${{ env.BAZEL_OUTPUT_BASE }}/bazel-out | ||
| ${{ env.BAZEL_OUTPUT_BASE }}/external | ||
| ${{ env.BAZEL_OUTPUT_BASE }}/execroot | ||
| key: bazel-ob-v2-${{ runner.os }}-${{ hashFiles('.bazelversion', 'MODULE.bazel', 'MODULE.bazel.lock', '**/*.bzl', 'Cargo.lock') }} | ||
| restore-keys: | | ||
| bazel-ob-v2-${{ runner.os }}- | ||
|
|
||
| - name: Build with Bazel | ||
| run: | | ||
| bazel build //... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,94 @@ | ||
| # ******************************************************************************* | ||
| # Copyright (c) 2025 Contributors to the Eclipse Foundation | ||
| # | ||
| # See the NOTICE file(s) distributed with this work for additional | ||
| # information regarding copyright ownership. | ||
| # | ||
| # This program and the accompanying materials are made available under the | ||
| # terms of the Apache License Version 2.0 which is available at | ||
| # https://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # ******************************************************************************* | ||
|
|
||
| name: cargo build, test, coverage and miri report | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main, development] | ||
| pull_request: | ||
| branches: [main, development] | ||
| types: [opened, ready_for_review, reopened, synchronize] | ||
|
|
||
| env: | ||
| CARGO_TERM_COLOR: always | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| jobs: | ||
| cargo-checks: | ||
| #permissions for docs deployment | ||
| permissions: | ||
| contents: write | ||
| pages: write | ||
| id-token: write | ||
| runs-on: ${{ vars.REPO_RUNNER_LABELS && fromJSON(vars.REPO_RUNNER_LABELS) || 'ubuntu-latest' }} | ||
| timeout-minutes: 45 # minutes is the maximum allowed for a cold run | ||
| steps: | ||
| - name: Checkout Repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Rust Build Environment | ||
| uses: ./.github/actions/setup-rust-build | ||
| with: | ||
| repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| # ---------- BUILD ---------- | ||
| - name: Cargo build | ||
| run: cargo build --verbose | ||
|
|
||
| # ---------- TARPAULIN(TEST + COVERAGE) ---------- | ||
| - name: Run tests under coverage | ||
| run: cargo +nightly tarpaulin --version 0.32.7 --skip-clean --out Html --verbose --no-dead-code --engine llvm --all-features | ||
arkjedrz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| - name: Upload coverage report | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: coverage-report | ||
| path: tarpaulin-report.html | ||
|
|
||
| # ---------- MIRI ---------- | ||
| - name: Install nightly + miri (minimal profile) | ||
| uses: actions-rs/toolchain@v1 | ||
| if: github.event.pull_request.draft == false | ||
| with: | ||
| toolchain: nightly-2025-05-30 | ||
| profile: minimal | ||
| components: miri | ||
| override: true | ||
|
|
||
| - name: Prefetch crates for nightly | ||
| if: github.event.pull_request.draft == false | ||
| run: cargo +nightly-2025-05-30 fetch --locked | ||
|
|
||
| - name: Purge Miri artifacts | ||
| if: github.event.pull_request.draft == false | ||
| run: | | ||
| rm -rf target/miri | ||
| rm -rf ~/.cache/miri | ||
|
|
||
| - name: Prefetch and build dependencies for Miri | ||
| if: github.event.pull_request.draft == false | ||
| run: cargo +nightly-2025-05-30 miri setup | ||
|
|
||
| - name: Run Miri and save report | ||
| if: github.event.pull_request.draft == false | ||
| env: | ||
| CARGO_INCREMENTAL: "0" # turn off incremental | ||
| run: | | ||
| set -o pipefail | ||
| cargo +nightly-2025-05-30 miri test --workspace \ | ||
| -- --skip test_mt_one_pop_one_stealer \ | ||
| --skip test_mt_one_push_mpmc_one_stealer \ | ||
| --skip test_one_producer_multi_stealer_mt_thread \ | ||
| --skip test_one_producer_one_stealer_mt_thread \ | ||
| 2>&1 | tee miri_report.txt | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.