-
Notifications
You must be signed in to change notification settings - Fork 0
publish: add source code and CI. #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
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
bfa277f
publish: add source code and CI.
alexmohr aaf88a5
split and rename crates
alexmohr 2112e20
add warning that write_float64 is not supported on 32 bit ARM
alexmohr 6b56f57
dlt-sys: use return value from register app and register context
alexmohr 55cd389
tracing: add feature to propagate trace-load into dlt-rs
alexmohr cce511a
dlt-rs: add TryFrom<&str> for DltId
alexmohr fe421d8
docs: add github pages job
alexmohr 780a530
docs: add README files for publishable crates
alexmohr 61c01cc
dlt-rs: Improve constructor for DltId and add from_str_clamped
alexmohr 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| # Copyright (c) 2025 The Contributors to Eclipse OpenSOVD (see CONTRIBUTORS) | ||
| # | ||
| # 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 | ||
|
|
||
| FROM ubuntu:latest | ||
|
|
||
| ENV DEBIAN_FRONTEND=noninteractive | ||
|
|
||
| RUN apt-get update && \ | ||
| apt-get install -y --no-install-recommends \ | ||
| git \ | ||
| cmake \ | ||
| build-essential \ | ||
| ca-certificates \ | ||
| curl \ | ||
| zlib1g-dev \ | ||
| llvm-dev \ | ||
| libclang-dev \ | ||
| clang \ | ||
| coreutils \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| RUN useradd -m -s /bin/bash dlt | ||
| RUN mkdir -p /run/dlt | ||
|
|
||
| WORKDIR /tmp/dlt-build | ||
| RUN git clone https://github.com/COVESA/dlt-daemon.git | ||
| WORKDIR /tmp/dlt-build/dlt-daemon | ||
|
|
||
| RUN mkdir build && cd build && \ | ||
| cmake .. \ | ||
| -DDLT_IPC=UNIX_SOCKET \ | ||
| -DWITH_DLT_CONSOLE=ON \ | ||
| -DWITH_DLT_USE_IPv6=OFF \ | ||
| -DDLT_USER_IPC_PATH="/run/dlt" \ | ||
| -DDLT_USER=root \ | ||
| -DCMAKE_INSTALL_SYSCONFDIR=/etc && \ | ||
| make -j$(nproc) && \ | ||
| make install && \ | ||
| echo "/usr/local/lib" > /etc/ld.so.conf.d/libdlt.conf && \ | ||
| ldconfig | ||
|
|
||
| # install rust toolchain | ||
| RUN curl https://sh.rustup.rs -sSf | \ | ||
| sh -s -- --default-toolchain 1.88.0 -y | ||
|
|
||
| ENV PATH=/root/.cargo/bin:$PATH | ||
|
|
||
| WORKDIR / | ||
| RUN rm -rf /tmp/dlt-build | ||
|
|
||
| # Create workspace directory for devcontainer | ||
| RUN mkdir -p /workspace | ||
| WORKDIR /workspace | ||
|
|
||
| CMD ["/bin/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,30 @@ | ||
| /* | ||
| * Copyright (c) 2025 The Contributors to Eclipse OpenSOVD (see CONTRIBUTORS) | ||
| * | ||
| * 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": "DLT Daemon Development", | ||
| "build": { | ||
| "dockerfile": "Dockerfile" | ||
| }, | ||
| "workspaceFolder": "/workspace", | ||
| "customizations": { | ||
| "vscode": { | ||
| "extensions": [ | ||
| "rust-lang.rust-analyzer", | ||
| "BarbossHack.crates-io", | ||
| "tamasfe.even-better-toml" | ||
| ] | ||
| } | ||
| }, | ||
| "remoteUser": "root" | ||
| } |
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,5 @@ | ||
| # This file specifies who owns what in the repository | ||
| # Syntax: <pattern> <owner(s)> | ||
|
|
||
| # Entire repo ownership | ||
| * @eclipse-opensovd/automotive-opensovd-committers |
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,47 @@ | ||
| # Copyright (c) 2025 The Contributors to Eclipse OpenSOVD (see CONTRIBUTORS) | ||
| # | ||
| # 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 DLT | ||
| description: Install system dependencies and build DLT daemon | ||
| runs: | ||
| using: composite | ||
| steps: | ||
| - name: Install system dependencies | ||
| shell: bash | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y --no-install-recommends \ | ||
| cmake \ | ||
| build-essential \ | ||
| ca-certificates \ | ||
| curl \ | ||
| zlib1g-dev \ | ||
| llvm-dev \ | ||
| libclang-dev \ | ||
| clang \ | ||
| coreutils | ||
| - name: Build and install DLT | ||
| shell: bash | ||
| run: | | ||
| git clone https://github.com/COVESA/dlt-daemon.git | ||
| cd dlt-daemon | ||
| mkdir build && cd build | ||
| cmake .. \ | ||
| -DDLT_IPC=UNIX_SOCKET \ | ||
| -DWITH_DLT_CONSOLE=ON \ | ||
| -DWITH_DLT_USE_IPv6=OFF \ | ||
| -DDLT_USER_IPC_PATH="/tmp" \ | ||
| -DDLT_USER=root \ | ||
| -DCMAKE_INSTALL_SYSCONFDIR=/etc | ||
| make -j$(nproc) | ||
| sudo make install | ||
| echo "/usr/local/lib" | sudo tee /etc/ld.so.conf.d/libdlt.conf | ||
| sudo ldconfig |
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,88 @@ | ||
| # Copyright (c) 2025 The Contributors to Eclipse OpenSOVD (see CONTRIBUTORS) | ||
| # | ||
| # 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: Rust CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| format_and_clippy_nightly_toolchain: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| submodules: false | ||
| - uses: ./.github/actions/setup-dlt | ||
| - name: Install Rust toolchain | ||
| uses: dtolnay/rust-toolchain@nightly | ||
| with: | ||
| toolchain: nightly-2025-07-14 | ||
| components: clippy, rustfmt | ||
| - name: Cache Rust dependencies | ||
| uses: Swatinem/rust-cache@v2 | ||
| - name: Formating - check for long lines | ||
| run: cargo fmt -- --check --config error_on_unformatted=true,error_on_line_overflow=true,format_strings=true | ||
| - name: Formatting - check import order | ||
| run: cargo fmt -- --check --config group_imports=StdExternalCrate | ||
| - name: Formatting - check imports granularity | ||
| run: cargo fmt -- --check --config imports_granularity=Crate | ||
| - name: run clippy nightly | ||
| run: cargo clippy --all-targets -- -D warnings | ||
| - name: Install taplo toml toolkit | ||
| run: cargo install --locked --version 0.10.0 taplo-cli | ||
|
|
||
| build_and_test: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| submodules: false | ||
| - uses: ./.github/actions/setup-dlt | ||
| - name: Cache Rust dependencies | ||
| uses: Swatinem/rust-cache@v2 | ||
| - name: Install cargo-deny | ||
| run: cargo install --locked --version 0.18.3 cargo-deny | ||
| - name: Build | ||
| run: cargo build --locked --verbose | ||
| - name: Check licenses | ||
| run: cargo deny check licenses | ||
| - name: Check advisories | ||
| run: cargo deny check advisories | ||
| - name: Check allowed sources | ||
| run: cargo deny check sources | ||
| - name: Check banned practises | ||
| run: cargo deny check bans | ||
| - name: Run tests | ||
| env: | ||
| RUSTFLAGS: "-L /usr/local/lib" | ||
| PKG_CONFIG_PATH: "/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH" | ||
| run: cargo test --locked --features integration-tests -- --show-output | ||
|
|
||
| check_copyright_headers: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - name: Check License Headers | ||
| uses: apache/skywalking-eyes/[email protected] | ||
| with: | ||
| config: .licenserc.yaml |
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,74 @@ | ||
| # Copyright (c) 2025 The Contributors to Eclipse OpenSOVD (see CONTRIBUTORS) | ||
| # | ||
| # 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: Generate documentation | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - 'v*' | ||
| branches: | ||
| - main | ||
| pull_request: | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: write | ||
| actions: write | ||
| pages: write | ||
| id-token: write | ||
|
|
||
| jobs: | ||
| build_documentation: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| submodules: false | ||
| - uses: ./.github/actions/setup-dlt | ||
| - name: Install Rust toolchain | ||
| uses: dtolnay/rust-toolchain@master | ||
| with: | ||
| toolchain: 1.88.0 | ||
| - name: Cache Rust dependencies | ||
| uses: Swatinem/rust-cache@v2 | ||
| - name: Build documentation | ||
| run: cargo doc --no-deps --all-features | ||
| - name: Add index redirect | ||
| run: echo '<meta http-equiv="refresh" content="0; url=tracing_dlt">' > target/doc/index.html | ||
| - name: Upload artifact for GitHub Pages | ||
| if: github.ref == 'refs/heads/main' | ||
| uses: actions/upload-pages-artifact@v3 | ||
| with: | ||
| path: target/doc | ||
| - name: Create docs archive | ||
| if: startsWith(github.ref, 'refs/tags/') | ||
| run: | | ||
| cd target/doc | ||
| tar -czf ../../rustdoc.tar.gz . | ||
| - name: Upload to release | ||
theswiftfox marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| if: startsWith(github.ref, 'refs/tags/') | ||
| uses: softprops/action-gh-release@v1 | ||
| with: | ||
| files: rustdoc.tar.gz | ||
|
|
||
| deploy_pages: | ||
| if: github.ref == 'refs/heads/main' | ||
| needs: build_documentation | ||
| runs-on: ubuntu-latest | ||
| environment: | ||
| name: github-pages | ||
| url: ${{ steps.deployment.outputs.page_url }} | ||
| steps: | ||
| - name: Deploy to GitHub Pages | ||
| id: deployment | ||
| uses: actions/deploy-pages@v4 | ||
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,46 @@ | ||
| # Copyright (c) 2025 The Contributors to Eclipse OpenSOVD (see CONTRIBUTORS) | ||
| # | ||
| # 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: pre-commit | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| env: | ||
| PYTHON_VERSION: 3.13 | ||
| PRE_COMMIT_VERSION: 4.2 | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| pre-commit: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v6 | ||
| with: | ||
| enable-cache: true | ||
| python-version: ${{ env.PYTHON_VERSION }} | ||
| activate-environment: true | ||
| cache-dependency-glob: | | ||
| .github/workflows/pre-commit.yaml | ||
| - name: Run pre-commit | ||
| run: uv tool run pre-commit@${{ env.PRE_COMMIT_VERSION }} run --all-files |
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,5 @@ | ||
| build | ||
| /target | ||
|
|
||
| .idea | ||
| .vscode/settings.json |
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.