File tree Expand file tree Collapse file tree 7 files changed +58
-22
lines changed Expand file tree Collapse file tree 7 files changed +58
-22
lines changed Original file line number Diff line number Diff line change 63
63
- name : Build the container
64
64
run : docker build -t fedoracontainer tss-esapi/tests/ --file tss-esapi/tests/Dockerfile-fedora
65
65
- name : Run the tests
66
- run : docker run -v $(pwd):/tmp/rust-tss-esapi -w /tmp/rust-tss-esapi/tss-esapi fedoracontainer dbus-run-session -- /tmp/rust-tss-esapi/tss-esapi/tests/all-fedora.sh
66
+ run : docker run -v $(pwd):/tmp/rust-tss-esapi -w /tmp/rust-tss-esapi/tss-esapi --env USE_FROZEN_LOCKFILE=1 fedoracontainer dbus-run-session -- /tmp/rust-tss-esapi/tss-esapi/tests/all-fedora.sh
67
67
68
68
tests-fedora-rawhide :
69
69
name : Fedora rawhide tests
96
96
run : docker build -t ubuntucontainer tss-esapi/tests/ --file tss-esapi/tests/Dockerfile-ubuntu
97
97
- name : Check documentation
98
98
run : docker run -v $(pwd):/tmp/rust-tss-esapi -w /tmp/rust-tss-esapi/tss-esapi -e RUSTDOCFLAGS="-Dwarnings" ubuntucontainer cargo doc --document-private-items --no-deps
99
+
100
+ # Check that there are no Clippy lint errors.
101
+ clippy :
102
+ name : Check Clippy lints
103
+ runs-on : ubuntu-latest
104
+ steps :
105
+ - uses : actions/checkout@v2
106
+ - name : Build the container
107
+ run : docker build -t ubuntucontainer tss-esapi/tests/ --file tss-esapi/tests/Dockerfile-ubuntu --target tpm2-tss
108
+ - name : Check Clippy lints MSRV
109
+ run : docker run -v $(pwd):/tmp/rust-tss-esapi -w /tmp/rust-tss-esapi/tss-esapi --env RUST_TOOLCHAIN_VERSION=1.66.0 ubuntucontainer /tmp/rust-tss-esapi/tss-esapi/tests/lint-checks.sh
110
+ - name : Check Clippy lints latest
111
+ run : docker run -v $(pwd):/tmp/rust-tss-esapi -w /tmp/rust-tss-esapi/tss-esapi ubuntucontainer /tmp/rust-tss-esapi/tss-esapi/tests/lint-checks.sh
Original file line number Diff line number Diff line change @@ -10,7 +10,8 @@ At the moment we test (via CI) and support the following Rust compiler versions:
10
10
* On Ubuntu we test with:
11
11
- The latest stable compiler version, as accessible through ` rustup ` .
12
12
- The 1.66 compiler version.
13
- * On Fedora we test with the compiler version included with the Fedora 35 release.
13
+ * On Fedora we test with the compiler version included with the Fedora 36 release.
14
+ * On Fedora rawhide we test with the compiler version included.
14
15
15
16
If you need support for other versions of the compiler, get in touch with us to see what we can do!
16
17
Original file line number Diff line number Diff line change 1
- FROM fedora:35
1
+ FROM fedora:36
2
2
3
3
RUN dnf install -y \
4
4
tpm2-tss-devel tpm2-abrmd tpm2-tools \
Original file line number Diff line number Diff line change 1
- FROM ghcr.io/tpm2-software/ubuntu-18.04:latest
1
+ FROM ghcr.io/tpm2-software/ubuntu-18.04:latest AS base
2
2
3
+ FROM base AS rust-toolchain
4
+ # Install Rust toolchain
5
+ RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
6
+ ENV PATH="/root/.cargo/bin:${PATH}"
7
+
8
+ FROM rust-toolchain AS tpm2-tss
9
+ # Download and install the TSS library
3
10
ARG TPM2_TSS_VERSION=2.4.6
4
11
ENV TPM2_TSS_VERSION=$TPM2_TSS_VERSION
5
12
ENV PKG_CONFIG_PATH /usr/local/lib/pkgconfig
6
-
7
- # Download and install the TSS library
8
13
RUN git clone https://github.com/tpm2-software/tpm2-tss.git --branch $TPM2_TSS_VERSION
9
14
RUN cd tpm2-tss \
10
15
&& ./bootstrap \
@@ -13,13 +18,10 @@ RUN cd tpm2-tss \
13
18
&& make install \
14
19
&& ldconfig
15
20
21
+ FROM tpm2-tss AS tpm2-tools
16
22
# Download and install TPM2 tools
17
23
RUN git clone https://github.com/tpm2-software/tpm2-tools.git --branch 4.1
18
24
RUN cd tpm2-tools \
19
25
&& ./bootstrap \
20
26
&& ./configure --enable-unit \
21
27
&& make install
22
-
23
- # Install Rust toolchain
24
- RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
25
- ENV PATH="/root/.cargo/bin:${PATH}"
Original file line number Diff line number Diff line change 3
3
# Copyright 2019 Contributors to the Parsec project.
4
4
# SPDX-License-Identifier: Apache-2.0
5
5
6
- # This script executes static checks and tests for the tss-esapi crate.
6
+ # This script executes tests for the tss-esapi crate.
7
7
# It can be run inside the container which Dockerfile is in the same folder.
8
8
#
9
9
# Usage: ./tests/all.sh
10
10
11
11
set -euf -o pipefail
12
12
13
+ if [[ ! -z ${USE_FROZEN_LOCKFILE: +x} ]]; then
14
+ # Some versions of Fedora that are used during testing are old
15
+ # so in order to prevent any drift from the versions available
16
+ # in the old versions the frozen Cargo lock is used.
17
+ cp tests/Cargo.lock.frozen ../Cargo.lock
18
+ fi
19
+
13
20
# ###########################
14
21
# Run the TPM SWTPM server #
15
22
# ###########################
@@ -33,11 +40,6 @@ tpm2-abrmd \
33
40
--session \
34
41
--flush-all &
35
42
36
- # #################
37
- # Execute clippy #
38
- # #################
39
- cargo clippy --all-targets --all-features -- -D clippy::all -D clippy::cargo
40
-
41
43
# ##################
42
44
# Build the crate #
43
45
# ##################
Original file line number Diff line number Diff line change 3
3
# Copyright 2019 Contributors to the Parsec project.
4
4
# SPDX-License-Identifier: Apache-2.0
5
5
6
- # This script executes static checks and tests for the tss-esapi crate.
6
+ # This script executes tests for the tss-esapi crate.
7
7
# It can be run inside the container which Dockerfile is in the same folder.
8
8
#
9
9
# Usage: ./tests/all.sh
@@ -36,11 +36,6 @@ tpm_server &
36
36
sleep 5
37
37
tpm2_startup -c -T mssim
38
38
39
- # #################
40
- # Execute clippy #
41
- # #################
42
- cargo clippy --all-targets --all-features -- -D clippy::all -D clippy::cargo
43
-
44
39
# ##################
45
40
# Build the crate #
46
41
# ##################
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ # Copyright 2023 Contributors to the Parsec project.
4
+ # SPDX-License-Identifier: Apache-2.0
5
+
6
+ # This script executes static checks for the tss-esapi crate.
7
+
8
+ set -euf -o pipefail
9
+
10
+ # ################################################
11
+ # Change rust toolchain version
12
+ # ################################################
13
+ if [[ ! -z ${RUST_TOOLCHAIN_VERSION: +x} ]]; then
14
+ rustup override set ${RUST_TOOLCHAIN_VERSION}
15
+ # Use the frozen Cargo lock to prevent any drift from MSRV being upgraded
16
+ # underneath our feet.
17
+ cp tests/Cargo.lock.frozen ../Cargo.lock
18
+ fi
19
+
20
+ # #################
21
+ # Execute clippy #
22
+ # #################
23
+ cargo clippy --all-targets --all-features -- -D clippy::all -D clippy::cargo
You can’t perform that action at this time.
0 commit comments