Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .devcontainer/Dockerfile
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"]
30 changes: 30 additions & 0 deletions .devcontainer/devcontainer.json
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"
}
5 changes: 5 additions & 0 deletions .github/CODEOWNERS
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
47 changes: 47 additions & 0 deletions .github/actions/setup-dlt/action.yml
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
88 changes: 88 additions & 0 deletions .github/workflows/build.yml
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
74 changes: 74 additions & 0 deletions .github/workflows/generate_documentation.yml
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
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
46 changes: 46 additions & 0 deletions .github/workflows/pre-commit.yaml
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
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
build
/target

.idea
.vscode/settings.json
Loading
Loading