-
-
Notifications
You must be signed in to change notification settings - Fork 62
Speed up builds by caching /tmp/wheelhouse directory, speed up EL 8 build step by not running slow Requires / Provides Python generation step #697
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
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
6a67da6
Test a change for caching wheelhouse deps.
Kami 5a00dab
Try to use larger VM to see if it helps with the build time.
Kami e14d948
Test another change.
Kami 8a8fa54
Remove change which doesn't help.
Kami 390f519
Prepend each line with timestamp to make it easier to see where the
Kami 507704e
Test a change (use pre-built wheel).
Kami 00f1c11
Use verbose flag with rpmbuild to see if it will offer some clue why
Kami 70ec60c
Test a change.
Kami b1a6259
Remove verbose output we don't need anymore.
Kami e288572
Add a comment.
Kami afc43eb
Display rpm metadata post build for troubleshooting, etc purposes.
Kami e22a712
Fix typo.
Kami 20c9a25
Add back -vv for one more run.
Kami df2d13f
Fix the query args.
Kami f61baa4
Remove verbose flag we don't need anymore.
Kami eced25d
Update comment.
Kami 3ad830a
Fix typo.
Kami bf9b7b3
By default, comment out some additional noise.
Kami 9f55aed
Also try undefining that helper for EL7 to see if it makes any
Kami 65eb14b
Check the EL8 rpm build timing w Provides excl. Requires change
arm4b 1f6bb8e
Revert "Check the EL8 rpm build timing w Provides excl. Requires change"
arm4b da36b56
Switch to EL8 conditional check
arm4b File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,7 +31,7 @@ jobs: | |
| exclusive: true # default - true | ||
| # Temporary workaround for Circle CI issue | ||
| # https://discuss.circleci.com/t/setup-remote-docker-connection-failures/26434 | ||
| version: 18.05.0-ce | ||
| version: 18.05.0-ce | ||
| - run: | ||
| name: Ensure installation scripts are synced with their templates | ||
| command: make .generated-files-check | ||
|
|
@@ -70,21 +70,57 @@ jobs: | |
| - run: | ||
| name: Pull dependent Docker Images | ||
| command: .circle/docker-compose2.sh pull ${DISTRO} | ||
| - restore_cache: | ||
| name: Restore Wheelhouse Cache | ||
| keys: | ||
| - wheelhouse-{{ checksum "/tmp/distro-version" }}-{{ checksum "/tmp/st2-version" }} | ||
| - wheelhouse- | ||
| - run: | ||
| name: Build the ${DISTRO} Packages | ||
| command: | | ||
| # Create necessary directories | ||
| # TODO: Per distro directory? | ||
| mkdir -p ~/st2-packages/build/${DISTRO}/log/ | ||
| mkdir -p ~/st2-packages/wheelhouse/ | ||
|
|
||
| # List volume content to see if there is any cached dasta | ||
| # Uncomment if you are troubleshooting wheelhouse caching issues | ||
| # echo "local wheelhouse cache directory content" | ||
| # echo "" | ||
| # ls -la ~/st2-packages/wheelhouse/ | ||
| # du -hs ~/st2-packages/wheelhouse/ | ||
| # echo "" | ||
|
|
||
| # Copy over cached wheelhouse packages (if any exist) | ||
| docker cp ~/st2-packages/wheelhouse/. st2-packages-vol:/tmp/wheelhouse | ||
|
|
||
| # List volume content to see if there is any cached data | ||
| # echo "docker volume wheelhouse cache directory content" | ||
| # echo "" | ||
| # docker run --rm -i -v=st2-packages-vol:/tmp/wheelhouse busybox find /tmp/wheelhouse | ||
| # echo "" | ||
|
|
||
| # Run the build | ||
| .circle/docker-compose2.sh build ${DISTRO} | ||
|
|
||
| # Once build container finishes we can copy packages directly from it | ||
| mkdir -p ~/st2-packages/build/${DISTRO}/log/ | ||
|
|
||
| # Copy built packages | ||
| docker cp st2-packages-vol:/root/build/. ~/st2-packages/build/${DISTRO} | ||
| # # TODO: It works! (~0.5-1min speed-up) Enable CircleCI2.0 cache for pip and wheelhouse later | ||
| # - run: | ||
| # name: Build the ${DISTRO} Packages 2nd time (compare with pip/wheelhouse cached) | ||
| # command: | | ||
| # .circle/docker-compose2.sh build ${DISTRO} | ||
| # # Once build container finishes we can copy packages directly from it | ||
| # docker cp st2-packages-vol:/root/build /tmp/st2-packages | ||
| # working_directory: ~/st2-packages | ||
|
|
||
| # Copy all the files from /tmp/wheelhouse so we can cache it and substantially speed | ||
| # up subsequent builds | ||
| docker cp st2-packages-vol:/tmp/wheelhouse/. ~/st2-packages/wheelhouse/ | ||
|
|
||
| # echo "wheelhouse cache directory content" | ||
| # Uncomment if you are troubleshooting wheelhouse caching issues | ||
| # ls -la ~/st2-packages/wheelhouse/ | ||
| # du -hs ~/st2-packages/wheelhouse/ | ||
| - save_cache: | ||
| name: Store Wheelhouse Cache | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
| key: wheelhouse-{{ checksum "/tmp/distro-version" }}-{{ checksum "/tmp/st2-version" }} | ||
| paths: | ||
| - ~/st2-packages/wheelhouse/ | ||
| - run: | ||
| name: Test the Packages | ||
| command: .circle/docker-compose2.sh test ${DISTRO} | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Good to find this TODO comment. This takes us back in time, 3 years ago :)