-
Notifications
You must be signed in to change notification settings - Fork 189
93 lines (85 loc) · 3.28 KB
/
ci.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
on: [push, pull_request]
name: CI
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: cargo check --workspace --all-targets --all-features
check_msrv:
name: Check ash, ash-window and ash-rewrite MSRV (1.69.0)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.69.0
- name: Check ash, ash-window and ash-rewrite
run: cargo check -p ash -p ash-rewrite -p ash-window --all-features
- name: Check ash with no_std
run: cargo check -p ash --no-default-features
# TODO: add a similar job for the rewrite once that generates code
generated:
name: Generated
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout submodule
# Manually update submodules with --checkout because they are configured with update=none and will be skipped otherwise
run: git submodule update --recursive --init --force --checkout
- name: Run generator
run: cargo run -p generator
- name: Diff autogen result
run: test -z "$(git status --porcelain)" || (echo "::error::Generated files are different, please regenerate with cargo run -p generator!"; git diff; false)
test:
name: Test Suite
runs-on: ubuntu-latest
steps:
- name: Install Vulkan loader
run: sudo apt-get install libvulkan-dev
- uses: actions/checkout@v4
- name: Test all targets
run: cargo test --workspace --all-targets
- name: Test docs
run: cargo test --workspace --doc
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: cargo fmt --all -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
strategy:
matrix:
target:
- x86_64-pc-windows-msvc
- x86_64-unknown-linux-gnu
- x86_64-apple-darwin
- aarch64-apple-ios
steps:
- uses: actions/checkout@v4
- name: Add Rust target ${{ matrix.target }}
run: rustup target add ${{ matrix.target }}
- name: Clippy lint without features
# Only test the core ash, ash-rewrite and ash-window crate, where features reside.
# The examples crate would otherwise enable all default features again,
# making this test moot.
run: cargo clippy --target ${{ matrix.target }} -p ash -p ash-rewrite -p ash-window --no-default-features -- -D warnings
- name: Clippy lint with all features
# Examples don't compile for iOS currently due to lacking run_return()
if: ${{ matrix.target != 'aarch64-apple-ios' }}
run: cargo clippy --target ${{ matrix.target }} --workspace --all-targets --all-features -- -D warnings
- name: Clippy lint with default features
# Examples don't compile for iOS currently due to lacking run_return()
if: ${{ matrix.target != 'aarch64-apple-ios' }}
run: cargo clippy --target ${{ matrix.target }} --workspace --all-targets -- -D warnings
docs:
name: Build-test docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Document all crates
env:
RUSTDOCFLAGS: -Dwarnings
run: cargo doc --all --all-features --no-deps --document-private-items