Skip to content

Fix window sizing

Fix window sizing #892

Workflow file for this run

name: Tests
on:
push:
branches: [ master, '[0-9]+.[0-9]+' ]
pull_request:
branches: [ master, '[0-9]+.[0-9]+' ]
permissions:
contents: read
jobs:
nightly:
name: Nightly, format and Doc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- name: Install dependencies
run: sudo apt-get install -y libxkbcommon-dev libxcb-shape0-dev libxcb-xfixes0-dev
- name: Rustfmt check
run: |
cargo fmt --all -- --check
- name: Build docs
run: |
cargo doc --all --no-deps
cargo doc --all-features --all --no-deps
- name: Test kas-macros
run: |
cargo test --manifest-path crates/kas-macros/Cargo.toml
cargo test --manifest-path crates/kas-macros/Cargo.toml --all-features
- name: Test kas-core
run: |
cargo test --manifest-path crates/kas-core/Cargo.toml --features winit,x11
cargo test --manifest-path crates/kas-core/Cargo.toml --all-features
- name: Test kas-widgets
run: |
cargo test --manifest-path crates/kas-widgets/Cargo.toml --features kas/winit,kas/wayland
cargo test --manifest-path crates/kas-widgets/Cargo.toml --all-features --features kas/winit,kas/wayland
- name: Test kas-resvg
run: |
cargo test --manifest-path crates/kas-resvg/Cargo.toml --features kas/winit,kas/wayland
cargo test --manifest-path crates/kas-resvg/Cargo.toml --all-features --features kas/winit,kas/wayland
- name: Test kas-wgpu
run: |
cargo test --manifest-path crates/kas-wgpu/Cargo.toml --features kas/winit,kas/wayland
cargo test --manifest-path crates/kas-wgpu/Cargo.toml --no-default-features --features kas/winit,raster,kas/wayland
cargo test --manifest-path crates/kas-wgpu/Cargo.toml --all-features --features kas/x11,kas/winit
- name: Test kas-dylib
run: |
cargo test --manifest-path crates/kas-dylib/Cargo.toml --features kas-core/winit,kas-core/wayland
cargo test --manifest-path crates/kas-dylib/Cargo.toml --all-features --features kas-core/winit,kas-core/x11
- name: Test kas
run: |
cargo test
cargo test --all-features
- name: Test examples/mandlebrot
run: cargo test --manifest-path examples/mandlebrot/Cargo.toml
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest]
toolchain: [stable]
include:
- os: ubuntu-latest
toolchain: "1.75.0"
- os: ubuntu-latest
toolchain: beta
steps:
- uses: actions/checkout@v4
- name: Install toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
# components: clippy
- name: Install dependencies
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install -y libxkbcommon-dev libxcb-shape0-dev libxcb-xfixes0-dev
- name: Test kas-macros
run: cargo test --manifest-path crates/kas-macros/Cargo.toml --all-features
- name: Test kas-core
run: cargo test --manifest-path crates/kas-core/Cargo.toml --features stable
- name: Test kas-widgets
run: cargo test --manifest-path crates/kas-widgets/Cargo.toml --features kas/winit,kas/x11
- name: Test kas-resvg
run: cargo test --manifest-path crates/kas-resvg/Cargo.toml --all-features --features kas/winit,kas/wayland
- name: Test kas-wgpu
run: cargo test --manifest-path crates/kas-wgpu/Cargo.toml --features kas/x11,kas/winit
- name: Test kas-dylib
run: cargo test --manifest-path crates/kas-dylib/Cargo.toml --features kas-core/x11,kas-core/winit
- name: Test kas
run: cargo test --features stable
- name: Test examples/mandlebrot
run: cargo test --manifest-path examples/mandlebrot/Cargo.toml
# - name: Clippy (stable)
# if: matrix.toolchain != 'beta' && matrix.toolchain != 'stable'
# run: |
# cargo clippy --all -- -D warnings \
# -A clippy::collapsible-if \
# -A clippy::collapsible_else_if \
# -A clippy::module-inception \
# -A clippy::comparison_chain \
# -A clippy::if_same_then_else \
# -A clippy::single-match \
# -A clippy::unit_arg