Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-golang-macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ jobs:

# - uses: ./.github/workflows/platform-integration-test.yaml
# with:
# wheel: dist/otdf_python-0.2.0-py3-none-any.whl
# wheel: dist/otdf_python-0.2.1-py3-none-any.whl
6 changes: 3 additions & 3 deletions .github/workflows/build-golang-ubuntu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ jobs:

- uses: actions/cache/restore@v4
with:
path: dist/otdf_python-0.2.0-py3-none-any.whl
path: dist/otdf_python-0.2.1-py3-none-any.whl
key: ${{ runner.os }}${{ matrix.python3_version }}-data-${{ github.sha }}

- uses: actions/cache/save@v4
with:
path: dist/otdf_python-0.2.0-py3-none-any.whl
path: dist/otdf_python-0.2.1-py3-none-any.whl
key: ${{ runner.os }}${{ matrix.python3_version }}-data-${{ github.sha }}
restore-keys: |
${{ runner.os }}${{ matrix.python3_version }}-data-
Expand All @@ -61,5 +61,5 @@ jobs:
needs: build
uses: ./.github/workflows/platform-integration-test.yaml
with:
wheel: dist/otdf_python-0.2.0-py3-none-any.whl
wheel: dist/otdf_python-0.2.1-py3-none-any.whl
python_version: ${{ matrix.python3_version }}
4 changes: 2 additions & 2 deletions .github/workflows/platform-integration-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

- uses: actions/cache/restore@v4
with:
path: dist/otdf_python-0.2.0-py3-none-any.whl
path: dist/otdf_python-0.2.1-py3-none-any.whl
key: ${{ runner.os }}${{ inputs.python_version }}-data-${{ github.sha }}

- name: Prove that the input file is available
Expand All @@ -52,7 +52,7 @@ jobs:
- name: Set up go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
with:
go-version: "1.22.3"
go-version: "1.22.x"
check-latest: false
cache-dependency-path: |
platform/service/go.sum
Expand Down
59 changes: 43 additions & 16 deletions .github/workflows/publish-test.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: TestPyPIBuild

# Based on https://github.com/tuananh/py-event-ruler/blob/0129d15e17d0023863a4d0e0e25e5256988b5c5b/.github/workflows/publish.yml
# Based on:
# - https://github.com/tuananh/py-event-ruler/blob/0129d15e17d0023863a4d0e0e25e5256988b5c5b/.github/workflows/publish.yml
# - https://github.com/adhadse/excelFormExtractor/blob/1f82a97808b3cf3cdb25dcefdc1c6a1c74c5ad45/.github/workflows/build.yaml


on:
Expand Down Expand Up @@ -79,9 +81,9 @@ jobs:
name: wheels-macos${{ matrix.os_version }}-py3${{ matrix.python3_version }}-${{ matrix.arch_cibw_go[0] }}
path: ./wheelhouse/*.whl

build_linux:
build_linux_x86_64:
# if: false
name: Linux Python 3.x
name: Linux Python x86_64
runs-on: ubuntu-latest

steps:
Expand All @@ -92,14 +94,6 @@ jobs:
rm -rf poetry.lock pyproject.toml
cp setup_ci.py setup.py

# QEMU is used by cibuildwheel to cross-compile wheels
# https://cibuildwheel.pypa.io/en/stable/faq/#emulation
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v3
with:
platforms: all

- name: Build wheels
uses: pypa/[email protected]
env:
Expand All @@ -109,7 +103,7 @@ jobs:
CIBW_ENVIRONMENT: >
PATH=$PATH:/usr/local/go/bin
CIBW_BEFORE_ALL_LINUX: |
curl -o go.tar.gz https://dl.google.com/go/go1.22.5.linux-amd64.tar.gz
curl -o go.tar.gz https://dl.google.com/go/go1.22.7.linux-amd64.tar.gz
tar -C /usr/local -xzf go.tar.gz
go install github.com/go-python/[email protected]
go install golang.org/x/tools/cmd/goimports@latest
Expand All @@ -124,19 +118,51 @@ jobs:
# # Test wheel functionality
# python3 validate_otdf_python.py

- name: Upload atifacts
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: wheels-linux-amd64
path: ./wheelhouse/*.whl

build_linux_arm:
name: Linux Python ARM
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup project files
run: |
rm -rf poetry.lock pyproject.toml
cp setup_ci.py setup.py

# QEMU is used by cibuildwheel to cross-compile wheels
# https://cibuildwheel.pypa.io/en/stable/faq/#emulation
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v3
with:
platforms: all

- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD: "cp3*_aarch64"
CIBW_SKIP: "cp36-* cp37-* cp38-* cp39-* cp310-* cp313-* *-musllinux_x86_64"
CIBW_ARCHS: "aarch64"
CIBW_ENVIRONMENT: >
PATH=$PATH:/usr/local/go/bin
CIBW_BEFORE_ALL_LINUX: |
curl -o go.tar.gz https://dl.google.com/go/go1.22.7.linux-arm64.tar.gz
tar -C /usr/local -xzf go.tar.gz
go install github.com/go-python/[email protected]
go install golang.org/x/tools/cmd/goimports@latest

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: wheels-linux-arm
path: /tmp/output/*.whl

# build_windows:
# if: false # not working
# name: Windows 310,311 x86_64
Expand Down Expand Up @@ -183,9 +209,10 @@ jobs:
contents: write
# This permission is mandatory for PyPI's trusted publishing
id-token: write
needs: [build_macos, build_linux]
needs: [build_macos, build_linux_x86_64, build_linux_arm]
runs-on: ubuntu-latest
# if: github.ref == 'refs/heads/main'
# If branch is 'develop'
if: github.ref == 'refs/heads/develop'

steps:
- uses: actions/checkout@v4
Expand Down
59 changes: 43 additions & 16 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: PyPIBuild

# Based on https://github.com/tuananh/py-event-ruler/blob/0129d15e17d0023863a4d0e0e25e5256988b5c5b/.github/workflows/publish.yml
# Based on:
# - https://github.com/tuananh/py-event-ruler/blob/0129d15e17d0023863a4d0e0e25e5256988b5c5b/.github/workflows/publish.yml
# - https://github.com/adhadse/excelFormExtractor/blob/1f82a97808b3cf3cdb25dcefdc1c6a1c74c5ad45/.github/workflows/build.yaml


on:
Expand Down Expand Up @@ -79,9 +81,9 @@ jobs:
name: wheels-macos${{ matrix.os_version }}-py3${{ matrix.python3_version }}-${{ matrix.arch_cibw_go[0] }}
path: ./wheelhouse/*.whl

build_linux:
build_linux_x86_64:
# if: false
name: Linux Python 3.x
name: Linux Python x86_64
runs-on: ubuntu-latest

steps:
Expand All @@ -92,14 +94,6 @@ jobs:
rm -rf poetry.lock pyproject.toml
cp setup_ci.py setup.py

# QEMU is used by cibuildwheel to cross-compile wheels
# https://cibuildwheel.pypa.io/en/stable/faq/#emulation
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v3
with:
platforms: all

- name: Build wheels
uses: pypa/[email protected]
env:
Expand All @@ -109,7 +103,7 @@ jobs:
CIBW_ENVIRONMENT: >
PATH=$PATH:/usr/local/go/bin
CIBW_BEFORE_ALL_LINUX: |
curl -o go.tar.gz https://dl.google.com/go/go1.22.5.linux-amd64.tar.gz
curl -o go.tar.gz https://dl.google.com/go/go1.22.7.linux-amd64.tar.gz
tar -C /usr/local -xzf go.tar.gz
go install github.com/go-python/[email protected]
go install golang.org/x/tools/cmd/goimports@latest
Expand All @@ -124,19 +118,51 @@ jobs:
# # Test wheel functionality
# python3 validate_otdf_python.py

- name: Upload atifacts
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: wheels-linux-amd64
path: ./wheelhouse/*.whl

build_linux_arm:
name: Linux Python ARM
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup project files
run: |
rm -rf poetry.lock pyproject.toml
cp setup_ci.py setup.py

# QEMU is used by cibuildwheel to cross-compile wheels
# https://cibuildwheel.pypa.io/en/stable/faq/#emulation
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v3
with:
platforms: all

- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD: "cp3*_aarch64"
CIBW_SKIP: "cp36-* cp37-* cp38-* cp39-* cp310-* cp313-* *-musllinux_x86_64"
CIBW_ARCHS: "aarch64"
CIBW_ENVIRONMENT: >
PATH=$PATH:/usr/local/go/bin
CIBW_BEFORE_ALL_LINUX: |
curl -o go.tar.gz https://dl.google.com/go/go1.22.7.linux-arm64.tar.gz
tar -C /usr/local -xzf go.tar.gz
go install github.com/go-python/[email protected]
go install golang.org/x/tools/cmd/goimports@latest

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: wheels-linux-arm
path: /tmp/output/*.whl

# build_windows:
# if: false # not working
# name: Windows 310,311 x86_64
Expand Down Expand Up @@ -183,9 +209,10 @@ jobs:
contents: write
# This permission is mandatory for PyPI's trusted publishing
id-token: write
needs: [build_macos, build_linux]
needs: [build_macos, build_linux_x86_64, build_linux_arm]
runs-on: ubuntu-latest
# if: github.ref == 'refs/heads/main'
# If branch is 'main'
if: github.ref == 'refs/heads/main'

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion build-scripts/ci-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ gopy build --output=otdf_python -vm=python3 .

poetry run python3 setup.py bdist_wheel

pip install dist/otdf_python-0.2.0-py3-none-any.whl
pip install dist/otdf_python-0.2.1-py3-none-any.whl
2 changes: 1 addition & 1 deletion build-scripts/make_and_validate_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ python3 -m pip install --upgrade setuptools wheel
python3 setup.py bdist_wheel

# Prove that the wheel can be installed
pip install dist/otdf_python-0.2.0-py3-none-any.whl
pip install dist/otdf_python-0.2.1-py3-none-any.whl

if [[ "$SKIP_TESTS" == "-s" || "$SKIP_TESTS" == "--skip-tests" ]]; then
echo "Build is complete, skipping tests."
Expand Down
2 changes: 1 addition & 1 deletion build-scripts/uv_make_and_validate_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ loud_print "Installing wheel"
uv venv .venv-wheel --python 3.12 "$PY_TYPE"
source "${BUILD_ROOT}/.venv-wheel/bin/activate"
pip install pybindgen
pip install dist/otdf_python-0.2.0-py3-none-any.whl
pip install dist/otdf_python-0.2.1-py3-none-any.whl

if [[ "$SKIP_TESTS" == "-s" || "$SKIP_TESTS" == "--skip-tests" ]]; then
echo "Build is complete, skipping tests."
Expand Down
33 changes: 13 additions & 20 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,39 +7,32 @@ toolchain go1.23.3
require github.com/opentdf/platform/sdk v0.3.21

require (
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.35.2-20240920164238-5a7b106cbb87.1 // indirect
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.1-20241127180247-a33202765966.1 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect
github.com/go-python/gopy v0.4.10 // indirect
github.com/goccy/go-json v0.10.3 // indirect
github.com/gonuts/commander v0.1.0 // indirect
github.com/gonuts/flag v0.1.0 // indirect
github.com/goccy/go-json v0.10.4 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gowebpki/jcs v1.0.1 // indirect
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.23.0 // indirect
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.2.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.25.1 // indirect
github.com/lestrrat-go/blackmagic v1.0.2 // indirect
github.com/lestrrat-go/httpcc v1.0.1 // indirect
github.com/lestrrat-go/httprc v1.0.6 // indirect
github.com/lestrrat-go/iter v1.0.2 // indirect
github.com/lestrrat-go/jwx/v2 v2.1.2 // indirect
github.com/lestrrat-go/jwx/v2 v2.1.3 // indirect
github.com/lestrrat-go/option v1.0.1 // indirect
github.com/opentdf/platform/lib/ocrypto v0.1.7 // indirect
github.com/opentdf/platform/protocol/go v0.2.22 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/segmentio/asm v1.2.0 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
golang.org/x/crypto v0.29.0 // indirect
golang.org/x/mod v0.22.0 // indirect
golang.org/x/net v0.31.0 // indirect
golang.org/x/crypto v0.31.0 // indirect
golang.org/x/net v0.33.0 // indirect
golang.org/x/oauth2 v0.24.0 // indirect
golang.org/x/sync v0.9.0 // indirect
golang.org/x/sys v0.27.0 // indirect
golang.org/x/text v0.20.0 // indirect
golang.org/x/tools v0.27.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20241118233622-e639e219e697 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241118233622-e639e219e697 // indirect
google.golang.org/grpc v1.68.0 // indirect
google.golang.org/protobuf v1.35.2 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/text v0.21.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20241230172942-26aa7a208def // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241230172942-26aa7a208def // indirect
google.golang.org/grpc v1.69.2 // indirect
google.golang.org/protobuf v1.36.1 // indirect
)
Loading
Loading