diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 4ef41f4d1..c692a26f0 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -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: >