Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor spirv-builder to build codegen and sysroot itself #239

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
check:
name: Test
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
Expand Down Expand Up @@ -82,11 +83,13 @@ jobs:
# Unset legacy paths:
echo "ANDROID_NDK_HOME=" >> $env:GITHUB_ENV
echo "ANDROID_NDK_PATH=" >> $env:GITHUB_ENV
# Perform a clean build on Windows.
cargo clean --manifest-path examples/runners/wgpu/Cargo.toml

- name: Compile WGPU example for Android
run: |
rustup target add aarch64-linux-android
cargo apk build --manifest-path examples/runners/wgpu/Cargo.toml --features use-installed-tools --no-default-features
cargo apk build --manifest-path examples/runners/wgpu/Cargo.toml

lint:
name: Lint
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/clippy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,12 @@ function clippy_no_features() {

# Core crates
clippy crates/rustc_codegen_spirv
clippy crates/spirv-builder
clippy_no_features crates/spirv-builder

# Examples
# Examples
clippy_no_features examples/runners/ash
clippy_no_features examples/runners/wgpu

clippy examples/runners/ash
clippy examples/runners/wgpu

clippy_no_features examples/runners/cpu
clippy_no_features examples/shaders/sky-shader
clippy_no_features examples/runners/cpu
clippy_no_features examples/shaders/sky-shader
clippy_no_features examples/shaders/simplest-shader
20 changes: 10 additions & 10 deletions .github/workflows/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ os=$1

function cargo_test() {
echo ::group::"$1 build"
cargo test \
cargo build \
--manifest-path "$1/Cargo.toml" \
--no-default-features \
--features "$FEAT" \
--no-run
--tests
echo ::endgroup::

echo ::group::"$1 test"
Expand All @@ -28,26 +28,26 @@ function cargo_test() {

function cargo_test_no_features() {
echo ::group::"$1 build"
cargo test --manifest-path "$1/Cargo.toml" --no-run
cargo build --manifest-path $1/Cargo.toml
echo ::endgroup::

echo ::group::"$1 test"
cargo test --manifest-path "$1/Cargo.toml"
cargo test --manifest-path $1/Cargo.toml
echo ::endgroup::
}

# Core crates
cargo_test crates/rustc_codegen_spirv
cargo_test crates/spirv-builder
# # Core crates
cargo_test_no_features crates/rustc_codegen_spirv
cargo_test_no_features crates/spirv-builder
cargo_test_no_features crates/spirv-std

# Examples
# See: https://github.com/EmbarkStudios/rust-gpu/issues/84
if [[ "$os" != "macOS" ]]; then
cargo_test examples/runners/ash
cargo_test_no_features examples/runners/ash
fi

cargo_test examples/runners/wgpu

cargo_test_no_features examples/runners/wgpu
cargo_test_no_features examples/runners/cpu
cargo_test_no_features examples/shaders/sky-shader
cargo_test_no_features examples/shaders/simplest-shader
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
target/
examples/**/Cargo.lock
Loading