2019-10-21 02:41:13 +11:00
|
|
|
on: [push, pull_request]
|
|
|
|
|
2019-10-21 02:45:18 +11:00
|
|
|
name: CI
|
2019-10-21 02:41:13 +11:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
check:
|
|
|
|
name: Check
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-11-04 04:38:00 +11:00
|
|
|
- uses: actions/checkout@v4
|
2023-04-06 15:50:10 +10:00
|
|
|
- run: cargo check --workspace --all-targets --all-features
|
2019-10-21 02:41:13 +11:00
|
|
|
|
2022-03-28 08:30:10 +11:00
|
|
|
check_msrv:
|
2023-12-03 06:04:57 +11:00
|
|
|
name: Check ash and ash-window MSRV (1.69.0)
|
2022-03-28 08:30:10 +11:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-11-04 04:38:00 +11:00
|
|
|
- uses: actions/checkout@v4
|
2023-12-03 06:04:57 +11:00
|
|
|
- uses: dtolnay/rust-toolchain@1.69.0
|
|
|
|
- run: cargo check -p ash -p ash-rewrite -p ash-window -p ash-examples --all-features
|
2022-03-28 08:30:10 +11:00
|
|
|
|
2023-04-06 15:50:10 +10:00
|
|
|
# TODO: add a similar job for the rewrite once that generates code
|
2021-03-14 21:29:49 +11:00
|
|
|
generated:
|
|
|
|
name: Generated
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-11-04 04:38:00 +11:00
|
|
|
- uses: actions/checkout@v4
|
2023-10-30 22:20:28 +11:00
|
|
|
- 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
|
2021-03-14 21:29:49 +11:00
|
|
|
- name: Run generator
|
2023-04-06 15:50:10 +10:00
|
|
|
run: cargo run -p generator
|
2021-03-14 21:29:49 +11:00
|
|
|
- name: Diff autogen result
|
2023-05-07 04:30:46 +10:00
|
|
|
run: test -z "$(git status --porcelain)" || (echo "::error::Generated files are different, please regenerate with cargo run -p generator!"; git diff; false)
|
2021-03-14 21:29:49 +11:00
|
|
|
|
2019-10-21 02:41:13 +11:00
|
|
|
test:
|
|
|
|
name: Test Suite
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-09-10 06:50:34 +10:00
|
|
|
- name: Install Vulkan loader
|
|
|
|
run: sudo apt-get install libvulkan-dev
|
2023-11-04 04:38:00 +11:00
|
|
|
- uses: actions/checkout@v4
|
2021-03-14 21:31:17 +11:00
|
|
|
- name: Test all targets
|
2023-04-06 15:50:10 +10:00
|
|
|
run: cargo test --workspace --all-targets
|
2021-03-14 21:31:17 +11:00
|
|
|
- name: Test docs
|
2023-04-06 15:50:10 +10:00
|
|
|
run: cargo test --workspace --doc
|
2019-10-21 02:41:13 +11:00
|
|
|
|
|
|
|
fmt:
|
|
|
|
name: Rustfmt
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-11-04 04:38:00 +11:00
|
|
|
- uses: actions/checkout@v4
|
2023-04-06 15:50:10 +10:00
|
|
|
- run: cargo fmt --all -- --check
|
2019-10-21 02:41:13 +11:00
|
|
|
|
|
|
|
clippy:
|
|
|
|
name: Clippy
|
|
|
|
runs-on: ubuntu-latest
|
2023-10-12 05:58:21 +11:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
target:
|
|
|
|
- x86_64-pc-windows-msvc
|
|
|
|
- x86_64-unknown-linux-gnu
|
|
|
|
- x86_64-apple-darwin
|
|
|
|
- aarch64-apple-ios
|
2019-10-21 02:41:13 +11:00
|
|
|
steps:
|
2023-11-04 04:38:00 +11:00
|
|
|
- uses: actions/checkout@v4
|
2023-10-12 05:58:21 +11:00
|
|
|
- name: Add Rust target ${{ matrix.target }}
|
|
|
|
run: rustup target add ${{ matrix.target }}
|
2023-04-06 15:50:10 +10:00
|
|
|
- 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.
|
2023-10-12 05:58:21 +11:00
|
|
|
run: cargo clippy --target ${{ matrix.target }} -p ash -p ash-rewrite -p ash-window --no-default-features -- -D warnings
|
2023-04-06 15:50:10 +10:00
|
|
|
- name: Clippy lint with all features
|
2023-10-12 05:58:21 +11:00
|
|
|
# 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
|
2023-04-06 15:50:10 +10:00
|
|
|
- name: Clippy lint with default features
|
2023-10-12 05:58:21 +11:00
|
|
|
# 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
|
2022-01-23 06:27:07 +11:00
|
|
|
|
|
|
|
docs:
|
|
|
|
name: Build-test docs
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-11-04 04:38:00 +11:00
|
|
|
- uses: actions/checkout@v4
|
2023-04-06 15:50:10 +10:00
|
|
|
- name: Document all crates
|
2022-01-23 06:27:07 +11:00
|
|
|
env:
|
|
|
|
RUSTDOCFLAGS: -Dwarnings
|
2023-04-06 15:50:10 +10:00
|
|
|
run: cargo doc --all --all-features --no-deps --document-private-items
|