-
Notifications
You must be signed in to change notification settings - Fork 339
Build incremental more #3444
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
base: main
Are you sure you want to change the base?
Build incremental more #3444
Conversation
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.
Code Review
This pull request refactors the build process to be more incremental, primarily by updating ci/libbuild.sh to conditionally run autogen.sh and configure. Changes are also made to the Dockerfile to use this new script, and a build-host target is added to the Justfile.
The review highlights a critical concern regarding the apparent removal of ccache utilization, which could impact build performance. Additionally, a minor file formatting issue in the Justfile and a point of clarity regarding a verbosity parameter in the Dockerfile are noted. The core logic for incremental builds appears sound.
| env ./configure \ | ||
| --sysconfdir=/etc --prefix=/usr --libdir=/usr/lib64 \ | ||
| --with-openssl --with-selinux --with-composefs \ | ||
| . ci/libbuild.sh |
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.
The previous build setup explicitly configured and used ccache to speed up compilations. With the current changes, ccache is still installed by ci/installdeps.sh, but the environment variables CC and CCACHE_DIR are no longer set in this RUN step. This means ccache will likely not be utilized, potentially slowing down builds.
To reinstate ccache functionality, you can set CC and CCACHE_DIR before invoking the build script. The existing cache mount --mount=type=cache,target=/build/target can be leveraged to store ccache data, for example, in /build/target/.ccache.
export CCACHE_DIR="/build/target/.ccache" # Store ccache data within the mounted cache
mkdir -p "${CCACHE_DIR}"
export CC="ccache gcc" # Or your specific compiler, e.g., ccache clang
. ci/libbuild.sh
Dockerfile
Outdated
| --sysconfdir=/etc --prefix=/usr --libdir=/usr/lib64 \ | ||
| --with-openssl --with-selinux --with-composefs \ | ||
| . ci/libbuild.sh | ||
| build V=0 --with-openssl --with-selinux --with-composefs \ |
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.
The V=0 argument is passed to the build function. This argument will be included in "$@" within ci/libbuild.sh and thus passed to the ../../configure command. Standard configure scripts typically do not use V=<level> for verbosity control (makefiles do).
Meanwhile, the make command within the build function (in ci/libbuild.sh) is hardcoded as make V=1, meaning it will always run verbosely.
If the V=0 here was intended to make the make process non-verbose, this will not have the desired effect. If it was intended for configure, it's likely a no-op. Please clarify the intent of V=0 or consider adjusting how verbosity is handled if make's verbosity needs to be configurable via this parameter.
Justfile
Outdated
|
|
||
| # Run a build on the host system | ||
| build-host: | ||
| . ci/libbuild.sh && 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.
Since it's really convenient sometimes. Signed-off-by: Colin Walters <[email protected]>
Avoid rerunning autoconf if we already have it cached. Signed-off-by: Colin Walters <[email protected]>
For faster iteration. Signed-off-by: Colin Walters <[email protected]>
c4a03e7 to
c1ac2e8
Compare
|
PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
No description provided.