Repository navigation
0.1.5-pre: mnemonic verify, explicit-buffer tx variants, version bump #26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and upload to PyPI | |
| # Build on every branch push, tag push, and pull request change: | |
| on: [push, pull_request] | |
| jobs: | |
| build_wheels: | |
| name: Build wheels on ${{ matrix.archs }} for ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| name: | |
| - armhf-linux | |
| - aarch64-linux | |
| - x86_64-linux-dbg | |
| - x86_64-macos | |
| - aarch64-macos | |
| - x86_64-win | |
| - i686-win | |
| - i686-linux | |
| include: | |
| - name: armhf-linux | |
| host: arm-linux-gnueabihf | |
| os: ubuntu-22.04 | |
| arch: arm32v7 | |
| - name: aarch64-linux | |
| host: aarch64-linux-gnu | |
| os: ubuntu-22.04 | |
| arch: arm64v8 | |
| - name: x86_64-linux-dbg | |
| host: x86_64-pc-linux-gnu | |
| os: ubuntu-22.04 | |
| arch: amd64 | |
| - name: i686-linux | |
| host: i686-pc-linux-gnu | |
| os: ubuntu-22.04 | |
| arch: i386 | |
| - name: x86_64-macos | |
| host: x86_64-apple-darwin15 | |
| os: macos-latest | |
| arch: amd64 | |
| - name: aarch64-macos | |
| host: aarch64-apple-darwin | |
| os: macos-latest | |
| arch: arm64 | |
| - name: x86_64-win | |
| host: x86_64-w64-mingw32 | |
| os: windows-latest | |
| arch: amd64 | |
| plat-name: amd64 | |
| - name: i686-win | |
| host: i686-w64-mingw32 | |
| os: windows-latest | |
| arch: i386 | |
| plat-name: win32 | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| HOMEBREW_NO_REQUIRE_TAP_TRUST: 1 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Set up QEMU | |
| if: runner.os == 'Linux' | |
| uses: docker/setup-qemu-action@v4 | |
| with: | |
| platforms: all | |
| - name: Set up Docker Buildx | |
| if: runner.os == 'Linux' | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Build wheels for ${{ matrix.host }} | |
| if: runner.os == 'Linux' | |
| run: | | |
| ./bin/dist --host=${{ matrix.host }} | |
| # docker buildx build \ | |
| # -t xanimo/python-libdogecoin:${{ matrix.arch }} \ | |
| # --build-arg FLAVOR=${FLAVOR:-"bullseye"} \ | |
| # --build-arg ARCH=${{ matrix.arch }} \ | |
| # --build-arg TARGET_HOST=${{ matrix.host }} \ | |
| # --target artifact \ | |
| # --output type=local,dest=. . | |
| - name: Setup WSL | |
| if: runner.os == 'Windows' | |
| uses: Vampire/setup-wsl@v7.0.0 | |
| - uses: actions/setup-python@v6 | |
| if: runner.os != 'Linux' && runner.os != 'Windows' | |
| name: Install Python | |
| with: | |
| python-version: '3.10' | |
| - name: Install Python build dependencies (macOS) | |
| if: runner.os == 'macOS' | |
| run: pip install --upgrade cffi setuptools build requests pytest wheel | |
| - name: Build wheels for ${{ matrix.host }} | |
| if: runner.os == 'Windows' | |
| shell: wsl-bash {0} | |
| run: | | |
| mkdir -p ./wheels | |
| bash ./bin/init --arch=${{ matrix.plat-name }} | |
| - name: Build wheels for ${{ matrix.host }} | |
| if: matrix.host == 'x86_64-apple-darwin15' | |
| env: | |
| CC: clang -arch x86_64 | |
| CXX: clang++ -arch x86_64 | |
| ARCHFLAGS: -arch x86_64 | |
| _PYTHON_HOST_PLATFORM: macosx-10.9-x86_64 | |
| run: | | |
| mkdir -p wheels | |
| python fetch.py --host=${{ matrix.host }} | |
| python -m build -w | |
| cp ./dist/*.whl ./wheels | |
| - name: Build wheels for ${{ matrix.host }} | |
| if: matrix.host == 'aarch64-apple-darwin' | |
| run: | | |
| brew install autoconf automake libtool | |
| mkdir -p wheels | |
| python fetch.py --host=${{ matrix.host }} --source | |
| python -m build -w | |
| cp ./dist/*.whl ./wheels | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: wheels-${{ matrix.name }} | |
| path: ./wheels/*.whl | |
| build_sdist: | |
| name: Build source distribution | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-python@v6 | |
| name: Install Python | |
| with: | |
| python-version: '3.10' | |
| - run: pip install --upgrade pip cffi setuptools build | |
| - name: Build sdist | |
| run: | | |
| mkdir -p wheels | |
| python -m build -s | |
| cp dist/*.tar.gz ./wheels | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: sdist | |
| path: wheels/*.tar.gz | |
| ci_gate: | |
| name: CI gate — all targets must pass | |
| needs: [build_wheels, build_sdist] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - run: echo "All CI targets passed." | |
| upload_pypi: | |
| needs: [ci_gate] | |
| runs-on: ubuntu-latest | |
| # upload to PyPI on every tag starting with 'v' | |
| if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') | |
| # Trusted Publishing: PyPI verifies this workflow's OIDC identity, so no | |
| # long-lived API token is stored. Requires a one-time publisher config on | |
| # PyPI (project settings -> Publishing) naming this repo + workflow. | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/project/libdogecoin/ | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| pattern: wheels-* | |
| merge-multiple: true | |
| path: dist | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| name: sdist | |
| path: dist | |
| - uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| verbose: true | |
| print-hash: true |