Skip to content

Commit

Permalink
Get the Bodo SCM Version and Fix in Pip Builds (#8668)
Browse files Browse the repository at this point in the history
  • Loading branch information
srilman committed Dec 3, 2024
1 parent 44e6f8e commit 46dd888
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 3 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/_build_bodo_pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
description: 'Operating System to Build On/For'
type: string
required: true
bodo_version:
description: 'Bodo Version to Build'
type: string
required: true

# Recommended with setup-micromamba
# https://github.com/mamba-org/setup-micromamba#about-login-shells
Expand Down Expand Up @@ -87,7 +91,7 @@ jobs:
echo "NEW_PYTHON_DIR: $NEW_PYTHON_DIR"
rm -rf $OLD_PYTHON_DIR
ln -s $NEW_PYTHON_DIR $OLD_PYTHON_DIR
CIBW_ENVIRONMENT: DISABLE_CCACHE=1 SCCACHE_BUCKET=engine-codebuild-cache SCCACHE_REGION=us-east-2 SCCACHE_S3_USE_SSL=true SCCACHE_S3_SERVER_SIDE_ENCRYPTION=true MACOSX_DEPLOYMENT_TARGET=${{ inputs.os == 'macos-14' && '11.0' || '10.15' }} BODO_VENDOR_MPICH=1
CIBW_ENVIRONMENT: DISABLE_CCACHE=1 SCCACHE_BUCKET=engine-codebuild-cache SCCACHE_REGION=us-east-2 SCCACHE_S3_USE_SSL=true SCCACHE_S3_SERVER_SIDE_ENCRYPTION=true MACOSX_DEPLOYMENT_TARGET=${{ inputs.os == 'macos-14' && '11.0' || '10.15' }} BODO_VENDOR_MPICH=1 SETUPTOOLS_SCM_PRETEND_VERSION=${{ inputs.bodo_version }}
CIBW_ENVIRONMENT_PASS_LINUX: AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN AWS_DEFAULT_REGION
CIBW_REPAIR_WHEEL_COMMAND_MACOS: 'delocate-wheel --ignore-missing-dependencies --sanitize-rpaths --exclude libmpi --exclude libpmpi --exclude libarrow --exclude libarrow_acero --exclude libarrow_dataset --exclude libarrow_flight --exclude libarrow_python --exclude libarrow_python_flight --exclude libarrow_python_parquet_encryption --exclude libarrow_substrait --exclude libparquet --require-archs {delocate_archs} -v {wheel} && python buildscripts/bodo/pip/macos/patch_libs_for_pip.py -p {wheel} && mv {wheel} {dest_dir}'
CIBW_REPAIR_WHEEL_COMMAND_LINUX: 'LD_LIBRARY_PATH=/opt/conda/lib:$LD_LIBRARY_PATH && auditwheel -v repair --exclude libmpi.so.12 --exclude libarrow.so.1700 --exclude libarrow_acero.so.1700 --exclude libarrow_dataset.so.1700 --exclude libarrow_python.so --exclude libparquet.so.1700 --plat manylinux_2_35_x86_64 {wheel} -w {dest_dir} && python buildscripts/bodo/pip/manylinux/patch_libs_for_pip.py -p {dest_dir}'
Expand Down
29 changes: 28 additions & 1 deletion .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,48 @@ on:
types: [published]
schedule:
- cron: '45 21 * * 2,4' # 9:45PM EST Tue, Thu
pull_request:
paths:
- 'pixi.lock'
- '.github/workflows/build_wheels.yml'
- '.github/workflows/_build_bodo_pip.yml'

jobs:
get_version:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
# For setuptools_scm to be able to determine version,
# we need to fetch the entire history
fetch-depth: 0
- name: Get Version String
id: get_vstr
run: |
set -exo pipefail
pip install setuptools_scm
echo "bodo_version=`python -m setuptools_scm`" >> $GITHUB_OUTPUT
outputs:
bodo_version: ${{ steps.get_vstr.outputs.bodo_version }}

build_bodo_linux_wheels:
uses: ./.github/workflows/_build_bodo_pip.yml
needs: [get_version]
with:
os: ubuntu-latest
bodo_version: ${{ needs.get_version.outputs.bodo_version }}
secrets: inherit

build_bodo_macos_wheels:
uses: ./.github/workflows/_build_bodo_pip.yml
needs: [get_version]
strategy:
fail-fast: false
matrix:
os: [macos-13, macos-14]
with:
os: ${{ matrix.os }}
bodo_version: ${{ needs.get_version.outputs.bodo_version }}
secrets: inherit

test-bodo-linux:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
paths:
- 'pixi.lock'
- '.github/workflows/release.yml'
- '.github/workflows/_build_*.yml'
- '.github/workflows/_build_*_conda.yml'

jobs:
# This is separate because we need to build Linux community in a container
Expand Down

0 comments on commit 46dd888

Please sign in to comment.