Repository navigation
chore(rust): release #5982
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: autofix.ci # See https://autofix.ci/security why this name | |
| on: | |
| pull_request: | |
| types: [ labeled, opened, synchronize, reopened ] | |
| workflow_dispatch: | |
| permissions: { } | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.action == 'labeled' && 'bless' || 'autofix' }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| # A single job so that one pull request costs one concurrency slot instead of five. | |
| # Each fixup is gated on the paths it actually reads, and one autofix-ci call commits the result. | |
| autofix: | |
| name: Autofix | |
| runs-on: ubuntu-latest | |
| permissions: { contents: read } | |
| if: | | |
| github.event.action == 'opened' || | |
| github.event.action == 'synchronize' || | |
| github.event.action == 'reopened' | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: { persist-credentials: false } | |
| - uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 | |
| id: filter | |
| with: | |
| filters: | | |
| ts: | |
| - '.github/workflows/autofix.yml' | |
| - 'ts/**' | |
| - 'inspector/**' | |
| rust: | |
| - '.github/workflows/autofix.yml' | |
| - 'rust/**' | |
| ffi: | |
| - '.github/workflows/autofix.yml' | |
| - 'rust/mlt-ffi/**' | |
| py: | |
| - '.github/workflows/autofix.yml' | |
| - 'rust/mlt-py/**' | |
| wasm: | |
| - '.github/workflows/autofix.yml' | |
| - 'rust/mlt-wasm/**' | |
| hexdumps: | |
| - '.github/workflows/autofix.yml' | |
| - 'docs/snippets/**' | |
| - 'test/synthetic/**' | |
| - 'rust/mlt/**' | |
| - 'rust/mlt-core/**' | |
| expected: | |
| - '.github/workflows/autofix.yml' | |
| - 'inspector/mod.just' | |
| - 'test/fixtures/**' | |
| - 'rust/mlt/**' | |
| - 'rust/mlt-core/**' | |
| - uses: taiki-e/install-action@f7e5d7c961414b23f5b25b2da9294395d08513ad # v2.87.26 | |
| with: { tool: 'just' } | |
| # TypeScript | |
| - if: steps.filter.outputs.ts == 'true' | |
| uses: ./.github/actions/mlt-setup-node | |
| - name: Format TypeScript | |
| if: steps.filter.outputs.ts == 'true' | |
| run: just ts::fmt inspector::fmt | |
| # Rust | |
| # Also installs just and cargo-sort, so it has to come before the Rust fixups. | |
| - if: steps.filter.outputs.rust == 'true' || steps.filter.outputs.hexdumps == 'true' || steps.filter.outputs.expected == 'true' | |
| uses: ./.github/actions/mlt-setup-rust | |
| - name: Format Cargo.toml | |
| if: steps.filter.outputs.rust == 'true' | |
| run: just rust::fmt-toml | |
| - name: Sync package.json version from Cargo.toml | |
| if: steps.filter.outputs.wasm == 'true' | |
| run: just rust::sync-wasm-version | |
| - name: Sync pyproject.toml version from Cargo.toml | |
| if: steps.filter.outputs.py == 'true' | |
| run: just rust::sync-pyo3-version | |
| - name: Regenerate docs hexdump snippets from the synthetic fixtures | |
| if: steps.filter.outputs.hexdumps == 'true' | |
| run: just rust::sync-docs-hexdumps | |
| - name: Re-encode the real-world tiles in test/expected | |
| if: steps.filter.outputs.expected == 'true' | |
| run: just inspector::regenerate-expected | |
| - name: Setup Java for jextract | |
| if: steps.filter.outputs.ffi == 'true' | |
| uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '25' | |
| - name: Setup jextract | |
| if: steps.filter.outputs.ffi == 'true' | |
| uses: ./.github/actions/mlt-setup-jextract | |
| - name: Install clang-format and ktlint | |
| if: steps.filter.outputs.ffi == 'true' | |
| run: | | |
| sudo apt-get update && sudo apt-get install -y clang-format | |
| curl -sSL https://github.com/pinterest/ktlint/releases/latest/download/ktlint -o /usr/local/bin/ktlint | |
| chmod +x /usr/local/bin/ktlint | |
| - name: Regenerate diplomat FFI bindings | |
| if: steps.filter.outputs.ffi == 'true' | |
| run: just rust::sync-ffi-bindings | |
| - name: Regenerate maplibre_tiles.pyi stub | |
| if: steps.filter.outputs.py == 'true' | |
| run: just rust::sync-pyo3-stubs | |
| # Formatting tiebreaker for the generated files | |
| - name: Install uv | |
| if: steps.filter.outputs.ffi == 'true' || steps.filter.outputs.py == 'true' | |
| uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0 | |
| - if: steps.filter.outputs.ffi == 'true' || steps.filter.outputs.py == 'true' | |
| run: uvx pre-commit run --all-files | |
| continue-on-error: true | |
| - uses: autofix-ci/action@c5b2d67aa2274e7b5a18224e8171550871fc7e4a # v1.3.4 | |
| with: { commit-message: 'chore: apply automated fixes' } | |
| bless: | |
| name: Bless test output | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| if: | | |
| github.event.action == 'labeled' && | |
| github.event.label.name == 'bless' | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: { persist-credentials: false } | |
| - uses: BRAINSia/free-disk-space@7048ffbf50819342ac964ef3998a51c2564a8a75 # v2.1.3 | |
| with: | |
| tool-cache: false | |
| mandb: false | |
| android: true | |
| dotnet: true | |
| haskell: true | |
| large-packages: false | |
| docker-images: false | |
| swap-storage: true | |
| - name: Setup Rust | |
| run: rustup update stable && rustup default stable | |
| - name: Install just | |
| uses: taiki-e/install-action@f7e5d7c961414b23f5b25b2da9294395d08513ad # v2.87.26 | |
| with: { tool: 'just,cargo-binstall' } | |
| - name: Setup Node.js | |
| uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 | |
| - run: just bless | |
| continue-on-error: true | |
| # run pre-commit as a formatting tiebreaker | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0 | |
| - run: uvx pre-commit run --all-files | |
| continue-on-error: true | |
| - uses: autofix-ci/action@c5b2d67aa2274e7b5a18224e8171550871fc7e4a # v1.3.4 | |
| with: { commit-message: 'chore: update blessed test snapshots across all components' } |