-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
280 additions
and
93 deletions.
There are no files selected for viewing
This file contains 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,37 @@ | ||
# /******************************************************************************** | ||
# * Copyright (c) 2024 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 2.0 which is available at | ||
# * http://www.apache.org/licenses/LICENSE-2.0 | ||
# * | ||
# * SPDX-License-Identifier: Apache-2.0 | ||
# ********************************************************************************/ | ||
|
||
FROM mcr.microsoft.com/devcontainers/rust:1-1-bookworm | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
ENV CROSS_CONTAINER_IN_CONTAINER=true | ||
ENV TZ=Europe/Berlin | ||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||
RUN apt-get update -y | ||
RUN apt install software-properties-common build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev curl git libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev -y | ||
|
||
USER vscode | ||
RUN cargo install cross cargo-license cargo-cyclonedx | ||
|
||
# Installing pyEnv to set up specific version of Python | ||
ENV HOME=/home/vscode | ||
WORKDIR ${HOME} | ||
RUN git clone --depth=1 https://github.com/pyenv/pyenv.git .pyenv | ||
ENV PYENV_ROOT="${HOME}/.pyenv" | ||
ENV PATH="${PYENV_ROOT}/shims:${PYENV_ROOT}/bin:${PATH}" | ||
ENV PYTHON_VERSION=3.12 | ||
RUN pyenv install ${PYTHON_VERSION} | ||
RUN pyenv global ${PYTHON_VERSION} | ||
|
||
# Fails due to gpg keyserver not accessible via corporate proxy | ||
# Moved to postStartCommand.sh for DevContainer | ||
# RUN pip install "git+https://github.com/eclipse-kuksa/kuksa-common.git@v1#subdirectory=sbom-tools" |
This file contains 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,19 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/rust | ||
{ | ||
"name": "Kuksa DevContainer", | ||
"build": { | ||
"dockerfile": "Dockerfile" | ||
}, | ||
"features": { | ||
"ghcr.io/devcontainers/features/docker-in-docker:2": {} | ||
}, | ||
"postStartCommand": "bash .devcontainer/postStartCommand.sh", | ||
"mounts": [ | ||
{ | ||
"target": "/var/run/docker.sock", | ||
"source": "/var/run/docker.sock", | ||
"type": "bind" | ||
} | ||
] | ||
} |
This file contains 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,14 @@ | ||
#!/bin/bash | ||
# | ||
# Copyright (c) 2024 Contributors to the Eclipse Foundation | ||
# | ||
# Building all currently supported targets for databroker-cli. | ||
# Uses cross for cross-compiling. Needs to be executed | ||
# before docker build, as docker collects the artifacts | ||
# created by this script | ||
# this needs the have cross, cargo-license and kuksa sbom helper | ||
# installed | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
pip install "git+https://github.com/eclipse-kuksa/kuksa-common.git@v1#subdirectory=sbom-tools" |
This file contains 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 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 |
---|---|---|
|
@@ -130,6 +130,12 @@ jobs: | |
with: | ||
files: lcov.info | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
- uses: taiki-e/[email protected] | ||
with: | ||
tool: [email protected] | ||
- name: "Check each feature" | ||
working-directory: ${{github.workspace}} | ||
run: cargo hack check --each-feature | ||
|
||
build: | ||
name: Build | ||
|
This file contains 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 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 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 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 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.