Update owo-colors requirement from 3.5.0 to 4.0.0 (#12) #29
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
push: | |
branches: [main] | |
jobs: | |
Check_Formatting: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: hecrj/setup-rust-action@v2 | |
with: | |
rust-version: stable | |
components: rustfmt | |
- name: Check Formatting | |
run: cargo +stable fmt --all -- --check | |
tests: | |
name: Tests | |
strategy: | |
fail-fast: false | |
matrix: | |
toolchain: ['1.65.0', 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: x86_64-unknown-linux-gnu, os: ubuntu-latest, } | |
- { target: x86_64-unknown-redox, os: ubuntu-latest, } | |
- { target: x86_64-apple-darwin, os: macos-latest, } | |
- { target: wasm32-unknown-unknown, os: ubuntu-latest, } | |
- { target: aarch64-linux-android, os: ubuntu-latest, cmd: apk, options: "--example winit_test_android" } | |
exclude: | |
# Android is tested on stable-3 | |
- toolchain: '1.65.0' | |
platform: { target: aarch64-linux-android, os: ubuntu-latest, cmd: apk, options: "--example winit_test_android" } | |
include: | |
- toolchain: nightly | |
platform: { target: wasm32-unknown-unknown, os: ubuntu-latest, options: "-Zbuild-std=panic_abort,std", rustflags: "-Ctarget-feature=+atomics,+bulk-memory" } | |
- toolchain: '1.69.0' | |
platform: { target: aarch64-linux-android, os: ubuntu-latest, cmd: apk, options: "--example winit_test_android" } | |
env: | |
RUST_BACKTRACE: 1 | |
CARGO_INCREMENTAL: 0 | |
RUSTFLAGS: "-C debuginfo=0 --deny warnings ${{ matrix.platform.rustflags }}" | |
OPTIONS: ${{ matrix.platform.options }} | |
FEATURES: ${{ format(',{0}', matrix.platform.features ) }} | |
CMD: ${{ matrix.platform.cmd }} | |
RUSTDOCFLAGS: -Dwarnings | |
runs-on: ${{ matrix.platform.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: taiki-e/install-action@v2 | |
if: matrix.platform.target == 'wasm32-unknown-unknown' | |
with: | |
tool: wasm-bindgen-cli | |
- uses: hecrj/setup-rust-action@v2 | |
with: | |
rust-version: ${{ matrix.toolchain }}${{ matrix.platform.host }} | |
targets: ${{ matrix.platform.target }} | |
components: clippy, rust-src | |
- name: Install GCC Multilib | |
if: (matrix.platform.os == 'ubuntu-latest') && contains(matrix.platform.target, 'i686') | |
run: sudo apt-get update && sudo apt-get install gcc-multilib | |
- name: Install dependencies | |
if: matrix.platform.os == 'ubuntu-latest' | |
run: sudo apt-get update && sudo apt-get install libxkbcommon-dev libxkbcommon-x11-dev | |
- name: Install cargo-apk | |
if: contains(matrix.platform.target, 'android') | |
run: cargo install cargo-apk | |
- name: Build crate | |
shell: bash | |
run: cargo $CMD build --target ${{ matrix.platform.target }} $OPTIONS --features $FEATURES | |
- name: Build tests | |
shell: bash | |
if: > | |
!((matrix.platform.os == 'ubuntu-latest') && contains(matrix.platform.target, 'i686')) && | |
!contains(matrix.platform.target, 'redox') && | |
!contains(matrix.platform.target, 'freebsd') && | |
!contains(matrix.platform.target, 'netbsd') && | |
!contains(matrix.platform.target, 'android') && | |
matrix.toolchain != '1.65.0' | |
run: cargo $CMD test --no-run --verbose --target ${{ matrix.platform.target }} $OPTIONS --features $FEATURES | |
- name: Run tests | |
shell: bash | |
if: > | |
!((matrix.platform.os == 'ubuntu-latest') && contains(matrix.platform.target, 'i686')) && | |
!contains(matrix.platform.target, 'redox') && | |
!contains(matrix.platform.target, 'freebsd') && | |
!contains(matrix.platform.target, 'netbsd') && | |
!contains(matrix.platform.target, 'android') && | |
!contains(matrix.platform.target, 'linux') | |
run: cargo $CMD test --verbose --target ${{ matrix.platform.target }} $OPTIONS --features $FEATURES | |
- name: Run tests inside Xvfb | |
shell: bash | |
if: > | |
!((matrix.platform.os == 'ubuntu-latest') && contains(matrix.platform.target, 'i686')) && | |
!contains(matrix.platform.target, 'redox') && | |
!contains(matrix.platform.target, 'freebsd') && | |
!contains(matrix.platform.target, 'netbsd') && | |
!contains(matrix.platform.target, 'android') && | |
contains(matrix.platform.target, 'linux') | |
run: xvfb-run cargo $CMD test --verbose --target ${{ matrix.platform.target }} $OPTIONS --features $FEATURES | |
- name: Lint with clippy | |
shell: bash | |
if: > | |
(matrix.toolchain == 'stable') && | |
!contains(matrix.platform.options, '--no-default-features') && | |
!((matrix.platform.os == 'ubuntu-latest') && contains(matrix.platform.target, 'i686')) && | |
!contains(matrix.platform.target, 'redox') && | |
!contains(matrix.platform.target, 'freebsd') && | |
!contains(matrix.platform.target, 'netbsd') | |
run: cargo clippy --all-targets --target ${{ matrix.platform.target }} $OPTIONS --features $FEATURES -- -Dwarnings | |
- name: Lint with rustdoc | |
shell: bash | |
if: > | |
(matrix.toolchain == 'stable') && | |
!contains(matrix.platform.options, '--no-default-features') && | |
!((matrix.platform.os == 'ubuntu-latest') && contains(matrix.platform.target, 'i686')) && | |
!contains(matrix.platform.target, 'redox') && | |
!contains(matrix.platform.target, 'freebsd') && | |
!contains(matrix.platform.target, 'netbsd') | |
run: cargo doc --no-deps --target ${{ matrix.platform.target }} $OPTIONS --features $FEATURES --document-private-items |