Skip to content

Commit 0e99677

Browse files
Edge Virtualization Platform v1.43.0
1 parent e6c0db8 commit 0e99677

Some content is hidden

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

85 files changed

+3807
-1624
lines changed

.devcontainer/raspi/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
5858
&& apt-get clean -y\
5959
&& update-alternatives --install /usr/bin/python python /usr/bin/python3 50
6060

61-
RUN echo "deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-${LLVM_VERSION} main" > /etc/apt/sources.list.d/apt.llvm.org.list && \
61+
RUN echo "deb https://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-${LLVM_VERSION} main" > /etc/apt/sources.list.d/apt.llvm.org.list && \
6262
curl -sL https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc && \
6363
apt-get update && apt-get install -y --no-install-recommends \
6464
clang-format-${LLVM_VERSION} \

.devcontainer/ubuntu/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
6262
# Remove this once stdeb is fully released for ubuntu:24.04 (python3.12)
6363
RUN pip3 install git+https://github.com/astraw/stdeb.git --break-system-packages
6464

65-
RUN echo "deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-${LLVM_VERSION} main" > /etc/apt/sources.list.d/apt.llvm.org.list && \
65+
RUN echo "deb https://apt.llvm.org/noble/ llvm-toolchain-noble-${LLVM_VERSION} main" > /etc/apt/sources.list.d/apt.llvm.org.list && \
6666
curl -sL https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc && \
6767
apt-get update && apt-get install -y --no-install-recommends \
6868
clang-format-${LLVM_VERSION} \

.github/CODEOWNERS

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# SPDX-FileCopyrightText: 2023-2024 Sony Semiconductor Solutions Corporation
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
# The sole reason of this file is to make github assign reviews to
6+
# all team members explicitly.
7+
# Every member in https://github.com/orgs/midokura/teams/device/members
8+
# is responsible for review of any PRs in this repo.
9+
# The each members are intentionally listed here instead of @midokura/device
10+
# team because we want to assign reviews to individuals, not the team.
11+
#
12+
# https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-code-owners
13+
14+
* @midokura/device
15+
16+
# We need to ensure documentation is validated at PR time.
17+
# The validation must be done before merging to ensure we can do a release and
18+
# generate the documentation artifacts safely
19+
*.md @jimken-mido @midokura/device
20+
*.rst @jimken-mido @midokura/device

.github/pull_request_template.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!--
2+
SPDX-FileCopyrightText: 2023-2024 Sony Semiconductor Solutions Corporation
3+
4+
SPDX-License-Identifier: Apache-2.0
5+
-->
6+
7+
<!-- Start badge -->
8+
<!-- End badge -->
9+
10+
## What?
11+
12+
Include an explanation of what are the changes about.
13+
14+
## Why?
15+
16+
Include an explanation of why we need the changes.

.github/workflows/build.yml

Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
# SPDX-FileCopyrightText: 2023-2024 Sony Semiconductor Solutions Corporation
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
on:
6+
workflow_call:
7+
inputs:
8+
builder-tag:
9+
description: The builder tag to be used
10+
default: latest
11+
required: false
12+
type: string
13+
package-namespace:
14+
description: The package namespace for docker images
15+
default: ${{ github.repository }}
16+
required: false
17+
type: string
18+
ref:
19+
type: string
20+
required: true
21+
22+
jobs:
23+
build-agent:
24+
name: Agent (${{ matrix.name }}, ${{ matrix.platform }})
25+
runs-on: ${{ matrix.runner }}
26+
container:
27+
image: ghcr.io/${{ inputs.package-namespace }}/builder-${{ matrix.name }}:${{ inputs.builder-tag }}
28+
credentials:
29+
username: ${{ github.actor }}
30+
password: ${{ github.token }}
31+
options: ${{ startsWith(matrix.runner, 'buildjet') && '--user 1000:1001' || '--user 1001:127' }}
32+
timeout-minutes: 8 # the worst case is 3 minutes
33+
strategy:
34+
fail-fast: false
35+
matrix:
36+
include:
37+
- name: raspios-bookworm
38+
runner: ${{ github.event.repository.private && 'buildjet-4vcpu-ubuntu-2204-arm' || 'ubuntu-24.04-arm' }}
39+
platform: arm64
40+
- name: ubuntu-noble
41+
runner: ${{ github.event.repository.private && 'buildjet-4vcpu-ubuntu-2204-arm' || 'ubuntu-24.04-arm' }}
42+
platform: arm64
43+
- name: ubuntu-noble
44+
runner: ${{ github.event.repository.private && 'buildjet-4vcpu-ubuntu-2204' || 'ubuntu-24.04' }}
45+
platform: amd64
46+
steps:
47+
- name: Checkout source
48+
uses: actions/checkout@v4
49+
with:
50+
ref: ${{ inputs.ref }}
51+
52+
- name: Build
53+
run: bear -- make -j$((`nproc` * 2)) CFLAGS="-g -Werror"
54+
55+
- name: Generate SBOM
56+
run: |
57+
./scripts/sources bin/evp_agent > sources.lst
58+
./scripts/mk-sbom -d -c `dpkg -l libc6 | awk '/libc6/ {print $3}'` sources.lst
59+
60+
- name: Agent Debian Package
61+
run: make dist
62+
63+
- name: Upload agent debian package
64+
uses: actions/upload-artifact@v4
65+
with:
66+
name: agent-deb-${{ matrix.name }}-${{ matrix.platform }}-${{ github.run_id }}
67+
path: evp-agent*.deb
68+
69+
- name: Upload sdk debian package
70+
uses: actions/upload-artifact@v4
71+
with:
72+
name: libevp-app-sdk-dev-${{ matrix.name }}-${{ matrix.platform }}-${{ github.run_id }}
73+
path: libevp-app-sdk-dev*.deb
74+
75+
- name: Upload SBOM
76+
uses: actions/upload-artifact@v4
77+
with:
78+
name: sbom-agent-${{ matrix.name }}-${{ matrix.platform }}-${{ github.run_id }}
79+
path: |
80+
compile_commands.json
81+
sources.lst
82+
sbom.tsv
83+
sbom-files.txt
84+
sbom-tmp.txt
85+
86+
build-sdk:
87+
name: SDK (${{ matrix.name }}, ${{ matrix.platform }})
88+
runs-on: ${{ matrix.runner }}
89+
container:
90+
image: ghcr.io/${{ inputs.package-namespace }}/builder-${{ matrix.name }}:${{ inputs.builder-tag }}
91+
credentials:
92+
username: ${{ github.actor }}
93+
password: ${{ github.token }}
94+
options: ${{ startsWith(matrix.runner, 'buildjet') && '--user 1000:1001' || '--user 1001:127' }}
95+
timeout-minutes: 8 # the worst case is 3 minutes
96+
strategy:
97+
fail-fast: false
98+
matrix:
99+
include:
100+
- name: raspios-bookworm
101+
runner: ${{ github.event.repository.private && 'buildjet-4vcpu-ubuntu-2204-arm' || 'ubuntu-24.04-arm' }}
102+
platform: arm64
103+
- name: ubuntu-noble
104+
runner: ${{ github.event.repository.private && 'buildjet-4vcpu-ubuntu-2204-arm' || 'ubuntu-24.04-arm' }}
105+
platform: arm64
106+
- name: ubuntu-noble
107+
runner: ${{ github.event.repository.private && 'buildjet-4vcpu-ubuntu-2204' || 'ubuntu-24.04' }}
108+
platform: amd64
109+
110+
steps:
111+
- name: Checkout source
112+
uses: actions/checkout@v4
113+
with:
114+
ref: ${{ inputs.ref }}
115+
116+
- name: Build SDK
117+
run: make -j$((`nproc` * 2)) sdk \
118+
CFLAGS="-O2 -Werror" \
119+
KBUILD_DEFCONFIG=configs/linux-docker.config
120+
121+
- name: Install python test dependencies
122+
working-directory: src/python-evp-app-sdk
123+
run: |
124+
python3 -m venv .venv
125+
. .venv/bin/activate
126+
pip install \
127+
-e . \
128+
-r requirements.test.txt
129+
130+
- name: Run python SDK tests
131+
working-directory: src/python-evp-app-sdk
132+
run: |
133+
. .venv/bin/activate
134+
python -m pytest \
135+
--cov=evp.app \
136+
--cov-report="xml:pysdk-cov.xml" \
137+
--junit-xml="pysdk-test-res.xml" \
138+
-v
139+
140+
- name: Publish pytest coverage
141+
id: pysdk-cov
142+
uses: MishaKav/pytest-coverage-comment@main
143+
if: always()
144+
with:
145+
title: EVP Python Application SDK coverage report
146+
badge-title: Python Application SDK
147+
coverage-path-prefix: src/python-evp-app-sdk/evp/app/
148+
pytest-xml-coverage-path: src/python-evp-app-sdk/pysdk-cov.xml
149+
junitxml-path: src/python-evp-app-sdk/pysdk-test-res.xml
150+
junitxml-title: Python Application SDK test report
151+
152+
- name: Publish pytest results to summary
153+
if: steps.pysdk-cov.outputs.summaryReport
154+
run: echo ${{ steps.pysdk-cov.outputs.summaryReport }} >> $GITHUB_STEP_SUMMARY
155+
156+
- name: Build Python package
157+
working-directory: src/python-evp-app-sdk
158+
run: python3 -m build
159+
160+
- name: SDK Debian package
161+
working-directory: src/python-evp-app-sdk
162+
run: python setup.py --command-packages=stdeb.command bdist_deb
163+
164+
- uses: actions/upload-artifact@v4
165+
with:
166+
name: python-sdk-${{ matrix.name }}-${{ matrix.platform }}-${{ github.run_id }}
167+
path: src/python-evp-app-sdk/dist/*
168+
169+
- uses: actions/upload-artifact@v4
170+
with:
171+
name: python-sdk-deb-${{ matrix.name }}-${{ matrix.platform }}-${{ github.run_id }}
172+
path: src/python-evp-app-sdk/deb_dist/*.deb
173+
174+
run-static-analysis:
175+
name: Static Code Analysis
176+
runs-on: ubuntu-24.04
177+
container:
178+
image: ghcr.io/${{ inputs.package-namespace }}/builder-ubuntu-noble:${{ inputs.builder-tag }}
179+
options: --user 1001:127
180+
timeout-minutes: 8 # the worst case is 3 minutes
181+
182+
steps:
183+
- name: Checkout source
184+
uses: actions/checkout@v4
185+
with:
186+
ref: ${{ inputs.ref }}
187+
188+
- name: Run cppcheck analysis
189+
run: make -j$((`nproc` * 2)) CFLAGS="-Werror" TOOL=cppcheck analysis

0 commit comments

Comments
 (0)