Skip to content

Commit

Permalink
Fix actions to build IB wheels
Browse files Browse the repository at this point in the history
  • Loading branch information
chipkent committed May 7, 2024
1 parent 8e60095 commit 0cf8414
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,16 @@ jobs:
uses: actions/checkout@v1
- name: Build
run: |
cd ibwhl
docker-compose -f "docker-compose.yml" up --build
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements_dhib_env.txt
python3 dhib_env ibwhl --ib-version ${{ env.IB_VERSION }}
find . -name \*.whl
- name: Archive build artifacts
uses: actions/upload-artifact@v2
with:
name: ib-wheels
path: |
ibwhl/dist/*
dist/ib/*
build-whl:
Expand Down
24 changes: 24 additions & 0 deletions dhib_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,29 @@ def cli():
"""A script to build Deephaven-IB virtual environments."""
pass

@click.command()
@click.option('--python', default="python3", help='The path to the Python executable to use.')
@click.option('--ib_version', default=IB_VERSION_DEFAULT, help='The version of ibapi.')
def ibwheel(
python: str,
ib_version: str,
):
"""Create a development environment."""
logging.warning(f"Creating an ib wheel: python={python}, ib_version={ib_version}")

version_assert_format(ib_version)

logging.warning(f"Using system python: {python}")
pyenv = Pyenv(python)

ib_wheel = IbWheel(ib_version)
ib_wheel.build(pyenv)

logging.warning(f"IB wheel created successfully.")
logging.warning(f"IB wheel path: {Path(f'dist/ib/ibapi-{ib_version}-py3-none-any.whl').absolute()}")

success(pyenv)


@click.command()
@click.option('--python', default="python3", help='The path to the Python executable to use.')
Expand Down Expand Up @@ -540,6 +563,7 @@ def release(
success(pyenv)


cli.add_command(ibwheel)
cli.add_command(dev)
cli.add_command(release)

Expand Down

0 comments on commit 0cf8414

Please sign in to comment.