Skip to content

Commit

Permalink
deterministic wheel names (#201)
Browse files Browse the repository at this point in the history
* add

* fix

* update
  • Loading branch information
s0l0ist authored Oct 1, 2024
1 parent 998b7a9 commit d67ee7d
Show file tree
Hide file tree
Showing 8 changed files with 2,487 additions and 100 deletions.
26 changes: 16 additions & 10 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@ jobs:
python-version: ['3_8', '3_9', '3_10', '3_11']
steps:
- uses: actions/checkout@v4
# configuring python for bazel abi and platform repo rules
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Python deps
run: |
python -m pip install --upgrade pip
pip install --upgrade packaging
- name: Run tests nix
timeout-minutes: 30
run: bazel test --test_output=all //private_set_intersection/python:test_${{ matrix.python-version }}
Expand Down Expand Up @@ -99,7 +108,7 @@ jobs:
matrix:
# Handling boundary conditions of: https://github.com/pypa/manylinux
python-version: ['3.8.0', '3.8.4', '3.9.0']
os: [ubuntu-20.04]
os: [ubuntu-20.04, macos-12]
steps:
- uses: actions/checkout@v4
- name: Set up Python
Expand All @@ -112,18 +121,17 @@ jobs:
TWINE_PASSWORD: ${{ secrets.OM_PSI_PYPI_TOKEN }}
run: |
python -m pip install --upgrade pip
pip install twine packaging
bazel build -c opt //private_set_intersection/python:wheel
python private_set_intersection/python/rename.py
twine upload --skip-existing bazel-bin/private_set_intersection/python/openmined_psi-*
pip install --upgrade packaging
bazel run -c opt //private_set_intersection/python:wheel.publish -- --verbose --skip-existing
Publish-python:
needs: [Core, JS, Go, Python, Rust]
if: ${{ github.event_name == 'release' }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
os: [ubuntu-24.04, ubuntu-22.04, ubuntu-20.04, macos-14]
os: [ubuntu-24.04, ubuntu-22.04, ubuntu-20.04, macos-14, macos-12]
steps:
- uses: actions/checkout@v4
- name: Set up Python
Expand All @@ -136,7 +144,5 @@ jobs:
TWINE_PASSWORD: ${{ secrets.OM_PSI_PYPI_TOKEN }}
run: |
python -m pip install --upgrade pip
pip install twine packaging
bazel build -c opt //private_set_intersection/python:wheel
python private_set_intersection/python/rename.py
twine upload --skip-existing bazel-bin/private_set_intersection/python/openmined_psi-*
pip install --upgrade packaging
bazel run -c opt //private_set_intersection/python:wheel.publish -- --verbose --skip-existing
9 changes: 9 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,15 @@ jobs:
python-version: ['3_8', '3_9', '3_10', '3_11']
steps:
- uses: actions/checkout@v4
# configuring python for bazel abi and platform repo rules
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Python deps
run: |
python -m pip install --upgrade pip
pip install --upgrade packaging
- name: Run tests nix
timeout-minutes: 30
run: bazel test --test_output=all //private_set_intersection/python:test_${{ matrix.python-version }}
Expand Down
14 changes: 6 additions & 8 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,6 @@ use_repo(
"python_versions",
)

register_toolchains(
"@python_3_8//:all",
"@python_3_9//:all",
"@python_3_10//:all",
"@python_3_11//:all",
"@python_3_12//:all",
)

pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
use_repo(pip, "psi_deps")
pip.parse(
Expand Down Expand Up @@ -106,6 +98,12 @@ pip.parse(
requirements_lock = "//private_set_intersection/python/requirements:requirements_lock_3_12.txt",
)

python_abi = use_extension("//private_set_intersection/python:extensions.bzl", "python_abi")
use_repo(python_abi, "python_abi")

python_platform = use_extension("//private_set_intersection/python:extensions.bzl", "python_platform")
use_repo(python_platform, "python_platform")

## Rust
rust = use_extension("@rules_rust//rust:extensions.bzl", "rust")
rust.toolchain(
Expand Down
Loading

0 comments on commit d67ee7d

Please sign in to comment.