Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
251079e
give a try
juliannguyen4 Apr 24, 2025
dc9472e
f
juliannguyen4 Apr 24, 2025
8a8554e
f
juliannguyen4 Apr 24, 2025
3e65ecd
f
juliannguyen4 Apr 24, 2025
c3ae817
move artifact to path
juliannguyen4 Apr 24, 2025
2f5d282
debug
juliannguyen4 Apr 24, 2025
067791a
fix
juliannguyen4 Apr 24, 2025
3d42110
fail on error
juliannguyen4 Apr 24, 2025
a6c1aa7
idk
juliannguyen4 Apr 24, 2025
2528cb7
forgot
juliannguyen4 Apr 24, 2025
e3ed46c
ignore
juliannguyen4 Apr 24, 2025
8f2ed3d
Merge remote-tracking branch 'origin/dev' into cache-c-client-build
juliannguyen4 Oct 30, 2025
ad211a5
Create separate workflows to trigger c client and python client builds
juliannguyen4 Oct 30, 2025
86e2627
Rename and test run
juliannguyen4 Oct 30, 2025
27766d0
Add workflow to tie two workflows
juliannguyen4 Oct 30, 2025
e7d34f8
has to run at least once.
juliannguyen4 Oct 30, 2025
7a8ba51
Don't exit if artifact doesn't exist.
juliannguyen4 Oct 30, 2025
e4fe04a
refactor
juliannguyen4 Oct 30, 2025
3f8d1ae
Just get include files from submodule's source code. it should be the…
juliannguyen4 Oct 30, 2025
d400d49
Allow passing in the path to c client static library so we don't have…
juliannguyen4 Oct 30, 2025
2141395
Merge remote-tracking branch 'origin/dev' into cache-c-client-build
juliannguyen4 Jan 6, 2026
ec8d5e8
TODO this needs to use cache...
juliannguyen4 Jan 6, 2026
e0c87ad
Add support for caching
juliannguyen4 Jan 6, 2026
f113c14
Fix
juliannguyen4 Jan 6, 2026
57dbe68
Fix
juliannguyen4 Jan 6, 2026
52c13a4
fix
juliannguyen4 Jan 6, 2026
8b768d8
Remove sanitizer for now. C client also needs to be built with libasan
juliannguyen4 Jan 8, 2026
7699cd5
Merge remote-tracking branch 'origin/dev' into CLIENT-4042-cicd-cache…
juliannguyen4 Jan 16, 2026
acb7e54
Move C client build job into smoke tests workflow since its harder to…
juliannguyen4 Jan 16, 2026
069bafb
Remove
juliannguyen4 Jan 16, 2026
3a60f6e
This step should fail
juliannguyen4 Jan 16, 2026
78bf1eb
Assuming libaerospike.a will be restored in cwd
juliannguyen4 Jan 16, 2026
756c437
get prereqs for building python client further up the job
juliannguyen4 Jan 16, 2026
95e84de
fix
juliannguyen4 Jan 16, 2026
27adba5
speed up
juliannguyen4 Jan 16, 2026
4913248
fix
juliannguyen4 Jan 16, 2026
76c346e
clean up
juliannguyen4 Jan 16, 2026
e2f6fee
Move libaerospike.a so we don't have to use full path for cache key
juliannguyen4 Jan 21, 2026
6cf6548
Rm debug step
juliannguyen4 Jan 21, 2026
1c43814
Merge remote-tracking branch 'origin/dev' into CLIENT-4042-cicd-cache…
juliannguyen4 Jan 21, 2026
c7fd983
Rm unnecessary lines. I don't believe MANIFEST.in i.e the sdist shoul…
juliannguyen4 Jan 21, 2026
db483aa
fix.
juliannguyen4 Jan 21, 2026
a48ae85
fix...
juliannguyen4 Jan 21, 2026
310a67e
Fix incorrect path...
juliannguyen4 Jan 21, 2026
fc0dfb8
fix
juliannguyen4 Jan 23, 2026
cfdf8a8
Fix
juliannguyen4 Jan 23, 2026
802f647
Revert "Rm unnecessary lines. I don't believe MANIFEST.in i.e the sdi…
juliannguyen4 Jan 23, 2026
582a0bf
Guessing that libaerospike.a got copied to user directory?
juliannguyen4 Jan 23, 2026
e5b3467
Revert "Guessing that libaerospike.a got copied to user directory?"
juliannguyen4 Jan 23, 2026
fed4b25
Update LD_LIBRARY_PATH in setup.py
juliannguyen4 Jan 23, 2026
97a1e2c
fix
juliannguyen4 Jan 23, 2026
8b25450
since python3 setup.py runs inside the isolated build folder, we need…
juliannguyen4 Jan 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/smoke-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,39 @@ on:
required: true

jobs:
build-c-client:
outputs:
c-client-sha: ${{ steps.get-c-client-sha.outputs.sha }}
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
sparse-checkout: |
aerospike-client-c

- id: get-c-client-sha
run: echo sha=$(git rev-parse HEAD) >> $GITHUB_OUTPUT
working-directory: aerospike-client-c

- uses: actions/cache@v5
id: download-c-client
with:
key: c-client-${{ steps.get-c-client-sha.outputs.sha }}
path: ./libaerospike.a
lookup-only: true

- name: Install C client build dependencies
if: ${{ steps.download-c-client.outputs.cache-hit != 'true' }}
run: |
sudo apt-get update &&
sudo apt-get install -y libc6-dev libssl-dev autoconf automake libtool g++ zlib1g-dev ncurses-dev &&
make build &&
mv ./target/Linux-x86_64/lib/libaerospike.a ..
working-directory: aerospike-client-c

build:
needs: build-c-client
runs-on: ubuntu-22.04
strategy:
matrix:
Expand All @@ -64,6 +96,12 @@ jobs:
submodules: recursive
fetch-depth: 0

- uses: actions/cache/restore@v5
with:
key: c-client-${{ needs.build-c-client.outputs.c-client-sha }}
path: ./libaerospike.a
fail-on-cache-miss: true

- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: ${{ matrix.py-version }}
Expand All @@ -83,6 +121,7 @@ jobs:
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

Expand Down
25 changes: 20 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import io
import xml.etree.ElementTree as ET
import glob
from pathlib import Path

################################################################################
# ENVIRONMENT VARIABLES
Expand Down Expand Up @@ -64,6 +65,7 @@
################################################################################

include_dirs = ['src/include'] + \
[f'{AEROSPIKE_C_HOME}/src/include'] + \
[x for x in os.getenv('CPATH', '').split(':') if len(x) > 0] + \
['/usr/local/opt/openssl/include'] + \
['aerospike-client-c/modules/common/src/include']
Expand Down Expand Up @@ -177,11 +179,23 @@
'/usr/local/opt/openssl/include',

]

C_CLIENT_SHARED_PATH = os.getenv("C_CLIENT_SHARED_PATH")

if not WINDOWS:
include_dirs.append(AEROSPIKE_C_TARGET + '/include')
extra_objects = extra_objects + [
AEROSPIKE_C_TARGET + '/lib/libaerospike.a'
]
if C_CLIENT_SHARED_PATH:
# In this case, no headers will be installed in target directory.
include_dirs.append(AEROSPIKE_C_HOME + '/src/include')
extra_objects.append(C_CLIENT_SHARED_PATH)
# The C client isn't included in the sdist, so we need to explicitly tell linker to find it
# outside of the isolated build environment created by pypa/build
dir_containing_c_client_static_lib = os.path.dirname(os.path.abspath(C_CLIENT_SHARED_PATH))
library_dirs.append(dir_containing_c_client_static_lib)
else:
include_dirs.append(AEROSPIKE_C_TARGET + '/src/include')
extra_objects = extra_objects + [
AEROSPIKE_C_TARGET + '/lib/libaerospike.a'
]
else:
include_dirs.append(AEROSPIKE_C_TARGET + '/src/include')
library_dirs.append(f"{AEROSPIKE_C_TARGET}/vs/packages/aerospike-client-c-dependencies.{c_client_dependencies_version}/build/native/lib/x64/Release")
Expand Down Expand Up @@ -249,7 +263,8 @@ def compile():
print(cmd, library_dirs, libraries)
call(cmd, cwd=CCLIENT_PATH)

self.execute(compile, [], 'Compiling core aerospike-client-c')
if not C_CLIENT_SHARED_PATH:
self.execute(compile, [], 'Compiling core aerospike-client-c')
# run original c-extension build code
build.run(self)

Expand Down
Loading