-
Notifications
You must be signed in to change notification settings - Fork 25
115 lines (108 loc) · 4.47 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
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