fix(cff2): outline fonts that have no variation store #491
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: Rust | |
| on: [push, pull_request] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| # Separate from `build` so it reports independently and does not run once per | |
| # toolchain: linting is toolchain-independent and needs no Rust installed. | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Install poly | |
| uses: Goldziher/poly@v0 | |
| with: | |
| # Pinned: the `latest` path resolves a release at run time, which would | |
| # let a new poly release turn every open PR red without a commit here. | |
| version: 0.19.2 | |
| # `--no-workspace` keeps poly from shelling out to cargo clippy, cargo-deny and | |
| # friends. This crate has never had a clippy config, so that would be an | |
| # unbounded set of new findings, and this job has no Rust toolchain anyway. | |
| - name: Lint | |
| run: poly lint --no-workspace . | |
| - name: Check formatting | |
| run: poly fmt --check . | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| rust: | |
| # Must match `rust-version` in Cargo.toml. | |
| - 1.88.0 | |
| - stable | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Install toolchain | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ matrix.rust }} | |
| # The c-api and benches crates are outside the root package, so each needs | |
| # its own cache entry. | |
| - name: Cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: | | |
| . -> target | |
| c-api -> target | |
| benches -> target | |
| - name: Build with no default features | |
| run: cargo build --no-default-features --features=no-std-float | |
| - name: Build with std | |
| run: cargo build --no-default-features --features=std | |
| # No other permutation builds `alloc` without `std`, and `--all-features` enables | |
| # `std` too, so without this the alloc-only paths in `name.rs` and `gvar.rs` are | |
| # never compiled. `no-std-float` is required to satisfy the float guard. | |
| - name: Build with alloc and no std | |
| run: cargo build --no-default-features --features=alloc,no-std-float,variable-fonts,gvar-alloc | |
| - name: Build with variable-fonts | |
| run: cargo build --no-default-features --features=variable-fonts,no-std-float | |
| - name: Build with all features | |
| run: cargo build --all-features | |
| - name: Run tests | |
| run: cargo test | |
| # debug_assert! is compiled out in release, so debug and release can disagree about | |
| # whether malformed input panics or is rejected cleanly. Running only debug hid a | |
| # failing test on main for months. | |
| - name: Run tests (release) | |
| run: cargo test --release | |
| - name: Build C API | |
| working-directory: c-api | |
| run: cargo build --no-default-features | |
| - name: Build C API with variable-fonts | |
| working-directory: c-api | |
| run: cargo build --no-default-features --features=variable-fonts | |
| # The root package is not a workspace, so a root `cargo test` never reaches c-api. | |
| # Without this step the crate's Rust tests are compiled by nothing and run by nothing. | |
| - name: Test C API (Rust) | |
| working-directory: c-api | |
| run: cargo test | |
| - name: Test C API | |
| working-directory: c-api | |
| run: | | |
| cargo build | |
| gcc test.c -o test -L./target/debug/ -lttfparser -Werror -fsanitize=address | |
| env LD_LIBRARY_PATH=./target/debug/ ./test | |
| - name: Build benches | |
| working-directory: benches | |
| run: cargo bench dummy # `cargo build` will not actually build it |