stefanberger / swtpm

Libtpms-based TPM emulator with socket, character device, and Linux CUSE interface.
Other
564 stars 136 forks source link

Adding dockerfile and ci/cd #875

Closed glimchb closed 1 month ago

glimchb commented 1 month ago

Fixes #869

glimchb commented 1 month ago

@stefanberger can you merge this , please ? Travis CI passed

stefanberger commented 1 month ago

Thanks!

stefanberger commented 1 week ago

I had to fix the Dockerfile for github ci/cd since it started to fail due to an update of libtpms adding a new API call that then wasn't available to swtpm because the libtpms build didn't happen and the old version of libtpms was used: PR #898
There were lots of broken github builds for the build action lately. I wouldn't mind it skipping the libtpms build for as long as it hasn't been updated but when an update happens it should build again. I suppose there's no way of doing this easily...

glimchb commented 1 week ago

@stefanberger one way to do it easily is add libtpms as a git submodule of swtpm

cd swtpm
git submodule add ../libtpms

in this way every time to checkout swtpm it will bring correct libtpms with it

so docker build and all other builds, will just do normal checkout of swtpm and don;t need to worry about libtpm

every time you need to bump the libtpm, you just checkout and commit as usual...

WDYT ?

another option - I exposed LIBTPMS_BRANCH argument, so we can just pass specific commit/tag instead of master...

another option - add no-cache: true option in the workflow https://github.com/stefanberger/swtpm/blob/607eb54b3e52a8c6fd90676f12e62ec6f8320f61/.github/workflows/docker.yaml#L76