Skip to content

Release read-fonts 0.43.1, skrifa 0.46.1 (#2064) #6792

Release read-fonts 0.43.1, skrifa 0.46.1 (#2064)

Release read-fonts 0.43.1, skrifa 0.46.1 (#2064) #6792

Workflow file for this run

on:
pull_request:
push:
branches:
- main
tags:
- "*"
schedule:
- cron: '22 2 * * *' # run at 2:22 every day
name: Continuous integration
permissions:
contents: read
jobs:
check:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
- run: rustup component add rustfmt
- name: rustfmt check
run: cargo fmt --all -- --check
- name: cargo doc
run: cargo doc --all-features --document-private-items --no-deps
env:
RUSTDOCFLAGS: -D warnings
- name: check no println! or eprintln! statements
run: resources/scripts/check_no_println.sh
clippy-lint:
name: Clippy lints
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: install stable toolchain
uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
with:
toolchain: 1.89
- run: rustup component add clippy
- name: cargo clippy font-types (1.89)
run: cargo clippy -p font-types --all-features --all-targets -- -D warnings
- name: cargo clippy read-fonts (1.89)
run: cargo clippy -p read-fonts --all-features --all-targets -- -D warnings
- name: cargo clippy write-fonts (1.89)
run: cargo clippy -p write-fonts --all-features --all-targets -- -D warnings
- name: cargo clippy skrifa (1.89)
run: cargo clippy -p skrifa --all-features --all-targets -- -D warnings
- name: cargo clippy skera (1.89)
run: cargo clippy -p skera --all-features --all-targets -- -D warnings
- name: cargo clippy fauntlet (1.89)
run: cargo clippy -p fauntlet --all-features --all-targets -- -D warnings
- name: cargo clippy incremental-font-transfer (1.89)
run: cargo clippy -p incremental-font-transfer --all-features --all-targets -- -D warnings
check-msrv:
name: cargo check msrv
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: install stable toolchain
uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
with:
toolchain: 1.85
- name: cargo check
run: cargo check --workspace
test-stable:
name: cargo test stable
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: install stable toolchain
uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
# test all packages individually to ensure deterministic resolution
# of dependencies for each package
- name: cargo test font-types (default)
run: cargo test -p font-types
- name: cargo test font-types (all)
run: cargo test -p font-types --all-targets --all-features
- name: cargo test read-fonts (default)
run: cargo test -p read-fonts
- name: cargo test read-fonts (all)
run: cargo test -p read-fonts --all-targets --all-features
- name: cargo test write-fonts (default)
run: cargo test -p write-fonts
- name: cargo test write-fonts (no-features)
# --tests makes it so we run only the unit tests and skip the doctests.
# The doctests assume that "tables" is enabled.
run: cargo test -p write-fonts --no-default-features --tests
- name: cargo test write-fonts (all)
run: cargo test -p write-fonts --all-targets --all-features
- name: cargo test skrifa (default)
run: cargo test -p skrifa
- name: cargo test skrifa (all)
run: cargo test -p skrifa --all-targets --all-features
- name: cargo test skera
run: |
pip install -r resources/scripts/skera_ci_requirements.txt
cargo test -p skera --all-targets --all-features
# The slow tests are disabled by default. We may re-enable if the
# tests become faster.
# https://github.com/googlefonts/fontations/issues/1910
cargo test -p skera --all-targets --all-features -- --ignored
- name: cargo test skera (no cli)
run: cargo test -p skera --no-default-features
- name: cargo test incremental-font-transfer
run: cargo test -p incremental-font-transfer --all-targets --all-features
- name: cargo test shared-brotli-patch-decoder
run: cargo test -p shared-brotli-patch-decoder --all-targets --all-features
- name: cargo test -p otexplorer
run: cargo test -p otexplorer --all-targets --all-features
verify-licenses:
name: Verify licenses
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Verify licenses
run: resources/scripts/check_licenses.sh
ensure-clean-codegen:
name: check codegen is up-to-date
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: install stable toolchain
uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
- name: run codegen
run: cargo run --bin=codegen resources/codegen_plan.toml
- name: ensure no unstaged changes
run: |
git add .
git status -sb
git diff-index --quiet HEAD --
check-no-std:
name: cargo check no std
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: install stable toolchain
uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
with:
toolchain: 1.89
# Use a target without `std` to make sure we don't link to `std`
target: thumbv7em-none-eabihf
- name: cargo build font-types
run: cargo build -p font-types --target thumbv7em-none-eabihf --no-default-features
- name: cargo build read-fonts
run: cargo build -p read-fonts --target thumbv7em-none-eabihf --no-default-features --features=libm
- name: cargo build skrifa
run: cargo build -p skrifa --target thumbv7em-none-eabihf --no-default-features --features=libm
# We use `cargo build` here because `cargo check` doesn't pick up all
# warnings / errors. Notably, it misses `arithmetic_overflow`.
check-wasm:
name: cargo check wasm
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: install stable toolchain
uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
with:
target: wasm32-unknown-unknown
toolchain: 1.89
- name: cargo build font-types
run: cargo build -p font-types --target wasm32-unknown-unknown
- name: cargo build read-fonts
run: cargo build -p read-fonts --target wasm32-unknown-unknown
- name: cargo build skrifa
run: cargo build -p skrifa --target wasm32-unknown-unknown
- name: cargo build write-fonts
run: cargo build -p write-fonts --target wasm32-unknown-unknown
typos:
name: Check for typos
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: check typos
uses: crate-ci/typos@bee27e3a4fd1ea2111cf90ab89cd076c870fce14 # v1.48.0
- name: typo instructions
if: failure()
run: |
echo "::error::Fix "check typos" or add an entry in .typos.toml"
exit 1
fauntlet:
name: fauntlet
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
- name: fauntlet compare
run: cargo run --release -p fauntlet -- compare-glyphs --print-paths --hinting-engine all --hinting-target all --exit-on-fail fauntlet/test_fonts/*.*tf
- name: fauntlet compare type1
run: cargo run --release -p fauntlet -- compare-glyphs --print-paths --exit-on-fail font-test-data/test_data/type1/*.pf*