Skip to content

Commit b306ff8

Browse files
authored
Merge pull request #644 from hyperfinitism/feature/containerise-local-ci
refactor(ci): containerize run-ci-locally.sh
2 parents e5b2295 + 933603a commit b306ff8

3 files changed

Lines changed: 286 additions & 196 deletions

File tree

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Copyright 2026 Contributors to the Parsec project.
2+
# SPDX-License-Identifier: Apache-2.0
3+
#
4+
# Self-contained Fedora image for run-ci-locally.sh.
5+
# Includes everything every CI job needs.
6+
7+
FROM fedora:42
8+
9+
RUN dnf install -y \
10+
libtool automake autoconf autoconf-archive openssl-devel-engine \
11+
swtpm swtpm-tools llvm llvm-devel clang pkg-config \
12+
git valgrind codespell tpm2-tools rsync \
13+
&& dnf builddep -y tpm2-tss \
14+
&& dnf clean all
15+
16+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
17+
| bash -s -- -y --default-toolchain stable --profile minimal \
18+
--component rustfmt --component clippy
19+
ENV PATH="/root/.cargo/bin:${PATH}"
20+
21+
RUN rustup toolchain install 1.85.0 --profile minimal \
22+
--component rustfmt --component clippy
23+
24+
RUN cargo install cargo-valgrind
25+
26+
# Download and install the TSS library
27+
ENV TPM2_TSS_BINDINGS_VERSION=4.1.3
28+
ARG TPM2_TSS_VERSION=$TPM2_TSS_BINDINGS_VERSION
29+
ENV TPM2_TSS_VERSION=$TPM2_TSS_VERSION
30+
ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
31+
32+
RUN git clone https://github.com/tpm2-software/tpm2-tss.git --branch $TPM2_TSS_VERSION
33+
RUN cd tpm2-tss \
34+
&& ./bootstrap \
35+
&& ./configure \
36+
&& make -j$(nproc) \
37+
&& make install \
38+
&& ldconfig \
39+
&& rm -rf /tpm2-tss
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Copyright 2026 Contributors to the Parsec project.
2+
# SPDX-License-Identifier: Apache-2.0
3+
#
4+
# Self-contained Ubuntu image for run-ci-locally.sh.
5+
# Includes everything every CI job needs.
6+
7+
FROM ubuntu:22.04
8+
9+
RUN apt-get update && apt-get install -y \
10+
autoconf autoconf-archive automake build-essential doxygen pkg-config \
11+
libtool libcmocka0 libcmocka-dev libcurl4-openssl-dev libftdi-dev libini-config-dev \
12+
libjson-c-dev libltdl-dev libssl-dev libusb-1.0-0-dev uthash-dev uuid-dev \
13+
swtpm swtpm-tools llvm clang pkg-config \
14+
curl git valgrind codespell tpm2-tools rsync \
15+
&& rm -rf /var/lib/apt/lists/*
16+
17+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
18+
| bash -s -- -y --default-toolchain stable --profile minimal \
19+
--component rustfmt --component clippy
20+
ENV PATH="/root/.cargo/bin:${PATH}"
21+
22+
RUN rustup toolchain install 1.85.0 --profile minimal \
23+
--component rustfmt --component clippy
24+
25+
RUN cargo install cargo-valgrind
26+
27+
# Download and install the TSS library
28+
ENV TPM2_TSS_BINDINGS_VERSION=4.1.3
29+
ARG TPM2_TSS_VERSION=$TPM2_TSS_BINDINGS_VERSION
30+
ENV TPM2_TSS_VERSION=$TPM2_TSS_VERSION
31+
ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
32+
33+
RUN git clone https://github.com/tpm2-software/tpm2-tss.git --branch $TPM2_TSS_VERSION
34+
RUN cd tpm2-tss \
35+
&& ./bootstrap \
36+
&& ./configure \
37+
&& make -j$(nproc) \
38+
&& make install \
39+
&& ldconfig \
40+
&& rm -rf /tpm2-tss

0 commit comments

Comments
 (0)