Bump version to 0.3.4 #57
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 | |
| on: | |
| push: | |
| branches: [main] | |
| tags: ['v*'] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| lint: | |
| name: Lint and Type Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup tools with mise | |
| uses: jdx/mise-action@v2 | |
| with: | |
| install: true | |
| cache: true | |
| - name: Setup project | |
| run: just ci-setup | |
| - name: Run all checks | |
| run: just check | |
| test: | |
| name: Run Tests | |
| runs-on: ubuntu-latest | |
| needs: lint | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup tools with mise | |
| uses: jdx/mise-action@v2 | |
| with: | |
| install: true | |
| cache: true | |
| - name: Setup project | |
| run: just ci-setup | |
| - name: Run unit tests | |
| run: just test-unit | |
| build-binary: | |
| name: Build binary ${{ matrix.platform }} | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 30 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| platform: linux-x64 | |
| - os: ubuntu-24.04-arm | |
| platform: linux-arm64 | |
| # macOS builds disabled - maplibre_native crate linking issues on macOS | |
| # See: https://github.com/adonm/mlnative/issues | |
| # - os: macos-15 | |
| # platform: darwin-arm64 | |
| # - os: macos-15-large | |
| # platform: darwin-x64 | |
| if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install system dependencies (Linux) | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libcurl4-openssl-dev pkg-config | |
| - name: Setup Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: rust | |
| cache-directories: | | |
| ~/.cargo | |
| - name: Setup tools with mise | |
| uses: jdx/mise-action@v2 | |
| with: | |
| install: true | |
| cache: true | |
| - name: Build binary | |
| run: just ci-build-binary ${{ matrix.platform }} | |
| - name: Upload binary | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: binary-${{ matrix.platform }} | |
| path: mlnative/bin/* | |
| build-wheels: | |
| name: Build platform wheels | |
| needs: build-binary | |
| runs-on: ${{ matrix.os }} | |
| if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| platform: linux-x64 | |
| - os: ubuntu-24.04-arm | |
| platform: linux-arm64 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup tools with mise | |
| uses: jdx/mise-action@v2 | |
| with: | |
| install: true | |
| cache: true | |
| - name: Setup project | |
| run: just ci-setup | |
| - name: Download binary | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: binary-${{ matrix.platform }} | |
| path: mlnative/bin/ | |
| - name: Build platform wheel | |
| run: just ci-build-wheel ${{ matrix.platform }} | |
| - name: Upload wheel | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: wheel-${{ matrix.platform }} | |
| path: dist/*.whl | |
| build-sdist: | |
| name: Build source distribution | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup tools with mise | |
| uses: jdx/mise-action@v2 | |
| with: | |
| install: true | |
| cache: true | |
| - name: Setup project | |
| run: just ci-setup | |
| - name: Setup project | |
| run: just ci-setup | |
| - name: Build sdist | |
| run: just ci-build-sdist | |
| - name: Upload sdist | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: sdist | |
| path: dist/*.tar.gz | |
| github-release: | |
| name: Create GitHub Release | |
| needs: [build-wheels, build-sdist] | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | |
| permissions: | |
| contents: write | |
| attestations: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download wheel artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: dist | |
| pattern: "wheel-*" | |
| merge-multiple: true | |
| - name: Download sdist artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: sdist | |
| path: dist | |
| - name: List artifacts | |
| run: ls -lh dist/ | |
| - name: Attest build provenance | |
| uses: actions/attest-build-provenance@v1 | |
| with: | |
| subject-path: 'dist/*' | |
| - name: Create GitHub Release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh release create "${{ github.ref_name }}" \ | |
| --title "${{ github.ref_name }}" \ | |
| --generate-notes \ | |
| dist/*.whl dist/*.tar.gz | |
| publish-pypi: | |
| name: Publish to PyPI | |
| needs: [build-wheels, build-sdist] | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/p/mlnative | |
| permissions: | |
| id-token: write | |
| attestations: write | |
| steps: | |
| - name: Download wheel artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: dist | |
| pattern: "wheel-*" | |
| merge-multiple: true | |
| - name: Download sdist artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: sdist | |
| path: dist | |
| - name: Attest build provenance | |
| uses: actions/attest-build-provenance@v1 | |
| with: | |
| subject-path: 'dist/*' | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 |