Skip to content

Release v1.3.0

Release v1.3.0 #770

Workflow file for this run

name: Check
on:
push:
branches: [master, ci]
pull_request:
branches: [master]
env:
RUST_VERSION: 1.85
# clippy::needless lifetimes is a little bit overzealous on 1.85 and conflicts
# with what nightly thinks (fixing this lint will trigger another lint on nightly)
# clippy::comparison-chain has since been moved to pedantic
STABLE_CLIPPY_OPTIONS: -D warnings -A clippy::needless_lifetimes -A clippy::comparison_chain
jobs:
run-tests:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# The layout test suite and xxtask does not follow crate msrv.
- run: rustup default nightly
- uses: Swatinem/rust-cache@v2
- run: cargo xxtask ptr pull tests/assets/*.ptr
- run: sudo apt update && sudo apt install -y build-essential libfontconfig-dev libfreetype-dev libharfbuzz-dev
- name: Install nextest
uses: taiki-e/install-action@nextest
- run: cargo nextest r -F _layout_tests --workspace --exclude sbr-overlay --no-fail-fast
nix-build:
name: Build nix flake
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v31
- run: nix flake check
- run: nix build --print-build-logs .
check-linux:
name: Check ${{ matrix.name }}
runs-on: ${{ matrix.image }}
strategy:
fail-fast: false
matrix:
include:
- name: x86_64 Linux
image: ubuntu-latest
- name: i686 Linux
# On ubuntu-latest every time I enabled this check it eventually started
# failing with apt complaining it can't install some packages.
# So try with an older ubuntu image, surely it won't break itself right?
image: ubuntu-22.04
cross-arch: i686
rustc-cross-target: i686-unknown-linux-gnu
extra-cflags: -m32
extra-packages: gcc-multilib
- name: aarch64 Linux
image: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4
- run:
rustup toolchain install $RUST_VERSION
--component clippy,rustfmt ${TARGET:+--target} $TARGET
env:
TARGET: ${{ matrix.rustc-cross-target }}
- run: rustup default $RUST_VERSION
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.cross-arch }}
- run: ./ci/ubuntu_install_packages.sh
env:
CROSS_ARCH: ${{ matrix.cross-arch }}
EXTRA_PACKAGES: ${{ matrix.extra-packages }}
LIBRARIES: libfontconfig-dev libfreetype-dev libharfbuzz-dev
- run: cargo fmt --all -- --check
- run:
cargo clippy --workspace
--exclude sbr-overlay --exclude xtask --exclude subrandr
--all-targets --all-features -- $STABLE_CLIPPY_OPTIONS
# The xtask is checked separately because it cannot be tested with `--all-features` as
# the "full" feature does not follow our MSRV (yet).
- run: cargo clippy -p xtask --all-targets -- $STABLE_CLIPPY_OPTIONS
# The subrandr crate is checked separately because it has a `_layout_tests` feature which
# also does not follow our MSRV.
- run: cargo clippy --no-deps -p subrandr --features wgpu --all-targets -- $STABLE_CLIPPY_OPTIONS
- run: ./ci/c_sanity_check.sh
env:
CROSS_TARGET: ${{ matrix.rustc-cross-target }}
CFLAGS: ${{ matrix.extra-cflags }}
check-wasi:
name: Check wasm32-wasip1
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: rustup toolchain install $RUST_VERSION --target wasm32-wasip1
- run: rustup default $RUST_VERSION
- uses: Swatinem/rust-cache@v2
- run: sudo apt update && sudo apt install -y build-essential
- name: Cache wasi dependencies
id: cache-wasi-deps
uses: actions/cache@v4
with:
key: wasi-deps-${{ hashFiles('wasi32/Dependencies.Dockerfile') }}
path: wasi32/deps
- run: |
cd wasi32
./build_dependencies.sh
if: ${{ steps.cache-wasi-deps.outputs.cache-hit != 'true' }}
- run: cargo build --target wasm32-wasip1 -p subrandr --all-features
check-windows:
name: Check ${{ matrix.name }}
runs-on: ${{ matrix.image }}
strategy:
fail-fast: false
matrix:
include:
- name: x86_64 Windows
image: windows-latest
msystem: MINGW64
- name: aarch64 Windows
image: windows-11-arm
msystem: CLANGARM64
steps:
- uses: actions/checkout@v4
- uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.msystem }}
update: true
install: git
pacboy: >-
gcc:p
freetype:p
harfbuzz:p
rust:p
- uses: Swatinem/rust-cache@v2
- shell: msys2 {0}
run: cargo clippy --workspace --exclude sbr-overlay --exclude xtask --all-features -- -D warnings
- shell: msys2 {0}
# Similar to above but it can't be tested with `--all-features` because ring doesn't
# even compile on aarch64 Windows apparently.
run: cargo clippy -p xtask --all-targets -- -D warnings
- shell: msys2 {0}
run: ./ci/c_sanity_check.sh