diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..30d8b67d --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +/target +Cargo.lock +.vscode +*/Cargo.lock +*/target diff --git a/ci.sh b/ci.sh new file mode 100755 index 00000000..bacf919e --- /dev/null +++ b/ci.sh @@ -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 diff --git a/tests/docker_image/parsec-provider-test.Dockerfile b/tests/docker_image/parsec-provider-test.Dockerfile new file mode 100644 index 00000000..e40c3d7e --- /dev/null +++ b/tests/docker_image/parsec-provider-test.Dockerfile @@ -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 "some@email.com" +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"