Skip to content

Commit 40e59fb

Browse files
committed
Test: Add basic ci script and test files
This patch only adds rudimentary files for the CI and test setup. A comprehensive PR with detailed setup will be added later. Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
1 parent 432a68d commit 40e59fb

File tree

3 files changed

+48
-0
lines changed

3 files changed

+48
-0
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/target
2+
Cargo.lock
3+
.vscode
4+
*/Cargo.lock
5+
*/target

ci.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright 2023 Contributors to the Parsec project.
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
set -ex
7+
8+
openssl version
9+
openssl list -providers -provider-path ./target/debug/ -provider libparsec_openssl_provider_shared
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Copyright 2023 Contributors to the Parsec project.
2+
# SPDX-License-Identifier: Apache-2.0
3+
FROM ubuntu:22.04
4+
5+
RUN apt-get update && apt-get -y upgrade
6+
RUN apt install -y autoconf-archive libcmocka0 libcmocka-dev procps
7+
RUN apt install -y iproute2 build-essential git pkg-config gcc libtool automake libssl-dev uthash-dev doxygen libjson-c-dev
8+
RUN apt install -y --fix-missing wget python3 cmake clang
9+
RUN apt install -y libini-config-dev libcurl4-openssl-dev curl libgcc1
10+
RUN apt install -y python3-distutils libclang-11-dev protobuf-compiler python3-pip
11+
RUN apt install -y libgcrypt20-dev uuid-dev
12+
RUN apt install -y libssl-dev git gcc openssl
13+
14+
# Setup git config
15+
RUN git config --global user.email "some@email.com"
16+
RUN git config --global user.name "Parsec Team"
17+
18+
WORKDIR /tmp
19+
20+
# Install Rust toolchain for all users
21+
# This way of installing allows all users to call the same binaries, but non-root
22+
# users cannot modify the toolchains or install new ones.
23+
# See: https://github.com/rust-lang/rustup/issues/1085
24+
ENV RUSTUP_HOME /opt/rust
25+
ENV CARGO_HOME /opt/rust
26+
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --no-modify-path
27+
ENV PATH="/root/.cargo/bin:/opt/rust/bin:${PATH}"
28+
29+
# Install the wrappers for the Rust binaries installed earlier
30+
COPY _exec_wrapper /usr/local/bin/
31+
RUN ls /opt/rust/bin | xargs -n1 -I% ln -s /usr/local/bin/_exec_wrapper /usr/local/bin/$(basename %)
32+
33+
# For running tests Parsec is configured with the socket in /tmp/
34+
ENV PARSEC_SERVICE_ENDPOINT="unix:/tmp/parsec.sock"

0 commit comments

Comments
 (0)