-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build and push kbs-client binary #349
Build and push kbs-client binary #349
Conversation
Hard-code --features to sample_only for now, because it covers current use cases without overcomplicating the link. Signed-off-by: Chris Porter <porter@ibm.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this! Only a little question.
c72e505
to
91434a6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. One question
build_and_push: | ||
env: | ||
RUSTC_VERSION: 1.76.0 | ||
runs-on: ubuntu-22.04 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @portersrc ! I don't remember the last time I built static executables on Ubuntu, so wondering if you need to install the static libc package. On my fedora 39 laptop I had to install glibc-static to test this static build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think I checked this; great question; will check it now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can confirm that gcc -static
works on a simple test. Also 22.04 package list includes libc6-dev, and the (debian) file list for libc6-dev includes libc.a, etc. (So I think we're OK?)
The easier thing is to just verify that this workflow succeeds before merging, but I don't see this workflow getting kicked... Do you know how/why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @portersrc !
Cool!
The workflow didn't get kicked because it is configure to run on push
. One way to test it is to add the pull_request
to the list of triggering events. Then you will need to skip the execution of Log in to ghcr.io
and Push to ghcr.io
steps based on the event type (because these steps will fail on pull_request
).
See .github/workflows/kbs-e2e-az-tdx-vtpm.yaml
as an example of workflow that run for two events and skip steps conditionally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the pointers! I looked at the yaml file, but to test at least part of this PR, I did something cruder: I changed to on: pull_request
and commented out the ghcr login and push. This at least checks that make cli-static-x86_64-linux
completes on the runner. It built fine (GHA result here). I changed it back to on: push
, as intended for this PR. But I guess we need it to merge in order to verify the oras step works (though I tested with a personal repo, and it looks OK).
91434a6
to
5857fd3
Compare
Signed-off-by: Chris Porter <porter@ibm.com>
5857fd3
to
e266c20
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I just noticed that the "latest" tag didn't get applied correctly: |
This PR attempts to partially address #333
It adds a workflow to build a statically linked kbs-client and push it to ghcr.io.
Limitations: It only covers x86-64 linux for now. It only supports the
sample_only
kbs-client.