Skip to content

Commit

Permalink
Properly set environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
juliannguyen4 committed Feb 20, 2024
1 parent 292ec54 commit 877debe
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,18 @@ jobs:
if: ${{ !inputs.run_tests }}
run: echo "TEST_COMMAND=python -c 'import aerospike'" >> $GITHUB_ENV

- name: Set environment variables for building
run: echo "UNOPTIMIZED=${{ inputs.build-for-debugging }}" >> $GITHUB_ENV
- name: Build without optimizations
if: ${{ inputs.build-for-debugging }}
run: echo "CIBW_ENVIRONMENT_PASS_LINUX_VARS='UNOPTIMIZED=1'" >> $GITHUB_ENV

- name: Build with optimizations (e.g for production)
if: ${{ !inputs.build-for-debugging }}
run: echo "CIBW_ENVIRONMENT_PASS_LINUX_VARS=''" >> $GITHUB_ENV

- name: Build wheel
uses: pypa/cibuildwheel@v2.15.0
env:
CIBW_ENVIRONMENT_PASS_LINUX: ${{ env.UNOPTIMIZED }}
CIBW_ENVIRONMENT_PASS_LINUX: ${{ env.CIBW_ENVIRONMENT_PASS_LINUX_VARS }}
CIBW_BUILD: ${{ matrix.python }}-manylinux_${{ matrix.platform }}
CIBW_BUILD_FRONTEND: build
CIBW_BEFORE_ALL_LINUX: >
Expand Down

0 comments on commit 877debe

Please sign in to comment.