Skip to content

Commit 88398fb

Browse files
committed
add wheel building action
1 parent ea747bd commit 88398fb

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

.github/workflows/wheels.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Build
2+
3+
on: [push, pull_request, workflow_dispatch] # this is just for testing
4+
# push:
5+
# branches:
6+
# - main
7+
# # Release branches
8+
# - "sdk-core/*"
9+
# pull_request:
10+
# branches:
11+
# - main
12+
# - "sdk-core/*"
13+
# Allow manual triggering of the workflow
14+
# workflow_dispatch:
15+
16+
jobs:
17+
build_wheels:
18+
name: Build wheels for Python SDK on ${{ matrix.os }}
19+
runs-on: ${{ matrix.os }}
20+
strategy:
21+
matrix:
22+
# Macos 13 is an intel runner and macos 14 is an apple silicon runner
23+
os: [ubuntu-22.04, ubuntu-22.04-arm, windows-latest, macos-13, macos-14]
24+
25+
26+
steps:
27+
- uses: actions/checkout@v4
28+
29+
# Need to grab the SDK version for the wheel name
30+
- name: Extract SDK Version
31+
run: echo "SDK_VERSION=$(python -c 'import version; print(version.SDK_VERSION)')" >> $GITHUB_ENV
32+
33+
- name: Setup Python
34+
uses: actions/setup-python@v5
35+
with:
36+
python-version: "3.13"
37+
38+
- name: Build wheels
39+
env:
40+
CIBW_MANYLINUX_X86_64_IMAGE: "manylinux2_32"
41+
CIBW_MANYLINUX_AARCH64_IMAGE: "manylinux2_32"
42+
CIBW_ARCHS: "native"
43+
CIBW_BEFORE_TEST: "pip install pydantic"
44+
CIBW_TEST_COMMAND: "python3 example/example.py"
45+
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.TEST_SERVICE_ACCOUNT_TOKEN }}
46+
47+
uses: pypa/[email protected]
48+
49+
- uses: actions/upload-artifact@v4
50+
with:
51+
name: onepassword-sdk-${{ env.SDK_VERSION }}-${{ matrix.os }}-${{ strategy.job-index }}
52+
path: ./wheelhouse/*.whl

0 commit comments

Comments
 (0)