-
Notifications
You must be signed in to change notification settings - Fork 111
[CLIENT-4042] CI/CD: Cache C client build to save compute spend #920
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
Draft
juliannguyen4
wants to merge
52
commits into
dev
Choose a base branch
from
CLIENT-4042-cicd-cache-c-client-build-in-github-actions
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 27 commits
Commits
Show all changes
52 commits
Select commit
Hold shift + click to select a range
251079e
give a try
juliannguyen4 dc9472e
f
juliannguyen4 8a8554e
f
juliannguyen4 3e65ecd
f
juliannguyen4 c3ae817
move artifact to path
juliannguyen4 2f5d282
debug
juliannguyen4 067791a
fix
juliannguyen4 3d42110
fail on error
juliannguyen4 a6c1aa7
idk
juliannguyen4 2528cb7
forgot
juliannguyen4 e3ed46c
ignore
juliannguyen4 8f2ed3d
Merge remote-tracking branch 'origin/dev' into cache-c-client-build
juliannguyen4 ad211a5
Create separate workflows to trigger c client and python client builds
juliannguyen4 86e2627
Rename and test run
juliannguyen4 27766d0
Add workflow to tie two workflows
juliannguyen4 e7d34f8
has to run at least once.
juliannguyen4 7a8ba51
Don't exit if artifact doesn't exist.
juliannguyen4 e4fe04a
refactor
juliannguyen4 3f8d1ae
Just get include files from submodule's source code. it should be the…
juliannguyen4 d400d49
Allow passing in the path to c client static library so we don't have…
juliannguyen4 2141395
Merge remote-tracking branch 'origin/dev' into cache-c-client-build
juliannguyen4 ec8d5e8
TODO this needs to use cache...
juliannguyen4 e0c87ad
Add support for caching
juliannguyen4 f113c14
Fix
juliannguyen4 57dbe68
Fix
juliannguyen4 52c13a4
fix
juliannguyen4 8b768d8
Remove sanitizer for now. C client also needs to be built with libasan
juliannguyen4 7699cd5
Merge remote-tracking branch 'origin/dev' into CLIENT-4042-cicd-cache…
juliannguyen4 acb7e54
Move C client build job into smoke tests workflow since its harder to…
juliannguyen4 069bafb
Remove
juliannguyen4 3a60f6e
This step should fail
juliannguyen4 78bf1eb
Assuming libaerospike.a will be restored in cwd
juliannguyen4 756c437
get prereqs for building python client further up the job
juliannguyen4 95e84de
fix
juliannguyen4 27adba5
speed up
juliannguyen4 4913248
fix
juliannguyen4 76c346e
clean up
juliannguyen4 e2f6fee
Move libaerospike.a so we don't have to use full path for cache key
juliannguyen4 6cf6548
Rm debug step
juliannguyen4 1c43814
Merge remote-tracking branch 'origin/dev' into CLIENT-4042-cicd-cache…
juliannguyen4 c7fd983
Rm unnecessary lines. I don't believe MANIFEST.in i.e the sdist shoul…
juliannguyen4 db483aa
fix.
juliannguyen4 a48ae85
fix...
juliannguyen4 310a67e
Fix incorrect path...
juliannguyen4 fc0dfb8
fix
juliannguyen4 cfdf8a8
Fix
juliannguyen4 802f647
Revert "Rm unnecessary lines. I don't believe MANIFEST.in i.e the sdi…
juliannguyen4 582a0bf
Guessing that libaerospike.a got copied to user directory?
juliannguyen4 e5b3467
Revert "Guessing that libaerospike.a got copied to user directory?"
juliannguyen4 fed4b25
Update LD_LIBRARY_PATH in setup.py
juliannguyen4 97a1e2c
fix
juliannguyen4 8b25450
since python3 setup.py runs inside the isolated build folder, we need…
juliannguyen4 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| on: | ||
| workflow_call: | ||
|
|
||
| jobs: | ||
| build-c-client: | ||
| runs-on: ubuntu-22.04 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| submodules: recursive | ||
| sparse-checkout: | | ||
| aerospike-client-c | ||
|
|
||
| - run: echo C_CLIENT_REVISION=$(git rev-parse HEAD) >> $GITHUB_ENV | ||
| working-directory: aerospike-client-c | ||
|
|
||
| - uses: actions/cache@v5 | ||
| id: download-c-client | ||
| with: | ||
| key: c-client-${{ env.C_CLIENT_REVISION }} | ||
| path: ./aerospike-client-c/target/Linux-x86_64/lib/libaerospike.a | ||
|
|
||
| - name: Install C client build dependencies | ||
| if: ${{ steps.download-c-client.outputs.cache-hit != 'true' }} | ||
| run: | | ||
| sudo apt update && | ||
| sudo apt-get install -y libc6-dev libssl-dev autoconf automake libtool g++ zlib1g-dev ncurses-dev && | ||
| make build | ||
| working-directory: aerospike-client-c | ||
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 |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| on: | ||
| workflow_call: | ||
|
|
||
| jobs: | ||
| build-python-client: | ||
| runs-on: ubuntu-22.04 | ||
| strategy: | ||
| matrix: | ||
| py-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| with: | ||
| submodules: recursive | ||
| fetch-depth: 0 | ||
|
|
||
| - run: echo C_CLIENT_REVISION=$(git submodule status | awk '{print $1}') >> $GITHUB_ENV | ||
|
|
||
| - uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: ${{ matrix.py-version }} | ||
| architecture: 'x64' | ||
| allow-prereleases: true | ||
|
|
||
| - run: sudo apt update | ||
| - name: Install build dependencies (apt packages) | ||
| run: sudo apt install python3-dev libssl-dev -y | ||
| - name: Install build dependencies (pip packages) | ||
| run: python3 -m pip install -r requirements.txt | ||
|
|
||
| - uses: actions/cache/restore@v5 | ||
| id: download-c-client | ||
| with: | ||
| key: c-client-${{ env.C_CLIENT_REVISION }} | ||
| path: libaerospike.a | ||
|
|
||
| - name: Build client | ||
| run: python3 -m build | ||
| env: | ||
| CFLAGS: '-Werror' | ||
| C_CLIENT_SHARED_PATH: ./libaerospike.a | ||
|
|
||
| - run: echo WHEEL_GH_ARTIFACT_NAME=wheel-${{ matrix.py-version }} >> $GITHUB_ENV | ||
|
|
||
| - name: Send wheel to test jobs | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ${{ env.WHEEL_GH_ARTIFACT_NAME }} | ||
| path: ./dist/*.whl | ||
|
||
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 |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| on: | ||
| pull_request: | ||
| paths: | ||
| - aerospike-client-c | ||
| - src/** | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| build-c-client-submodule: | ||
| uses: ./.github/workflows/build-c-client.yml | ||
|
|
||
| build-python-client: | ||
|
||
| needs: build-c-client-submodule | ||
| uses: ./.github/workflows/build-python-client.yml | ||
|
||
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.