Skip to content

Commit

Permalink
Toggle btwn optimized and debug flags
Browse files Browse the repository at this point in the history
  • Loading branch information
juliannguyen4 committed Sep 13, 2023
1 parent d00752b commit 1b5d294
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,14 @@ jobs:
crudini --set config.conf enterprise-edition hosts ${SERVER_DOCKER_IP}:3000
working-directory: test

- name: Determine type of build
- name: Set debug flags
run: echo "CFLAGS=-Og -g" >> $GITHUB_ENV
if: ${{ inputs.optimized-or-debug == 'debug' }}

- name: Set optimized flags
run: echo "CFLAGS=-O1" >> $GITHUB_ENV
if: ${{ inputs.optimized-or-debug == 'optimized' }}

- name: Build wheel
uses: pypa/cibuildwheel@v2.11.2
env:
Expand Down Expand Up @@ -240,10 +244,14 @@ jobs:
crudini --set config.conf enterprise-edition hosts ${SERVER_DOCKER_IP}:3000
working-directory: test

- name: Determine type of build
- name: Set debug flags
run: echo "CFLAGS=-Og -g" >> $GITHUB_ENV
if: ${{ inputs.optimized-or-debug == 'debug' }}

- name: Set optimized flags
run: echo "CFLAGS=-O1" >> $GITHUB_ENV
if: ${{ inputs.optimized-or-debug == 'optimized' }}

- name: Build wheel
uses: pypa/cibuildwheel@v2.11.2
env:
Expand Down Expand Up @@ -274,10 +282,14 @@ jobs:
with:
submodules: recursive

- name: Determine type of build
- name: Set debug flags
run: echo "CFLAGS=-Og -g" >> $GITHUB_ENV
if: ${{ inputs.optimized-or-debug == 'debug' }}

- name: Set optimized flags
run: echo "CFLAGS=-O1" >> $GITHUB_ENV
if: ${{ inputs.optimized-or-debug == 'optimized' }}

- name: Build wheel
uses: pypa/cibuildwheel@v2.11.2
env:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
['/usr/local/opt/openssl/include'] + \
['aerospike-client-c/modules/common/src/include']
extra_compile_args = [
'-std=gnu99', '-Wall', '-fPIC', '-DDEBUG', '-O1',
'-std=gnu99', '-Wall', '-fPIC', '-DDEBUG',
'-fno-common', '-fno-strict-aliasing', '-Wno-strict-prototypes',
'-D_FILE_OFFSET_BITS=64', '-D_REENTRANT',
'-DMARCH_' + machine,
Expand Down

0 comments on commit 1b5d294

Please sign in to comment.