tawasuyu

tawasuyu/taffy

A high performance rust-powered UI layout library

⎇ ffc013414175afd336e0b5d9f3644e7de3168d29 .github/workflows/ci.yml YAML · 169 lines · 5.0 KB History raw

CI: Switch to DavidAnson/markdownlint-cli2-action for markdown linting (#463) ffc013414 · Nico Burns ·

1on:
2  pull_request:
3  push:
4    branches:
5      - main
6      - 0.2.x
7      - 0.3.x
8
9name: Continuous integration
10
11env:
12  RUSTDOCFLAGS: "-D warnings"
13
14jobs:
15  # None
16  test-features-none:
17    name: "Test Suite [Features: None]"
18    runs-on: ubuntu-latest
19    steps:
20      - uses: actions/checkout@v3
21      - uses: dtolnay/rust-toolchain@stable
22      - run: cargo build --no-default-features
23      - run: cargo test --no-default-features --features taffy_tree
24
25  # Default
26  test-features-default:
27    name: "Test Suite [Features: Default]"
28    runs-on: ubuntu-latest
29    steps:
30      - uses: actions/checkout@v3
31      - uses: dtolnay/rust-toolchain@stable
32      - run: cargo build
33      - run: cargo test
34
35  test-features-default-with-serde:
36    name: "Test Suite [Features: Default + serde]"
37    runs-on: ubuntu-latest
38    steps:
39      - uses: actions/checkout@v3
40      - uses: dtolnay/rust-toolchain@stable
41      - run: cargo build --features serde
42      - run: cargo test --features serde
43
44  test-features-no-grid-nor-flexbox:
45    name: "Test Suite [Features: std (no grid or flexbox)]"
46    runs-on: ubuntu-latest
47    steps:
48      - uses: actions/checkout@v3
49      - uses: dtolnay/rust-toolchain@stable
50      - run: cargo build --no-default-features --features std
51      - run: cargo build --no-default-features --features std,taffy_tree
52      - run: cargo test --no-default-features --features std,taffy_tree
53
54  # Flexbox
55  test-features-flexbox:
56    name: "Test Suite [Features: flexbox + std]"
57    runs-on: ubuntu-latest
58    steps:
59      - uses: actions/checkout@v3
60      - uses: dtolnay/rust-toolchain@stable
61      - run: cargo build --no-default-features --features flexbox,std
62      - run: cargo build --no-default-features --features flexbox,std,taffy_tree
63      - run: cargo test --no-default-features --features flexbox,std,taffy_tree
64
65  # Grid
66  test-features-grid:
67    name: "Test Suite [Features: grid + std]"
68    runs-on: ubuntu-latest
69    steps:
70      - uses: actions/checkout@v3
71      - uses: dtolnay/rust-toolchain@stable
72      - run: cargo build --no-default-features --features grid,std
73      - run: cargo build --no-default-features --features grid,std,taffy_tree
74      - run: cargo test --no-default-features --features grid,std,taffy_tree
75
76  test-features-grid-with-alloc:
77    name: "Test Suite [Features: grid + alloc]"
78    runs-on: ubuntu-latest
79    steps:
80      - uses: actions/checkout@v3
81      - uses: dtolnay/rust-toolchain@stable
82      - run: cargo build --no-default-features --features alloc,grid
83      - run: cargo build --no-default-features --features alloc,grid,taffy_tree
84      - run: cargo test --no-default-features --features alloc,grid,taffy_tree
85
86  test-features-alloc:
87    name: "Test Suite [Features: alloc]"
88    runs-on: ubuntu-latest
89    steps:
90      - uses: actions/checkout@v3
91      - uses: dtolnay/rust-toolchain@stable
92      - run: cargo build --no-default-features --features alloc
93      - run: cargo build --no-default-features --features alloc,taffy_tree
94      - run: cargo test  --no-default-features --features alloc,taffy_tree
95
96  test-features-default-no-grid:
97    name: "Test Suite [Features: std (no grid)]"
98    runs-on: ubuntu-latest
99    steps:
100      - uses: actions/checkout@v3
101      - uses: dtolnay/rust-toolchain@stable
102      - run: cargo build --no-default-features --features std
103      - run: cargo build --no-default-features --features std,taffy_tree
104      - run: cargo test --no-default-features --features std,taffy_tree
105
106  fmt:
107    name: Rustfmt
108    runs-on: ubuntu-latest
109    steps:
110      - uses: actions/checkout@v3
111      - uses: dtolnay/rust-toolchain@master
112        with:
113          toolchain: stable
114          components: rustfmt
115      - run: cargo fmt --all -- --check
116
117  clippy:
118    name: Clippy
119    runs-on: ubuntu-latest
120    steps:
121      - uses: actions/checkout@v3
122      - uses: dtolnay/rust-toolchain@master
123        with:
124          toolchain: nightly
125          components: clippy
126      - run: cargo +nightly clippy --workspace -- -D warnings
127
128  doc:
129    name: Documentation
130    runs-on: ubuntu-latest
131    steps:
132      - uses: actions/checkout@v3
133      - uses: dtolnay/rust-toolchain@master
134        with:
135          toolchain: stable
136          components: clippy
137      - run: cargo doc
138
139  benchmarks:
140    name: Build Benchmarks
141    runs-on: ubuntu-latest
142    steps:
143      - uses: actions/checkout@v3
144      - uses: dtolnay/rust-toolchain@stable
145      - run: cargo xbench --no-run
146        name: Build benchmarks
147        env:
148          RUSTFLAGS: "-C opt-level=0" 
149
150  benchmarks-with-yoga:
151    name: Build Benchmarks (w/ yoga)
152    runs-on: ubuntu-latest
153    steps:
154      - uses: actions/checkout@v3
155      - uses: dtolnay/rust-toolchain@stable
156      - run: cargo xbench --no-run --features yoga
157        name: Build benchmarks (w/yoga)
158        env:
159            RUSTFLAGS: "-C opt-level=0" 
160
161  markdownlint:
162    name: Markdown Lint
163    runs-on: ubuntu-latest
164    steps:
165      - uses: actions/checkout@v3
166      - name: Run Markdown Lint
167        uses: DavidAnson/markdownlint-cli2-action@v9
168        with:
169          globs: '**/*.md'