-
-
Notifications
You must be signed in to change notification settings - Fork 31
137 lines (130 loc) · 5.57 KB
/
Copy pathtest.yml
File metadata and controls
137 lines (130 loc) · 5.57 KB
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
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@v6
- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libfontconfig1-dev
- name: Rustfmt check
run: |
cargo fmt -- --check
- name: Build docs
run: |
cargo doc --features stable,wayland --workspace --no-deps -Zwarnings --config 'build.warnings="deny"'
- 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 minimal
cargo test --manifest-path crates/kas-core/Cargo.toml --features nightly
- name: Test kas-widgets
run: |
cargo test --manifest-path crates/kas-widgets/Cargo.toml --features kas/wayland
cargo test --manifest-path crates/kas-widgets/Cargo.toml --all-features --features kas/wayland
- name: Test kas-image
run: |
cargo test --manifest-path crates/kas-image/Cargo.toml --features kas/wayland
cargo test --manifest-path crates/kas-image/Cargo.toml --all-features --features kas/wayland
- name: Test kas-view
run: |
cargo test --manifest-path crates/kas-view/Cargo.toml --all-features --features kas/wayland
- name: Test kas-wgpu
run: |
cargo test --manifest-path crates/kas-wgpu/Cargo.toml --no-default-features --features kas/wayland
cargo test --manifest-path crates/kas-wgpu/Cargo.toml --all-features --features kas/wayland
- name: Test kas-dylib
run: |
cargo test --manifest-path crates/kas-dylib/Cargo.toml --features kas-core/wayland
cargo test --manifest-path crates/kas-dylib/Cargo.toml --all-features --features kas-soft/x11
- name: Test kas
run: |
cargo test --lib --bins --features nightly,nightly-diagnostics-pedantic -Zwarnings --config 'build.warnings="deny"'
cargo test --benches --examples --tests --features nightly -Zwarnings --config 'build.warnings="deny"'
- name: Test kas (experimental; some warnings may be expected)
run: cargo test --features nightly,experimental
- name: Test examples/mandlebrot
run: cargo test --manifest-path examples/mandlebrot/Cargo.toml -Zwarnings --config 'build.warnings="deny"'
- name: Test examples/text-editor
run: cargo test --manifest-path examples/text-editor/Cargo.toml -Zwarnings --config 'build.warnings="deny"'
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.92.0"
variant: MSRV
- os: ubuntu-latest
toolchain: beta
steps:
- uses: actions/checkout@v6
- name: Not MSRV
if: ${{ matrix.variant == 'MSRV' }}
run: cargo generate-lockfile --ignore-rust-version
- 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 update
sudo apt-get install -y libfontconfig1-dev
- name: Test kas-macros
run: cargo test --manifest-path crates/kas-macros/Cargo.toml --features log
- 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/x11
- name: Test kas-image
run: cargo test --manifest-path crates/kas-image/Cargo.toml --all-features --features kas/wayland
- name: Test kas-view
run: cargo test --manifest-path crates/kas-view/Cargo.toml --all-features --features kas/wayland
- name: Test kas-wgpu
run: cargo test --manifest-path crates/kas-wgpu/Cargo.toml --features kas/x11
- name: Test kas-soft
run: cargo test --manifest-path crates/kas-soft/Cargo.toml --features wayland
- name: Test kas-dylib
run: cargo test --manifest-path crates/kas-dylib/Cargo.toml --features kas-soft/x11
- name: Test kas
run: |
cargo test --no-default-features --features minimal
cargo test --features stable
- name: Test examples/mandlebrot
run: cargo test --manifest-path examples/mandlebrot/Cargo.toml
- name: Test examples/text-editor
run: cargo test --manifest-path examples/text-editor/Cargo.toml
# - name: Clippy (stable)
# if: matrix.toolchain != 'beta' && matrix.toolchain != 'stable'
# run: |
# cargo clippy --workspace --features stable,workspace -- -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::redundant_pattern_matching \
# -A clippy::unit_arg