mirror of
https://git.code.sf.net/p/linux-ima/ima-evm-utils
synced 2025-07-01 05:11:13 +02:00
CI: Do not install swtpm if it cannot work anyway
Do not need to waste CPU cycles and time to install swtpm in CI container if distribution does not have tssstartup, because we will be not able to start it. Signed-off-by: Vitaly Chikunov <vt@altlinux.org> Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
This commit is contained in:

committed by
Mimi Zohar

parent
fd40ff5dd5
commit
a7dd075ef7
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
@ -112,7 +112,13 @@ jobs:
|
||||
ARCH="$ARCH" CC="$CC" TSS="$TSS" ./ci/$INSTALL.sh
|
||||
|
||||
- name: Build swtpm
|
||||
run: if [ ! "$VARIANT" ]; then which tpm_server || which swtpm || ./tests/install-swtpm.sh; fi
|
||||
run: |
|
||||
if [ ! "$VARIANT" ]; then
|
||||
which tpm_server || which swtpm || \
|
||||
if which tssstartup; then
|
||||
./tests/install-swtpm.sh;
|
||||
fi
|
||||
fi
|
||||
|
||||
- name: Compiler version
|
||||
run: $CC --version
|
||||
|
@ -93,4 +93,4 @@ before_install:
|
||||
script:
|
||||
- INSTALL="${DISTRO%%:*}"
|
||||
- INSTALL="${INSTALL%%/*}"
|
||||
- $CONTAINER run $CONTAINER_ARGS -t ima-evm-utils /bin/sh -c "if [ \"$VARIANT\" ]; then ARCH=\"$ARCH\" ./ci/$INSTALL.$VARIANT.sh; fi && ARCH=\"$ARCH\" CC=\"$CC\" TSS=\"$TSS\" ./ci/$INSTALL.sh && if [ ! \"$VARIANT\" ]; then which tpm_server || which swtpm || ./tests/install-swtpm.sh; fi && CC=\"$CC\" VARIANT=\"$VARIANT\" ./build.sh"
|
||||
- $CONTAINER run $CONTAINER_ARGS -t ima-evm-utils /bin/sh -c "if [ \"$VARIANT\" ]; then ARCH=\"$ARCH\" ./ci/$INSTALL.$VARIANT.sh; fi && ARCH=\"$ARCH\" CC=\"$CC\" TSS=\"$TSS\" ./ci/$INSTALL.sh && if [ ! \"$VARIANT\" ]; then which tpm_server || which swtpm || if which tssstartup; then ./tests/install-swtpm.sh; fi; fi && CC=\"$CC\" VARIANT=\"$VARIANT\" ./build.sh"
|
||||
|
Reference in New Issue
Block a user