diff --git a/.github/workflows/publish-python.yaml b/.github/workflows/publish-python.yaml index df90a97..e6a8cd9 100644 --- a/.github/workflows/publish-python.yaml +++ b/.github/workflows/publish-python.yaml @@ -30,16 +30,14 @@ jobs: - name: "Configure Git safe directory" run: git config --global --add safe.directory /__w/bdk-python/bdk-python - - name: "Install Rust 1.84.1" - uses: actions-rs/toolchain@v1 - with: - toolchain: 1.84.1 - + - 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: pip 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, @@ -53,7 +51,7 @@ jobs: build-macos-arm64-wheels: name: "Build macOS arm64 wheel" - runs-on: macos-13 + runs-on: macos-15 strategy: matrix: python: @@ -74,6 +72,9 @@ jobs: with: python-version: ${{ matrix.python }} + - 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 @@ -93,7 +94,7 @@ jobs: build-macos-x86_64-wheels: name: "Build macOS x86_64 wheel" - runs-on: macos-13 + runs-on: macos-15-intel strategy: matrix: python: @@ -114,6 +115,9 @@ jobs: with: python-version: ${{ matrix.python }} + - 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 @@ -152,6 +156,9 @@ jobs: with: python-version: ${{ matrix.python }} + - name: "Set up Rust" + uses: actions-rust-lang/setup-rust-toolchain@v1 + - name: "Generate bdk.py and binaries" run: bash ./scripts/generate-windows.sh diff --git a/.github/workflows/python-api-docs.yaml b/.github/workflows/python-api-docs.yaml index 560cffe..9c05f1e 100644 --- a/.github/workflows/python-api-docs.yaml +++ b/.github/workflows/python-api-docs.yaml @@ -19,33 +19,31 @@ jobs: - name: "Configure Git safe directory" run: git config --global --add safe.directory /__w/bdk-python/bdk-python - - - name: "Install Rust 1.84.1" - uses: actions-rs/toolchain@v1 - with: - toolchain: 1.84.1 - name: Set up Python uses: actions/setup-python@v5 with: python-version: "3.12" + - name: "Set up Rust" + uses: actions-rust-lang/setup-rust-toolchain@v1 + - name: "Generate bdk.py" env: PYBIN: ${{ env.pythonLocation }}/bin run: bash ./scripts/generate-linux.sh - name: "Install Sphinx and Theme" - run: pip install sphinx sphinx_rtd_theme + run: pip3 install sphinx sphinx_rtd_theme - name: "Generate python API Documentation" - run: python ./docs/generate_docs.py + run: python3 ./docs/generate_docs.py - name: "Build HTML Documentation" - run: python -m sphinx -b html -W --keep-going docs/source docs/_build/html + run: python3 -m sphinx -b html -W --keep-going docs/source docs/_build/html - name: "Upload API Docs" uses: actions/upload-artifact@v4 with: name: artifact-bdkpython-api-docs - path: /home/runner/work/bdk-python/bdk-python/docs/_build/html \ No newline at end of file + path: /home/runner/work/bdk-python/bdk-python/docs/_build/html diff --git a/.github/workflows/test-bdk-ffi-latest.yaml b/.github/workflows/test-bdk-ffi-latest.yaml index 3a628b1..0e12728 100644 --- a/.github/workflows/test-bdk-ffi-latest.yaml +++ b/.github/workflows/test-bdk-ffi-latest.yaml @@ -34,6 +34,9 @@ jobs: - name: "Configure Git safe directory" run: git config --global --add safe.directory /__w/bdk-python/bdk-python + - name: "Set up Rust" + uses: actions-rust-lang/setup-rust-toolchain@v1 + - name: "Update bdk-ffi submodule to latest" run: | cd ./bdk-ffi/ \ @@ -50,11 +53,6 @@ jobs: ~/.cargo/git ./target key: ${{ runner.os }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }} - - - name: "Setup Rust" - uses: actions-rust-lang/setup-rust-toolchain@v1.15.0 - with: - toolchain: 1.85.1 - name: "Generate bdk.py and binaries" run: bash ./scripts/generate-linux.sh @@ -73,7 +71,7 @@ jobs: test-bdk-ffi-latest-macos-arm64-wheels: name: "Build and run unittest on macOS arm64 wheels against the latest commit on bdk-ffi" - runs-on: macos-14 + runs-on: macos-15 strategy: matrix: python: @@ -97,14 +95,8 @@ jobs: && git pull origin master \ && echo "Testing commit: $(git log -1 --pretty=format:'%h %s (author: %cn)')" - - name: "Cache" - uses: actions/cache@v3 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - ./target - key: ${{ runner.os }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }} + - name: "Set up Rust" + uses: actions-rust-lang/setup-rust-toolchain@v1 - name: "Install Python" uses: actions/setup-python@v4 @@ -154,14 +146,8 @@ jobs: && git pull origin master \ && echo "Testing commit: $(git log -1 --pretty=format:'%h %s (author: %cn)')" - - name: "Cache" - uses: actions/cache@v3 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - ./target - key: ${{ runner.os }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }} + - name: "Set up Rust" + uses: actions-rust-lang/setup-rust-toolchain@v1 - uses: actions/setup-python@v4 with: @@ -208,14 +194,8 @@ jobs: git pull origin master; echo "Testing commit: $(git log -1 --pretty=format:'%h %s (author: %cn)')" - - name: "Cache" - uses: actions/cache@v3 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - ./target - key: ${{ runner.os }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }} + - name: "Set up Rust" + uses: actions-rust-lang/setup-rust-toolchain@v1 - name: "Install Python" uses: actions/setup-python@v4 diff --git a/.github/workflows/test-python.yaml b/.github/workflows/test-python.yaml index 04aa17b..1a5dc05 100644 --- a/.github/workflows/test-python.yaml +++ b/.github/workflows/test-python.yaml @@ -31,12 +31,10 @@ jobs: - name: "Configure Git safe directory" run: git config --global --add safe.directory /__w/bdk-python/bdk-python - - - name: "Install Rust 1.84.1" - uses: actions-rs/toolchain@v1 - with: - toolchain: 1.84.1 + - name: "Set up Rust" + uses: actions-rust-lang/setup-rust-toolchain@v1 + - name: "Generate bdk.py and binaries" run: bash ./scripts/generate-linux.sh @@ -60,7 +58,7 @@ jobs: build-macos-arm64-wheels: name: "Build and test macOS arm64 wheels" - runs-on: macos-13 + runs-on: macos-15 strategy: matrix: python: @@ -80,7 +78,10 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python }} - + + - 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 @@ -93,10 +94,10 @@ jobs: run: python3 -m build --wheel --config-setting=--build-option=--plat-name=macosx_11_0_arm64 --verbose # You can't install the arm64 wheel on the CI, so we skip these steps and simply test that the wheel builds - # - name: "Install wheel and run tests" - # run: | - # pip3 install ./dist/*.whl - # python3 -m unittest discover --start "./tests/" --pattern "test_offline_*.py" --verbose + - name: "Install wheel and run tests" + run: | + pip3 install ./dist/*.whl + python3 -m unittest discover --start "./tests/" --pattern "test_offline_*.py" --verbose - name: "Upload artifact test" uses: actions/upload-artifact@v4 @@ -106,7 +107,7 @@ jobs: build-macos-x86_64-wheels: name: "Build and test macOS x86_64 wheels" - runs-on: macos-13 + runs-on: macos-15-intel strategy: matrix: python: @@ -126,6 +127,9 @@ jobs: with: python-version: ${{ matrix.python }} + - 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 @@ -170,6 +174,9 @@ jobs: with: python-version: ${{ matrix.python }} + - name: "Set up Rust" + uses: actions-rust-lang/setup-rust-toolchain@v1 + - name: "Generate bdk.py and binaries" run: bash ./scripts/generate-windows.sh