Skip to content

chore(deps): bump the all-actions-version-updates group with 2 updates #120

chore(deps): bump the all-actions-version-updates group with 2 updates

chore(deps): bump the all-actions-version-updates group with 2 updates #120

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
workflow_dispatch:
inputs:
release_tag:
description: Existing release tag to upload binaries for, such as v0.3.1
required: false
type: string
defaults:
run:
shell: bash
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with: { submodules: true }
- if: github.event_name != 'release' && github.event_name != 'workflow_dispatch'
uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@v2.83.4
with: { tool: 'just,cargo-binstall,protoc' }
- run: just ci-test
test-msrv:
name: Test MSRV
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: taiki-e/install-action@v2.83.4
with: { tool: 'just,cargo-binstall,cargo-minimal-versions,cargo-hack' }
- name: Read MSRV
id: msrv
run: echo "value=$(just get-msrv)" >> $GITHUB_OUTPUT
- name: Install nightly Rust for minimal dependency resolution
uses: dtolnay/rust-toolchain@stable
with: { toolchain: nightly }
- name: Install MSRV Rust ${{ steps.msrv.outputs.value }}
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ steps.msrv.outputs.value }}
- run: just ci-test-msrv
coverage:
name: Code Coverage
if: github.event_name != 'release'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with: { submodules: true }
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@v2.83.4
with: { tool: 'just,cargo-llvm-cov,protoc' }
- run: just ci-coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v7
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: target/llvm-cov/lcov.info
# This job checks if any of the previous jobs failed or were canceled.
# This approach also allows some jobs to be skipped if they are not needed.
ci-passed:
needs: [ test, test-msrv ]
if: always()
runs-on: ubuntu-latest
steps:
- name: Result of the needed steps
run: echo "${{ toJSON(needs) }}"
- if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
run: exit 1
# Release unpublished packages or create a PR with changes
release-plz:
needs: [ ci-passed ]
if: |
always()
&& needs.ci-passed.result == 'success'
&& github.event_name == 'push'
&& github.ref == 'refs/heads/main'
&& github.repository_owner == 'nyurik'
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
pull-requests: write
outputs:
releases_created: ${{ steps.release.outputs.releases_created }}
concurrency:
group: release-plz-${{ github.ref }}
cancel-in-progress: false
steps:
- uses: actions/checkout@v7
with: { fetch-depth: 0 }
- uses: dtolnay/rust-toolchain@stable
- name: Publish to crates.io if crate's version is newer
uses: release-plz/action@v0.5.131
id: release
with: { command: release }
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_TOKEN }}
- if: ${{ steps.release.outputs.releases_created == 'false' }}
name: If version is the same, create a PR proposing new version and changelog for the next release
uses: release-plz/action@v0.5.131
with: { command: release-pr }
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_TOKEN }}
upload-release-binaries:
needs: [ release-plz ]
if: |
always()
&& (
(
needs.release-plz.result == 'success'
&& needs.release-plz.outputs.releases_created == 'true'
)
|| (
github.event_name == 'workflow_dispatch'
&& inputs.release_tag != ''
)
)
name: Upload ${{ matrix.target }} binary
runs-on: ${{ matrix.os }}
permissions:
contents: write
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
- target: aarch64-unknown-linux-gnu
os: ubuntu-24.04-arm
- target: x86_64-apple-darwin
os: macos-15-intel
- target: aarch64-apple-darwin
os: macos-latest
- target: x86_64-pc-windows-msvc
os: windows-latest
steps:
- uses: actions/checkout@v7
with:
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.release_tag || github.sha }}
- uses: taiki-e/install-action@v2.83.4
with: { tool: just }
- name: Read package version
id: package
run: echo "version=$(just get-crate-field version)" >> "$GITHUB_OUTPUT"
- uses: taiki-e/upload-rust-binary-action@v1
with:
bin: mvt
package: fast-mvt
archive: fast-mvt-$target
features: cli
locked: false
target: ${{ matrix.target }}
tar: all
zip: none
checksum: sha256
ref: ${{ github.event_name == 'workflow_dispatch' && format('refs/tags/{0}', inputs.release_tag) || format('refs/tags/v{0}', steps.package.outputs.version) }}