Same version manifest treatment for pbf_font_tools so we can publish … #126
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: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| release: | |
| types: [ published ] | |
| workflow_dispatch: | |
| jobs: | |
| msrv: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: taiki-e/install-action@v2 | |
| with: | |
| tool: cargo-hack | |
| - run: cargo hack check --rust-version --workspace --all-targets --ignore-private | |
| semver-checks: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Check semver (SDF Glyph Renderer) | |
| uses: obi1kenobi/cargo-semver-checks-action@v2 | |
| with: | |
| package: sdf_glyph_renderer | |
| feature-group: default-features | |
| features: freetype | |
| - name: Check semver (PBF Font Tools) | |
| uses: obi1kenobi/cargo-semver-checks-action@v2 | |
| with: | |
| package: pbf_font_tools | |
| feature-group: default-features | |
| features: freetype | |
| test: | |
| name: Run CI | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - uses: Swatinem/rust-cache@v2 | |
| if: github.event_name != 'release' && github.event_name != 'workflow_dispatch' | |
| - name: Report Rust version | |
| run: rustc --version && cargo --version | |
| - name: Run fmt | |
| run: cargo fmt --all -- --check | |
| - name: Test Debug | |
| run: cargo test --workspace --features freetype --locked | |
| - name: Test Release | |
| run: cargo test --workspace --release --features freetype --locked | |
| - name: Lint | |
| run: cargo clippy --workspace --all-targets --features freetype -- -D warnings | |
| - name: Test docs | |
| run: | | |
| cargo test --workspace --release --doc --locked | |
| RUSTDOCFLAGS="-D warnings" cargo doc --workspace --release --no-deps | |
| multi-os-test: | |
| name: Test on multiple OS | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: | |
| # This is not an exhaustive list of runners, just the more recent ones | |
| - ubuntu-latest | |
| - ubuntu-24.04 | |
| - ubuntu-22.04 | |
| - macos-latest | |
| - macos-15 | |
| - macos-14 # M1 CPU | |
| - windows-latest | |
| - windows-2022 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - uses: Swatinem/rust-cache@v2 | |
| if: github.event_name != 'release' && github.event_name != 'workflow_dispatch' | |
| - name: Report Rust version | |
| run: rustc --version && cargo --version | |
| # freetype-sys 0.23.0 bundled build is broken on Windows (links system zlib) | |
| - name: Run tests | |
| run: cargo test --workspace --features freetype --locked | |
| if: ${{ !startsWith(matrix.os, 'windows') }} | |
| - name: Run tests (no freetype) | |
| run: cargo test --workspace --exclude build_pbf_glyphs --locked | |
| if: ${{ startsWith(matrix.os, 'windows') }} | |
| # We've had issues in the past regressing due to the complexity of cargo feature flags. | |
| # This makes sure we can build protoc from source. | |
| - name: Run tests (protoc-from-source) | |
| run: cargo test --workspace --no-default-features --features protoc-from-src,freetype --locked | |
| if: ${{ !startsWith(matrix.os, 'windows') }} |