chore: view example of LP provider (market maker) (#94) #22
Workflow file for this run
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: Release · Build & Package Python SDK | |
| on: | |
| # Run whenever you push a tag like v1.2.3 | |
| push: | |
| tags: | |
| - 'v*.*.*' | |
| # Also allow manual re-runs | |
| workflow_dispatch: | |
| permissions: write-all | |
| jobs: | |
| build: | |
| name: Build wheels on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| python-version: ['3.12'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Fetch all history for setuptools_scm to detect version from git tags | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: '1.24.1' | |
| - name: Install gopy & goimports | |
| run: | | |
| go install github.com/go-python/gopy@v0.4.10 | |
| go install golang.org/x/tools/cmd/goimports@latest | |
| echo "$HOME/go/bin" >> $GITHUB_PATH | |
| shell: bash | |
| - name: Install system dependencies (Linux) | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential | |
| export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:. | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install build tools | |
| run: | | |
| python3 -m pip install --upgrade pip setuptools wheel pybindgen build setuptools-scm | |
| - name: Build gopy bindings | |
| run: make gopy_build | |
| shell: bash | |
| - name: Build wheels | |
| run: python -m build --wheel --outdir wheelhouse | |
| - name: Upload wheels as artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: wheels-${{ matrix.os }} | |
| path: wheelhouse/*.whl | |
| publish: | |
| name: Publish Wheels to Release | |
| needs: build | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download all built wheels | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: wheels-* | |
| merge-multiple: true | |
| path: dist/ | |
| - name: Publish GitHub Release with Wheels | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: dist/*.whl | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |