Skip to content

Commit

Permalink
fix python workspace (#190)
Browse files Browse the repository at this point in the history
* update

* fix

* move

* update

* update go deps

* update
  • Loading branch information
s0l0ist authored Jan 17, 2024
1 parent 01ca9fa commit 09a59f9
Show file tree
Hide file tree
Showing 12 changed files with 69 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.0.0
6.4.0
22 changes: 17 additions & 5 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ jobs:
os: [ubuntu-22.04, macos-12]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Run tests nix
timeout-minutes: 60
run: .github/workflows/scripts/run_tests_core.sh
Expand All @@ -35,6 +38,9 @@ jobs:
os: [ubuntu-22.04, macos-12]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Run tests nix
timeout-minutes: 60
run: .github/workflows/scripts/run_tests_js.sh
Expand All @@ -48,7 +54,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Run tests nix
Expand All @@ -62,16 +68,19 @@ jobs:
strategy:
matrix:
os: [ubuntu-22.04, macos-12]
golang-version: ['1.17', '1.18', '1.19']
golang-version: ['1.19', '1.20', '1.21']
steps:
- name: Set up Golang ${{ matrix.golang-version }}
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.golang-version }}
id: go
- name: Install Go dependencies
run: go install golang.org/x/lint/golint@latest
- uses: actions/checkout@v3
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Run tests nix
timeout-minutes: 30
run: .github/workflows/scripts/run_tests_go.sh
Expand All @@ -90,6 +99,9 @@ jobs:
toolchain: stable
default: true
- uses: actions/checkout@v3
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Run tests nix
timeout-minutes: 30
run: .github/workflows/scripts/run_tests_rust.sh
Expand All @@ -108,7 +120,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Build and publish the python wheel
Expand All @@ -132,7 +144,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Build and publish the python wheel
Expand Down
18 changes: 15 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ jobs:
os: [ubuntu-22.04, macos-12]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Run tests nix
timeout-minutes: 60
run: .github/workflows/scripts/run_tests_core.sh
Expand All @@ -101,6 +104,9 @@ jobs:
os: [ubuntu-22.04, macos-12]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Run tests nix
timeout-minutes: 60
run: .github/workflows/scripts/run_tests_js.sh
Expand All @@ -116,7 +122,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Run tests nix
Expand All @@ -132,16 +138,19 @@ jobs:
strategy:
matrix:
os: [ubuntu-22.04, macos-12]
golang-version: ['1.17', '1.18', '1.19']
golang-version: ['1.19', '1.20', '1.21']
steps:
- name: Set up Golang ${{ matrix.golang-version }}
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.golang-version }}
id: go
- name: Install Go dependencies
run: go install golang.org/x/lint/golint@latest
- uses: actions/checkout@v3
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Run tests nix
timeout-minutes: 30
run: .github/workflows/scripts/run_tests_go.sh
Expand All @@ -162,6 +171,9 @@ jobs:
toolchain: stable
default: true
- uses: actions/checkout@v3
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Run tests nix
timeout-minutes: 30
run: .github/workflows/scripts/run_tests_rust.sh
8 changes: 8 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# Version 2.0.2

Chore:

- Update to use Bazel 6.4.0
- Updated some of the Bazel dependencies for Golang and Python
- Updated CI/CD to use python 3.10 for Bazel to work correctly.

# Version 2.0.1

Feat:
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,14 @@ load("@org_openmined_psi//private_set_intersection:deps.bzl", "psi_deps")
psi_deps()
load("@rules_python//python:pip.bzl", "pip_parse")
pip_parse(
name = "pip_deps",
# Generated via pip-compile requirements.in
requirements_lock = "@org_openmined_psi//private_set_intersection/python:requirements.txt",
)
load("@pip_deps//:requirements.bzl", "install_deps")
install_deps()
Expand Down
8 changes: 8 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ load("@org_openmined_psi//private_set_intersection:deps.bzl", "psi_deps")
psi_deps()

# Finish python setup
load("@rules_python//python:pip.bzl", "pip_parse")

pip_parse(
name = "pip_deps",
# Generated via pip-compile requirements.in
requirements_lock = "@org_openmined_psi//private_set_intersection/python:requirements.txt",
)

load("@pip_deps//:requirements.bzl", "install_deps")

install_deps()
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openmined/psi.js",
"version": "2.0.1",
"version": "2.0.2",
"description": "Private Set Intersection for JavaScript",
"repository": {
"type": "git",
Expand Down
8 changes: 1 addition & 7 deletions private_set_intersection/deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ load("@build_bazel_rules_nodejs//:repositories.bzl", "build_bazel_rules_nodejs_d

# load("@rules_python//python/pip_install:repositories.bzl", "pip_install_dependencies")
load("@pybind11_bazel//:python_configure.bzl", "python_configure")
load("@rules_python//python:pip.bzl", "pip_parse")

def psi_deps():
# General dependencies.
Expand Down Expand Up @@ -108,11 +107,6 @@ def psi_deps():
python_configure(
name = "local_config_python",
)
pip_parse(
name = "pip_deps",
# Generated via pip-compile requirements.in
requirements_lock = "//private_set_intersection/python:requirements.txt",
)

# Protobuf.
rules_proto_grpc_repos()
Expand All @@ -125,7 +119,7 @@ def psi_deps():
# Golang.
go_rules_dependencies()

go_register_toolchains(version = "1.19")
go_register_toolchains(version = "1.21.6")

rules_pkg_dependencies()

Expand Down
11 changes: 6 additions & 5 deletions private_set_intersection/preload.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,20 @@ def psi_preload():
if "io_bazel_rules_go" not in native.existing_rules():
http_archive(
name = "io_bazel_rules_go",
sha256 = "dd926a88a564a9246713a9c00b35315f54cbd46b31a26d5d8fb264c07045f05d",
sha256 = "de7974538c31f76658e0d333086c69efdf6679dbc6a466ac29e65434bf47076d",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.38.1/rules_go-v0.38.1.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.38.1/rules_go-v0.38.1.zip",
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.45.0/rules_go-v0.45.0.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.45.0/rules_go-v0.45.0.zip",
],
)

if "bazel_gazelle" not in native.existing_rules():
http_archive(
name = "bazel_gazelle",
sha256 = "448e37e0dbf61d6fa8f00aaa12d191745e14f07c31cabfa731f0c8e8a4f41b97",
sha256 = "32938bda16e6700063035479063d9d24c60eda8d79fd4739563f50d331cb3209",
urls = [
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.28.0/bazel-gazelle-v0.28.0.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.35.0/bazel-gazelle-v0.35.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.35.0/bazel-gazelle-v0.35.0.tar.gz",
],
)

Expand Down
2 changes: 1 addition & 1 deletion private_set_intersection/python/BUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
load("@pip_deps//:requirements.bzl", "requirement")
load("@pybind11_bazel//:build_defs.bzl", "pybind_extension")
load("@rules_python//python:packaging.bzl", "py_package", "py_wheel")
load("//tools:package.bzl", "VERSION_LABEL")
load("@pip_deps//:requirements.bzl", "requirement")

package(default_visibility = ["//visibility:public"])

Expand Down
2 changes: 1 addition & 1 deletion tools/package.bzl
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
""" Version of the current release """
VERSION_LABEL = "2.0.1"
VERSION_LABEL = "2.0.2"

0 comments on commit 09a59f9

Please sign in to comment.