Skip to content

Commit

Permalink
Add initial CI/test files
Browse files Browse the repository at this point in the history
This commit adds the dockerfile and a basic test script. The tests
and full CI setup will be added as part of another ticket.

Signed-off-by: Gowtham Suresh Kumar <[email protected]>
  • Loading branch information
gowthamsk-arm committed Jan 16, 2024
1 parent 2aec6a4 commit 8bb0be2
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/target
Cargo.lock
.vscode
*/Cargo.lock
*/target
9 changes: 9 additions & 0 deletions ci.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

# Copyright 2023 Contributors to the Parsec project.
# SPDX-License-Identifier: Apache-2.0

set -ex

openssl version
openssl list -providers -provider-path ./parsec-openssl-provider-shared/target/debug/ -provider libparsec_openssl_provider_shared
34 changes: 34 additions & 0 deletions tests/docker_image/parsec-provider-test.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright 2023 Contributors to the Parsec project.
# SPDX-License-Identifier: Apache-2.0
FROM ubuntu:22.04

RUN apt-get update && apt-get -y upgrade
RUN apt install -y autoconf-archive libcmocka0 libcmocka-dev procps
RUN apt install -y iproute2 build-essential git pkg-config gcc libtool automake libssl-dev uthash-dev doxygen libjson-c-dev
RUN apt install -y --fix-missing wget python3 cmake clang
RUN apt install -y libini-config-dev libcurl4-openssl-dev curl libgcc1
RUN apt install -y python3-distutils libclang-11-dev protobuf-compiler python3-pip
RUN apt install -y libgcrypt20-dev uuid-dev
RUN apt install -y libssl-dev git gcc openssl

# Setup git config
RUN git config --global user.email "[email protected]"
RUN git config --global user.name "Parsec Team"

WORKDIR /tmp

# Install Rust toolchain for all users
# This way of installing allows all users to call the same binaries, but non-root
# users cannot modify the toolchains or install new ones.
# See: https://github.com/rust-lang/rustup/issues/1085
ENV RUSTUP_HOME /opt/rust
ENV CARGO_HOME /opt/rust
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --no-modify-path
ENV PATH="/root/.cargo/bin:/opt/rust/bin:${PATH}"

# Install the wrappers for the Rust binaries installed earlier
#COPY _exec_wrapper /usr/local/bin/
RUN ls /opt/rust/bin | xargs -n1 -I% ln -s /usr/local/bin/_exec_wrapper /usr/local/bin/$(basename %)

# For running tests Parsec is configured with the socket in /tmp/
ENV PARSEC_SERVICE_ENDPOINT="unix:/tmp/parsec.sock"

0 comments on commit 8bb0be2

Please sign in to comment.