mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 22:31:30 +11:00
829a140d9b
While most compositors provide server side decorations, the GNOME does not, and won't provide them. Also Wayland clients must render client side decorations. Winit was already drawing some decorations, however they were bad looking and provided no text rendering, so the title was missing. However this commit makes use of the SCTK external frame similar to GTK's Adwaita theme supporting text rendering and looking similar to other GTK applications. Fixes #1967.
111 lines
4.5 KiB
YAML
111 lines
4.5 KiB
YAML
name: CI
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches: [master]
|
|
|
|
jobs:
|
|
Check_Formatting:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: hecrj/setup-rust-action@v1
|
|
with:
|
|
rust-version: stable
|
|
components: rustfmt
|
|
- name: Check Formatting
|
|
run: cargo +stable fmt --all -- --check
|
|
|
|
Tests:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
rust_version: [stable, nightly]
|
|
platform:
|
|
- { target: x86_64-pc-windows-msvc, os: windows-latest, }
|
|
- { target: i686-pc-windows-msvc, os: windows-latest, }
|
|
- { target: x86_64-pc-windows-gnu, os: windows-latest, host: -x86_64-pc-windows-gnu }
|
|
- { target: i686-pc-windows-gnu, os: windows-latest, host: -i686-pc-windows-gnu }
|
|
- { target: i686-unknown-linux-gnu, os: ubuntu-latest, }
|
|
- { target: x86_64-unknown-linux-gnu, os: ubuntu-latest, }
|
|
- { target: x86_64-unknown-linux-gnu, os: ubuntu-latest, options: --no-default-features, features: x11 }
|
|
- { target: x86_64-unknown-linux-gnu, os: ubuntu-latest, options: --no-default-features, features: "wayland,wayland-dlopen" }
|
|
- { target: aarch64-linux-android, os: ubuntu-latest, cmd: 'apk --' }
|
|
- { target: x86_64-apple-darwin, os: macos-latest, }
|
|
- { target: x86_64-apple-ios, os: macos-latest, }
|
|
- { target: aarch64-apple-ios, os: macos-latest, }
|
|
# We're using Windows rather than Ubuntu to run the wasm tests because caching cargo-web
|
|
# doesn't currently work on Linux.
|
|
- { target: wasm32-unknown-unknown, os: windows-latest, }
|
|
|
|
env:
|
|
RUST_BACKTRACE: 1
|
|
CARGO_INCREMENTAL: 0
|
|
PKG_CONFIG_ALLOW_CROSS: 1
|
|
RUSTFLAGS: "-C debuginfo=0 --deny warnings"
|
|
OPTIONS: ${{ matrix.platform.options }}
|
|
FEATURES: ${{ format(',{0}', matrix.platform.features ) }}
|
|
CMD: ${{ matrix.platform.cmd }}
|
|
|
|
runs-on: ${{ matrix.platform.os }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
# Used to cache cargo-web
|
|
- name: Cache cargo folder
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: ~/.cargo
|
|
key: ${{ matrix.platform.target }}-cargo-${{ matrix.rust_version }}
|
|
|
|
- uses: hecrj/setup-rust-action@v1
|
|
with:
|
|
rust-version: ${{ matrix.rust_version }}${{ matrix.platform.host }}
|
|
targets: ${{ matrix.platform.target }}
|
|
|
|
- name: Install Linux dependencies
|
|
if: (matrix.platform.os == 'ubuntu-latest')
|
|
run: sudo apt-get update && sudo apt-get install pkg-config cmake libfreetype6-dev libfontconfig1-dev
|
|
- name: Install GCC Multilib
|
|
if: (matrix.platform.os == 'ubuntu-latest') && contains(matrix.platform.target, 'i686')
|
|
run: sudo dpkg --add-architecture i386 && sudo apt-get update && sudo apt-get install g++-multilib gcc-multilib libfreetype6-dev:i386 libfontconfig1-dev:i386
|
|
- name: Install cargo-apk
|
|
if: contains(matrix.platform.target, 'android')
|
|
run: cargo install cargo-apk
|
|
|
|
- name: Check documentation
|
|
shell: bash
|
|
if: matrix.platform.target != 'wasm32-unknown-unknown'
|
|
run: cargo $CMD doc --no-deps --target ${{ matrix.platform.target }} $OPTIONS --features $FEATURES
|
|
|
|
- name: Build
|
|
shell: bash
|
|
run: cargo $CMD build --verbose --target ${{ matrix.platform.target }} $OPTIONS --features $FEATURES
|
|
|
|
- name: Build tests
|
|
shell: bash
|
|
run: cargo $CMD test --no-run --verbose --target ${{ matrix.platform.target }} $OPTIONS --features $FEATURES
|
|
- name: Run tests
|
|
shell: bash
|
|
if: (
|
|
!contains(matrix.platform.target, 'android') &&
|
|
!contains(matrix.platform.target, 'ios') &&
|
|
!contains(matrix.platform.target, 'wasm32'))
|
|
run: cargo $CMD test --verbose --target ${{ matrix.platform.target }} $OPTIONS --features $FEATURES
|
|
|
|
|
|
- name: Build with serde enabled
|
|
shell: bash
|
|
run: cargo $CMD build --verbose --target ${{ matrix.platform.target }} $OPTIONS --features serde,$FEATURES
|
|
|
|
- name: Build tests with serde enabled
|
|
shell: bash
|
|
run: cargo $CMD test --no-run --verbose --target ${{ matrix.platform.target }} $OPTIONS --features serde,$FEATURES
|
|
- name: Run tests with serde enabled
|
|
shell: bash
|
|
if: (
|
|
!contains(matrix.platform.target, 'android') &&
|
|
!contains(matrix.platform.target, 'ios') &&
|
|
!contains(matrix.platform.target, 'wasm32'))
|
|
run: cargo $CMD test --verbose --target ${{ matrix.platform.target }} $OPTIONS --features serde,$FEATURES
|