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
44 changes: 22 additions & 22 deletions .github/workflows/publish-python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,24 @@ jobs:
- name: "Configure Git safe directory"
run: git config --global --add safe.directory /__w/bdk-python/bdk-python

- name: "Install uv"
uses: astral-sh/setup-uv@v7

- name: "Set up Rust"
uses: actions-rust-lang/setup-rust-toolchain@v1

- name: "Generate bdk.py and binaries"
run: bash ./scripts/generate-linux.sh

- name: "Install build"
run: ${PYBIN}/pip install build

- name: "Build wheel"
# Specifying the plat-name argument is necessary to build a wheel with the correct name,
# see issue #350 for more information
run: ${PYBIN}/python -m build --wheel --config-setting=--build-option=--plat-name=manylinux_2_28_x86_64 --verbose
run: UV_PYTHON=${PYBIN}/python uv build --wheel --config-setting=--build-option=--plat-name=manylinux_2_28_x86_64 --verbose

- uses: actions/upload-artifact@v4
with:
name: bdkpython-manylinux_2_28_x86_64-${{ matrix.python }}
path: /home/runner/work/bdk-python/bdk-python/dist/*.whl
path: dist/*.whl

build-macos-arm64-wheels:
name: "Build macOS arm64 wheel"
Expand All @@ -72,25 +72,25 @@ jobs:
with:
python-version: ${{ matrix.python }}

- name: "Install uv"
uses: astral-sh/setup-uv@v7

- name: "Set up Rust"
uses: actions-rust-lang/setup-rust-toolchain@v1

- name: "Generate bdk.py and binaries"
run: bash ./scripts/generate-macos-arm64.sh

- name: "Install build"
run: pip3 install build

- name: "Build wheel"
# Specifying the plat-name argument is necessary to build a wheel with the correct name,
# see issue #350 for more information
run: python3 -m build --wheel --config-setting=--build-option=--plat-name=macosx_11_0_arm64 --verbose
run: uv build --wheel --config-setting=--build-option=--plat-name=macosx_11_0_arm64 --verbose

- name: "Upload artifacts"
uses: actions/upload-artifact@v4
with:
name: bdkpython-macos-arm64-${{ matrix.python }}
path: /Users/runner/work/bdk-python/bdk-python/dist/*.whl
path: dist/*.whl

build-macos-x86_64-wheels:
name: "Build macOS x86_64 wheel"
Expand All @@ -115,24 +115,24 @@ jobs:
with:
python-version: ${{ matrix.python }}

- name: "Install uv"
uses: astral-sh/setup-uv@v7

- name: "Set up Rust"
uses: actions-rust-lang/setup-rust-toolchain@v1

- name: "Generate bdk.py and binaries"
run: bash ./scripts/generate-macos-x86_64.sh

- name: "Install build"
run: pip3 install build

- name: "Build wheel"
# Specifying the plat-name argument is necessary to build a wheel with the correct name,
# see issue #350 for more information
run: python3 -m build --wheel --config-setting=--build-option=--plat-name=macosx_11_0_x86_64 --verbose
run: uv build --wheel --config-setting=--build-option=--plat-name=macosx_11_0_x86_64 --verbose

- uses: actions/upload-artifact@v4
with:
name: bdkpython-macos-x86_64-${{ matrix.python }}
path: /Users/runner/work/bdk-python/bdk-python/dist/*.whl
path: dist/*.whl

build-windows-wheels:
name: "Build Windows wheel"
Expand All @@ -156,23 +156,23 @@ jobs:
with:
python-version: ${{ matrix.python }}

- name: "Install uv"
uses: astral-sh/setup-uv@v7

- name: "Set up Rust"
uses: actions-rust-lang/setup-rust-toolchain@v1

- name: "Generate bdk.py and binaries"
run: bash ./scripts/generate-windows.sh

- name: "Install build"
run: pip install build

- name: "Build wheel"
run: python -m build --wheel --verbose
run: uv build --wheel --verbose

- name: "Upload artifacts"
uses: actions/upload-artifact@v4
with:
name: bdkpython-win-${{ matrix.python }}
path: D:\a\bdk-python\bdk-python\dist\*.whl
path: dist/*.whl

publish-pypi:
name: "Publish on PyPI"
Expand Down Expand Up @@ -202,4 +202,4 @@ jobs:
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
packages_dir: dist/*/
packages_dir: dist/*/
21 changes: 11 additions & 10 deletions .github/workflows/python-api-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,32 @@ jobs:

- name: "Configure Git safe directory"
run: git config --global --add safe.directory /__w/bdk-python/bdk-python

- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: "Install uv"
uses: astral-sh/setup-uv@v7

- name: "Set up Rust"
uses: actions-rust-lang/setup-rust-toolchain@v1.15.2
with:
cache: true
rust-src-dir: ${{ github.workspace }}/bdk-ffi/bdk-ffi

- name: "Generate bdk.py"
env:
PYBIN: ${{ env.pythonLocation }}/bin
run: bash ./scripts/generate-linux.sh

- name: "Install Sphinx and Theme"
run: pip3 install sphinx sphinx_rtd_theme
- name: "Install docs dependencies"
run: uv sync --frozen --group dev

- name: "Generate python API Documentation"
run: python3 ./docs/generate_docs.py
run: uv run python ./docs/generate_docs.py

- name: "Build HTML Documentation"
run: python3 -m sphinx -b html -W --keep-going docs/source docs/_build/html
run: uv run python -m sphinx -b html -W --keep-going docs/source docs/_build/html

- name: "Upload API Docs"
uses: actions/upload-artifact@v4
Expand All @@ -69,4 +70,4 @@ jobs:
steps:
- name: "Deploy to GitHub Pages"
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v4
62 changes: 31 additions & 31 deletions .github/workflows/test-bdk-ffi-latest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ jobs:
- name: "Configure Git safe directory"
run: git config --global --add safe.directory /__w/bdk-python/bdk-python

- name: "Install uv"
uses: astral-sh/setup-uv@v7

- name: "Set up Rust"
uses: actions-rust-lang/setup-rust-toolchain@v1

Expand All @@ -53,18 +56,15 @@ jobs:
~/.cargo/git
./target
key: ${{ runner.os }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}

- name: "Generate bdk.py and binaries"
run: bash ./scripts/generate-linux.sh

- name: "Install build"
run: ${PYBIN}/pip install build

- name: "Build wheel"
run: ${PYBIN}/python -m build --wheel --config-setting=--build-option=--plat-name=manylinux_2_28_x86_64 --verbose
run: UV_PYTHON=${PYBIN}/python uv build --wheel --config-setting=--build-option=--plat-name=manylinux_2_28_x86_64 --verbose

- name: "Install wheel"
run: ${PYBIN}/pip install ./dist/*.whl
run: uv pip install --system --python ${PYBIN}/python ./dist/*.whl

- name: "Run tests"
run: ${PYBIN}/python -m unittest discover --start "./tests/" --pattern "test_offline_*.py" --verbose
Expand All @@ -86,7 +86,10 @@ jobs:
submodules: recursive
persist-credentials: false
fetch-depth: 0


- name: "Install uv"
uses: astral-sh/setup-uv@v7

- name: "Update bdk-ffi submodule to latest"
run: |
cd ./bdk-ffi/ \
Expand All @@ -106,17 +109,14 @@ jobs:
- name: "Generate bdk.py and binaries"
run: bash ./scripts/generate-macos-arm64.sh

- name: "Install build"
run: pip3 install build

- name: "Build wheel"
# Specifying the plat-name argument is necessary to build a wheel with the correct name,
# see issue #350 for more information
run: python3 -m build --wheel --config-setting=--build-option=--plat-name=macosx_11_0_arm64 --verbose
run: uv build --wheel --config-setting=--build-option=--plat-name=macosx_11_0_arm64 --verbose

- name: "Install wheel"
run: pip3 install ./dist/*.whl
run: uv pip install --system --python python3 ./dist/*.whl

- name: "Run tests"
run: python3 -m unittest discover --start "./tests/" --pattern "test_offline_*.py" --verbose

Expand All @@ -138,6 +138,9 @@ jobs:
persist-credentials: false
fetch-depth: 0

- name: "Install uv"
uses: astral-sh/setup-uv@v7

- name: "Update bdk-ffi submodule to latest"
run: |
cd ./bdk-ffi/ \
Expand All @@ -156,14 +159,11 @@ jobs:
- name: "Generate bdk.py and binaries"
run: bash ./scripts/generate-macos-x86_64.sh

- name: "Install build"
run: pip3 install build

- name: "Build wheel"
run: python3 -m build --wheel --config-setting=--build-option=--plat-name=macosx_11_0_x86_64 --verbose
run: uv build --wheel --config-setting=--build-option=--plat-name=macosx_11_0_x86_64 --verbose

- name: "Install wheel"
run: pip3 install ./dist/*.whl
run: uv pip install --system --python python3 ./dist/*.whl

- name: "Run tests"
run: python3 -m unittest discover --start "./tests/" --pattern "test_offline_*.py" --verbose
Expand All @@ -186,17 +186,20 @@ jobs:
persist-credentials: false
fetch-depth: 0

- name: "Install uv"
uses: astral-sh/setup-uv@v7

- name: "Update bdk-ffi submodule to latest"
run: |
cd ./bdk-ffi/;
git fetch origin;
git checkout master;
git pull origin master;
cd ./bdk-ffi/;
git fetch origin;
git checkout master;
git pull origin master;
echo "Testing commit: $(git log -1 --pretty=format:'%h %s (author: %cn)')"

- name: "Set up Rust"
uses: actions-rust-lang/setup-rust-toolchain@v1

- name: "Install Python"
uses: actions/setup-python@v4
with:
Expand All @@ -205,14 +208,11 @@ jobs:
- name: "Generate bdk.py and binaries"
run: bash ./scripts/generate-windows.sh

- name: "Install build"
run: pip install build

- name: "Build wheel"
run: python -m build --wheel --verbose
run: uv build --wheel --verbose

- name: "Install dependencies"
run: Get-ChildItem 'D:\a\bdk-python\bdk-python\dist\*.whl' | ForEach-Object {pip install $_.FullName}
run: Get-ChildItem 'D:\a\bdk-python\bdk-python\dist\*.whl' | ForEach-Object {uv pip install --system --python python $_.FullName}
shell: powershell

- name: "Run tests"
Expand All @@ -232,8 +232,8 @@ jobs:
- name: "Configure Git safe directory"
run: git config --global --add safe.directory /__w/bdk-python/bdk-python

- name: "Install Ruff"
run: curl -LsSf https://astral.sh/ruff/install.sh | sh
- name: "Install uv"
uses: astral-sh/setup-uv@v7

- name: "Lint test targets"
run: ruff check ./tests/
run: uvx ruff check ./tests/
Loading