Skip to content

stylo_taffy: convert grid-template-areas template size (width / row count) to Taffy #2814

stylo_taffy: convert grid-template-areas template size (width / row count) to Taffy

stylo_taffy: convert grid-template-areas template size (width / row count) to Taffy #2814

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
- v0.*
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
RUSTDOCFLAGS: "-D warnings"
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: "sparse"
jobs:
# MSRV check.
# Blitz only guarantees "latest stable". However we have this check here to ensure that we advertise
# our MSRV. We also make an effort not to increase MSRV in patch versions of Blitz.
#
# We only run `cargo build` (not `cargo test`) so as to avoid requiring dev-dependencies to build with the MSRV
# version. Building is likely sufficient as runtime errors varying between rust versions is very unlikely.
build-msrv:
name: "MSRV Build [Rust 1.89]"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.89
- run: perl -pi.bak -e 's/opt-level = 2/opt-level = 0/g' Cargo.toml
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libfontconfig-dev
version: 1.0
- run: cargo build --workspace
build-features-default:
name: "Build [default features]"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: perl -pi.bak -e 's/opt-level = 2/opt-level = 0/g' Cargo.toml
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libfontconfig-dev
version: 1.0
- run: cargo build --workspace
test-features-default:
name: "Test [default features]"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: perl -pi.bak -e 's/opt-level = 2/opt-level = 0/g' Cargo.toml
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libfontconfig-dev
version: 1.0
- run: cargo test --workspace
build-counter:
name: "Build counter example"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: perl -pi.bak -e 's/opt-level = 2/opt-level = 0/g' Cargo.toml
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libfontconfig-dev
version: 1.0
- run: cargo build -p counter
# wasm_hello is a standalone workspace; seven_guis and todomvc are workspace
# members with a [lib] crate-type = ["cdylib"] target for wasm.
build-wasm-examples:
name: "Build wasm examples"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
targets: wasm32-unknown-unknown
- name: Build wasm_hello
run: cargo build --target wasm32-unknown-unknown
working-directory: examples/wasm_hello
- name: Build seven_guis (wasm)
run: cargo build -p seven_guis --lib --target wasm32-unknown-unknown --no-default-features --features hybrid
- name: Build todomvc (wasm)
run: cargo build -p todomvc --lib --target wasm32-unknown-unknown --no-default-features --features hybrid
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: rustfmt
- run: cargo fmt --all --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: clippy
- run: perl -pi.bak -e 's/opt-level = 2/opt-level = 0/g' Cargo.toml
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libfontconfig-dev
version: 1.0
- run: cargo clippy --workspace -- -D warnings
doc:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo doc
matrix_test:
runs-on: ${{ matrix.platform.os }}
env:
RUST_CARGO_COMMAND: ${{ matrix.platform.cross == true && 'cross' || 'cargo' }}
RUSTFLAGS: ${{ matrix.platform.name == 'ios' && '-Clink-arg=-target -Clink-arg=arm64-apple-ios18.4 -Clink-arg=-miphoneos-version-min=18.4' || '' }}
strategy:
fail-fast: false
matrix:
platform:
- {
name: windows,
target: x86_64-pc-windows-msvc,
os: windows-latest,
cross: false,
command: "test",
args: "--all --tests",
}
- {
name: macos,
target: aarch64-apple-darwin,
os: macos-latest,
cross: false,
command: "test",
args: "--all --tests",
}
- {
name: linux,
target: x86_64-unknown-linux-gnu,
os: ubuntu-latest,
cross: false,
command: "test",
args: "--all --tests",
}
- {
name: ios,
target: aarch64-apple-ios,
os: macos-latest,
cross: false,
command: "build",
args: "--all",
}
- {
name: android,
target: aarch64-linux-android,
os: ubuntu-latest,
cross: true,
command: "build",
args: "--all",
}
name: Test (${{ matrix.platform.name }})
steps:
- uses: actions/checkout@v4
- name: install stable
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
targets: ${{ matrix.platform.target }}
components: rustfmt
# Install cross from source. Because latest release doesn't work with recent Rust
# when targeting Android. See https://github.com/cross-rs/cross/issues/1222
- name: Install cross
if: ${{ matrix.platform.cross == true }}
run: cargo install cross --git https://github.com/cross-rs/cross --rev 426e811
- name: Free Disk Space (Ubuntu)
if: ${{ matrix.platform.os == 'ubuntu-24.04' || matrix.platform.os == 'ubuntu-24.04-arm' }}
uses: jlumbroso/free-disk-space@v1.3.1
with: # speed things up a bit
android: ${{ matrix.platform.target != 'aarch64-linux-android' }}
large-packages: false
swap-storage: false
- uses: Swatinem/rust-cache@v2
with:
key: "${{ matrix.platform.target }}"
cache-all-crates: "true"
save-if: ${{ github.ref == 'refs/heads/main' }}
cache-bin: ${{ matrix.platform.os != 'macos-latest' }} # works around https://github.com/Swatinem/rust-cache/issues/341
- name: Install apt deps
if: ${{ matrix.platform.os == 'ubuntu-latest' }}
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libfontconfig1-dev
version: 1.0
- name: Setup
run: ${{ matrix.platform.setup }}
shell: bash
- name: test
run: |
${{ env.RUST_CARGO_COMMAND }} ${{ matrix.platform.command }} ${{ matrix.platform.args }} --target ${{ matrix.platform.target }}