File tree Expand file tree Collapse file tree 3 files changed +25
-4
lines changed Expand file tree Collapse file tree 3 files changed +25
-4
lines changed Original file line number Diff line number Diff line change 23
23
- name : Run the container
24
24
run : docker run -v $(pwd):/tmp/rust-tss-esapi -w /tmp/rust-tss-esapi/tss-esapi ubuntucontainer /tmp/rust-tss-esapi/tss-esapi/tests/all-ubuntu.sh
25
25
26
+ tests-ubuntu-v3 :
27
+ name : Ubuntu tests on v3.x.y of tpm2-tss
28
+ runs-on : ubuntu-latest
29
+ steps :
30
+ - uses : actions/checkout@v2
31
+ - name : Build the container
32
+ run : docker build -t ubuntucontainer tss-esapi/tests/ --build-arg TPM2_TSS_VERSION=3.0.4 --file tss-esapi/tests/Dockerfile-ubuntu
33
+ - name : Run the container
34
+ run : docker run -v $(pwd):/tmp/rust-tss-esapi -w /tmp/rust-tss-esapi/tss-esapi ubuntucontainer /tmp/rust-tss-esapi/tss-esapi/tests/all-ubuntu.sh
35
+
26
36
tests-fedora :
27
37
name : Fedora tests
28
38
# We just build a container... GitHub doesn't like Fedora :(
Original file line number Diff line number Diff line change 1
1
FROM ghcr.io/tpm2-software/ubuntu-18.04:latest
2
2
3
+ ARG TPM2_TSS_VERSION=2.3.3
4
+ ENV TPM2_TSS_VERSION=$TPM2_TSS_VERSION
3
5
ENV PKG_CONFIG_PATH /usr/local/lib/pkgconfig
4
6
5
- # Download and install TSS 2.0
6
- RUN git clone https://github.com/tpm2-software/tpm2-tss.git --branch 2.3.3
7
+ # Download and install the TSS library
8
+ RUN git clone https://github.com/tpm2-software/tpm2-tss.git --branch $TPM2_TSS_VERSION
7
9
RUN cd tpm2-tss \
8
10
&& ./bootstrap \
9
11
&& ./configure \
Original file line number Diff line number Diff line change 10
10
11
11
set -euf -o pipefail
12
12
13
+ # ################################################
14
+ # Generate bindings for non-"standard" versions #
15
+ # ################################################
16
+ if [[ " $TPM2_TSS_VERSION " != " 2.3.3" ]]; then
17
+ FEATURES=" --features=generate-bindings"
18
+ else
19
+ FEATURES=" "
20
+ fi
21
+
13
22
# ################################
14
23
# Run the TPM simulation server #
15
24
# ################################
@@ -25,9 +34,9 @@ cargo clippy --all-targets --all-features -- -D clippy::all -D clippy::cargo
25
34
# ##################
26
35
# Build the crate #
27
36
# ##################
28
- RUST_BACKTRACE=1 cargo build
37
+ RUST_BACKTRACE=1 cargo build $FEATURES
29
38
30
39
# ################
31
40
# Run the tests #
32
41
# ################
33
- TEST_TCTI=mssim: RUST_BACKTRACE=1 RUST_LOG=info cargo test -- --test-threads=1 --nocapture
42
+ TEST_TCTI=mssim: RUST_BACKTRACE=1 RUST_LOG=info cargo test $FEATURES -- --test-threads=1 --nocapture
You can’t perform that action at this time.
0 commit comments