Switch to bookworm test.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2026-07-14 12:06:47 +02:00
parent 121d426439
commit 0b1594c5a7
6 changed files with 55 additions and 61 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ jobs:
- name: Export image
run: |
mkdir -p artifacts
docker save pico-hsm-test:bullseye -o artifacts/docker-image.tar
docker save pico-hsm-test:bookworm -o artifacts/docker-image.tar
- name: Temporarily save image
uses: actions/upload-artifact@v4
with:
+1 -3
View File
@@ -45,6 +45,7 @@ else()
endif()
set(USB_ITF_CCID 1)
set(USB_ITF_WCID 1)
set(ENABLE_LIBCVC 1)
include(pico-keys-sdk/picokeys_sdk_import.cmake)
if(NOT ESP_PLATFORM)
set(SOURCES ${PICOKEYS_SOURCES})
@@ -137,9 +138,6 @@ if(NOT ESP_PLATFORM)
)
endif(APPLE)
set(PICO_HSM_EMU_LIBS picokeys_sdk pthread m)
if(NOT SKIP_MBEDTLS_FOR_OPENSSL_EMULATION)
list(APPEND PICO_HSM_EMU_LIBS mbedtls)
endif()
target_link_libraries(pico_hsm PRIVATE ${PICO_HSM_EMU_LIBS})
else()
pico_add_extra_outputs(${CMAKE_PROJECT_NAME})
-54
View File
@@ -1,54 +0,0 @@
FROM debian:bullseye
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y \
build-essential \
git \
cmake \
gcc-arm-none-eabi \
libnewlib-arm-none-eabi \
libstdc++-arm-none-eabi-newlib \
python3 \
python3-pip
RUN useradd -m builduser
USER builduser
WORKDIR /home/builduser
VOLUME /home/builduser/release
ARG VERSION_PICO_SDK 2.0.0
RUN mkdir -p /home/builduser/Devel/pico
RUN cd /home/builduser/Devel/pico \
&& git clone https://github.com/raspberrypi/pico-sdk.git \
&& cd pico-sdk \
&& git checkout $VERSION_PICO_SDK \
&& git submodule update --init --recursive
RUN pip install cryptography
ARG VERSION_MAJOR 4
ARG VERSION_MINOR 2
RUN cd /home/builduser \
&& git clone https://github.com/polhenarejos/pico-hsm.git \
&& cd pico-hsm \
&& git checkout v${VERSION_MAJOR}.${VERSION_MINOR} \
&& git submodule update --init --recursive \
&& mkdir build_release
ENV PICO_SDK_PATH /home/builduser/Devel/pico/pico-sdk
ARG USB_VID 0xfeff
ARG USB_PID 0xfcfd
ARG PICO_BOARD waveshare_rp2040_zero
RUN cd /home/builduser/pico-hsm \
&& cd build_release \
&& cmake .. -DPICO_BOARD=$PICO_BOARD -DUSB_VID=${USB_VID} -DUSB_PID=${USB_PID} \
&& make -kj20
+2 -2
View File
@@ -6,9 +6,9 @@ build_image
run_in_docker mkdir -p build_in_docker
run_in_docker -w "$PWD/build_in_docker" cmake -DENABLE_EMULATION=1 -D__FOR_CI=1 -DENABLE_EDDSA=1 ..
run_in_docker -w "$PWD/build_in_docker" make -j ${NUM_PROC}
docker create --name temp_container pico-hsm-test:bullseye
docker create --name temp_container pico-hsm-test:bookworm
docker cp $PWD/build_in_docker/pico_hsm temp_container:/pico_hsm
docker commit temp_container pico-hsm-test:bullseye
docker commit temp_container pico-hsm-test:bookworm
docker stop temp_container
docker rm temp_container
docker image prune -f
+50
View File
@@ -0,0 +1,50 @@
FROM debian:bookworm
ARG DEBIAN_FRONTEND=noninteractive
RUN apt update && apt upgrade -y
RUN apt install -y apt-utils
RUN apt autoremove -y
RUN rm -rf /var/cache/apt/archives/*
RUN apt install -y libccid \
libpcsclite-dev \
git \
autoconf \
pkg-config \
libtool \
help2man \
automake \
gcc \
make \
build-essential \
python3 \
python3-pip \
swig \
libssl-dev \
cmake \
libtss2-dev \
tpm2-tools \
swtpm \
vsmartcard-vpcd \
&& rm -rf /var/lib/apt/lists/*
RUN pip install --break-system-packages pytest pycvc cryptography base58
WORKDIR /
RUN git clone https://github.com/OpenSC/OpenSC
WORKDIR /OpenSC
RUN git checkout tags/0.26.1
RUN ./bootstrap
RUN ./configure --enable-openssl
RUN make -j `nproc`
RUN make install
RUN make clean
RUN ldconfig
WORKDIR /
RUN git clone https://github.com/CardContact/sc-hsm-embedded
WORKDIR /sc-hsm-embedded
RUN autoreconf -fi
RUN ./configure
RUN make -j `nproc`
RUN make install
RUN cp ./src/tests/sc-hsm-pkcs11-test /usr/local/bin/sc-hsm-pkcs11-test
RUN make clean
WORKDIR /
+1 -1
View File
@@ -46,7 +46,7 @@
# default values, can be overridden by the environment
: ${MBEDTLS_DOCKER_GUEST:=bullseye}
: ${MBEDTLS_DOCKER_GUEST:=bookworm}
DOCKER_IMAGE_TAG="pico-hsm-test:${MBEDTLS_DOCKER_GUEST}"