File tree Expand file tree Collapse file tree 5 files changed +89
-115
lines changed Expand file tree Collapse file tree 5 files changed +89
-115
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ ---
2+ name : Ubuntu build - buf edition
3+ on : [push]
4+ jobs :
5+
6+ build :
7+ runs-on : ubuntu-22.04
8+ permissions :
9+ contents : write
10+
11+ strategy :
12+ fail-fast : true
13+ matrix :
14+ go-version : [1.24.x]
15+ python3_version : [ "3.11", "3.12" ]
16+
17+ steps :
18+ - uses : actions/checkout@v4
19+
20+ - name : Setup Go
21+ uses : actions/setup-go@v4
22+ with :
23+ go-version : ${{ matrix.go-version }}
24+ cache-dependency-path : go.sum
25+
26+ # - name: Set up Python
27+ # uses: actions/setup-python@v4
28+ # with:
29+ # python-version: ${{ matrix.python3_version }}
30+
31+ - name : Install the latest version of uv
32+ uses : astral-sh/setup-uv@v6
33+ with :
34+ version : " latest"
35+ python-version : ${{ matrix.python3_version }}
36+
37+ # Download a release like https://github.com/bufbuild/buf/releases/download/v1.53.0/buf-Linux-x86_64
38+ - name : Install buf
39+ run : |
40+ BUF_VERSION="1.53.0"
41+ BUF_URL="https://github.com/bufbuild/buf/releases/download/v1.53.0/buf-Linux-x86_64"
42+ curl -sSL "$BUF_URL" -o /usr/local/bin/buf
43+ chmod +x /usr/local/bin/buf
44+
45+ - name : Add buf to PATH
46+ run : echo "/usr/local/bin" >> $GITHUB_PATH
47+
48+ - name : Check buf version
49+ run : buf --version
50+
51+ - name : Build using 'uv_buf_build_script.sh'
52+ run : |
53+ cd build-scripts/
54+ chmod +x ./uv_buf_build_script.sh
55+ ./uv_buf_build_script.sh
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ from setuptools import setup , find_packages
2+
3+ setup (
4+ name = "otdf_python" ,
5+ version = "0.2.11" ,
6+ author = "b-long" ,
7+ 8+ description = "Buf generated SDK for OpenTDF" ,
9+ packages = find_packages ("gen" ),
10+ package_dir = {"" : "gen" },
11+ )
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3+ # Based on the excellent work of the sift-stack team:
4+ # https://github.com/sift-stack/sift/blob/main/docs/python.md
35set -x
46set -eou pipefail
57
@@ -64,3 +66,24 @@ git clone --depth 1 https://github.com/opentdf/platform.git
6466
6567cd platform || { echo " Unable to change to platform directory" ; exit 1; }
6668buf export --output=$BUILD_ROOT /protos --config buf.yaml
69+
70+ cd $SCRIPT_DIR || { echo " Unable to change to script directory" ; exit 1; }
71+ cp buf.gen.python.yaml $BUILD_ROOT /buf.gen.yaml
72+ cp setup.py $BUILD_ROOT /setup.py
73+
74+ cd " ${BUILD_ROOT} " || { echo " Unable to change to build root directory" ; exit 1; }
75+ buf generate protos || { echo " buf generate failed" ; exit 1; }
76+
77+ for dir in $( find gen -type d) ; do
78+ touch $dir /__init__.py
79+ done
80+
81+ pip install build protobuf grpcio
82+ python -m build --sdist || { echo " Failed to build source distribution" ; exit 1; }
83+ python -m build --wheel || { echo " Failed to build wheel distribution" ; exit 1; }
84+
85+ echo " Build completed successfully."
86+ echo " Directory contents:"
87+ ls -lart
88+ echo " Dist directory contents:"
89+ ls -lart dist/
You can’t perform that action at this time.
0 commit comments