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

Brody personal ci testing for no-std support in naga #1

Draft
wants to merge 34 commits into
base: trunk
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
cb81b76
no-std support in naga
brody4hire Jan 17, 2025
af03315
Merge branch 'trunk' of https://github.com/gfx-rs/wgpu into no-std-su…
brody4hire Jan 19, 2025
d384d26
no-std clippy check for naga
brody4hire Jan 19, 2025
ed241c3
start CI testing with no std features
brody4hire Jan 19, 2025
e610a43
Merge branch 'trunk' of https://github.com/gfx-rs/wgpu into no-std-su…
brody4hire Jan 19, 2025
136206d
fixup no-std feature test CI task
brody4hire Jan 19, 2025
2cd4f23
update no-std feature test comment in ci.yml
brody4hire Jan 19, 2025
e4ec12a
fixup no-std build - partial fixup with XXX TODO remaining in naga/sr…
brody4hire Jan 19, 2025
cca6cef
fixup naga/tests/snapshots.rs
brody4hire Jan 19, 2025
b078c6c
additional fixup: naga/src/proc/constant_evaluator.rs
brody4hire Jan 19, 2025
e143422
XXX UPDATE: wgpu-hal/src/gles/device.rs
brody4hire Jan 19, 2025
24e1f0d
XXX TODO in ci.yml
brody4hire Jan 19, 2025
b650dfe
remove import not needed: borrow::ToOwned
brody4hire Jan 19, 2025
141b1cd
fixup fmt: naga/src/proc/constant_evaluator.rs
brody4hire Jan 19, 2025
2384b13
fixup fmt etc: naga/src/lib.rs
brody4hire Jan 19, 2025
a5a963d
use #[allow(unused_imports] as quick workaround to avoid failures wit…
brody4hire Jan 19, 2025
c80ae2f
fixup: use naga::FastHashMap in wgpu-hal
brody4hire Jan 19, 2025
e51f78d
XXX temporary build fixup: wgpu-hal/src/vulkan/device.rs
brody4hire Jan 19, 2025
45efdf2
XXX TBD std feature gate for front::wgsl::parse::directive
brody4hire Jan 19, 2025
ad325dc
fixup feature spec for std & multiple dependencies
brody4hire Jan 20, 2025
d706eae
update feature spec for feature: glsl-in
brody4hire Jan 20, 2025
b2964a9
Merge branch 'trunk' of https://github.com/gfx-rs/wgpu into no-std-su…
brody4hire Jan 20, 2025
6a095af
support dot-out with no-std
brody4hire Jan 20, 2025
a5f2aae
update CI to test dot-out with no-std (etc)
brody4hire Jan 20, 2025
3a62d43
support glsl-out with no-std
brody4hire Jan 20, 2025
d9e05fe
fixup: ignore unused imports for now in aliases::std
brody4hire Jan 20, 2025
ace1de4
support msl-out with no-std
brody4hire Jan 20, 2025
c73bd2f
Move Examples to Subfolder
cwfitzgerald Jan 4, 2025
43b6637
Remove Hello Example
cwfitzgerald Jan 4, 2025
7fccb6b
Standalone Compute
cwfitzgerald Jan 5, 2025
04e40dd
Update Vulkan SDK (#6955)
cwfitzgerald Jan 21, 2025
b9f0c9b
require std for naga remaining features (for now at least); update XX…
brody4hire Jan 21, 2025
7574eca
Merge branch 'trunk' of https://github.com/gfx-rs/wgpu into no-std-su…
brody4hire Jan 21, 2025
aed9f7e
remove outdated XXX TODO comment from ci.yml
brody4hire Jan 21, 2025
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
1 change: 1 addition & 0 deletions .deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ allow = [
"Unicode-3.0",
"Zlib",
]
private = { ignore = true }

[sources]
allow-git = [
Expand Down
48 changes: 37 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name: CI
on:
push:
branches-ignore: [
# We don't need to run on dependabot PRs.
"dependabot/**",
# This is the branch the merge queue creates.
"gh-readonly-queue/**"
]
# We don't need to run on dependabot PRs.
"dependabot/**",
# This is the branch the merge queue creates.
"gh-readonly-queue/**",
]
tags: [v0.*]
pull_request:
merge_group:
Expand All @@ -20,7 +20,7 @@ env:
# Sourced from https://vulkan.lunarg.com/sdk/home#linux
#
# We don't include the 4th version number, as it's not used in any URL.
VULKAN_SDK_VERSION: "1.3.290"
VULKAN_SDK_VERSION: "1.4.304"
# Sourced from https://www.nuget.org/packages/Microsoft.Direct3D.WARP
WARP_VERSION: "1.0.13"

Expand Down Expand Up @@ -56,6 +56,7 @@ env:
RUST_LOG: debug
RUST_BACKTRACE: full
PKG_CONFIG_ALLOW_CROSS: 1 # allow android to work
# XXX TODO CONFIGURE THIS PER JOB - NOT ALL JOBS SHOULD FAIL WITH CARGO WARNINGS
RUSTFLAGS: -D warnings
RUSTDOCFLAGS: -D warnings
WASM_BINDGEN_TEST_TIMEOUT: 300 # 5 minutes
Expand Down Expand Up @@ -161,15 +162,15 @@ jobs:
target: wasm32-unknown-emscripten
tier: 2
kind: wgpu-only

# TODO: Uncomment once web-sys updates past 0.3.76
# See https://github.com/rustwasm/wasm-bindgen/pull/4378 for details
# - name: WebAssembly Core 1.0
# os: ubuntu-22.04
# target: wasm32v1-none
# tier: 2
# kind: no_std

# Bare-metal x86-64
# TODO: Remove once web-sys updates past 0.3.76
# Included while wasm32v1-none is failing to ensure `no_std` does not regress
Expand All @@ -179,6 +180,13 @@ jobs:
tier: 2
kind: no_std

# XXX TODO MOVE INTO SEPARATE CI JOB:
- name: no-std feature test - Linux x86_64
os: ubuntu-22.04
target: x86_64-unknown-linux-gnu
tier: 1
kind: no-std-feature-test

name: Clippy ${{ matrix.name }}
runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -276,19 +284,23 @@ jobs:
# Check with all features.
cargo clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} -p wgpu-hal --all-features
cargo clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} -p wgpu --all-features

# Building for no_std platforms where every feature is enabled except "std".
- name: check no_std
if: matrix.kind == 'no_std'
shell: bash
run: |
set -e

# check with no features
# Check wgpu-types with no features.
cargo clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} -p wgpu-types --no-default-features
# Check naga with no features.
cargo clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} -p naga --no-default-features

# Check with all features except "std".
# Check wgpu-types with all features except "std".
cargo clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} -p wgpu-types --no-default-features --features strict_asserts,fragile-send-sync-non-atomic-wasm,serde,counters
# Check naga with all features possible for no-std.
cargo clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} -p naga --no-default-features --features dot-out,glsl-out,msl-out

# Building for native platforms with standard tests.
- name: check native
Expand All @@ -306,6 +318,20 @@ jobs:
# build docs
cargo doc --target ${{ matrix.target }} ${{ matrix.extra-flags }} --all-features --no-deps

# XXX TODO MOVE INTO SEPARATE CI JOB - MAY SHOW UP AS A "Clippy" job in GitHub CI
- name: no-std feature test
if: matrix.kind == 'no-std-feature-test'
shell: bash
run: |
set -e

# no-std feature test with no features - naga
cargo test --target ${{ matrix.target }} ${{ matrix.extra-flags }} -p naga --no-default-features

# XXX TODO FIX & TEST MULTIPLE naga features for no-std
# no-std test with multiple features - naga
# cargo test [...]

- name: check private item docs
if: matrix.kind == 'native'
shell: bash
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/generate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: cargo-generate

on:
push:
branches: ["*"]
tags: [v0.*]
pull_request:
merge_group:

env:
#
# Dependency versioning
#

# This is the MSRV used by `wgpu` itself and all surrounding infrastructure.
REPO_MSRV: "1.83"
RUSTFLAGS: -D warnings

jobs:
cargo-generate:
timeout-minutes: 5

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
include:
- name: "01-hello-compute"
path: "examples/standalone/01_hello_compute"

name: "${{ matrix.name }}"

steps:
- uses: actions/checkout@v2

- name: Install Repo MSRV toolchain
run: |
rustup toolchain install ${{ env.REPO_MSRV }} --no-self-update --profile=minimal
rustup override set ${{ env.REPO_MSRV }}
cargo -V

- name: "Install cargo-generate"
uses: taiki-e/install-action@v2
with:
tool: cargo-generate

- name: "Run cargo-generate"
run: |
cd ..
cargo generate --path wgpu --name ${{ matrix.name }} ${{ matrix.path }}

- name: "Check generated files"
run: |
cd ../${{ matrix.name }}/
cat <<EOF >> Cargo.toml
[patch.crates-io]
wgpu = { path = "../wgpu/wgpu" }
EOF
cargo check
18 changes: 8 additions & 10 deletions .github/workflows/shaders.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name: Shaders
on:
push:
branches-ignore: [
# We don't need to run on dependabot PRs.
"dependabot/**",
# This is the branch the merge queue creates.
"gh-readonly-queue/**"
]
# We don't need to run on dependabot PRs.
"dependabot/**",
# This is the branch the merge queue creates.
"gh-readonly-queue/**",
]
tags: [v0.*]
pull_request:
merge_group:
Expand All @@ -16,9 +16,7 @@ env:
# Sourced from https://vulkan.lunarg.com/sdk/home#linux
#
# We don't include the 4th version number, as it's not used in any URL.
#
# Held back from 1.3.290 by https://github.com/gfx-rs/wgpu/issues/6307
VULKAN_SDK_VERSION: "1.3.283"
VULKAN_SDK_VERSION: "1.4.304"

# Sourced from https://github.com/microsoft/DirectXShaderCompiler/releases
#
Expand Down Expand Up @@ -89,7 +87,7 @@ jobs:

naga-validate-linux:
name: "Validate: SPIR-V/GLSL/DOT/WGSL"
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4

Expand All @@ -102,7 +100,7 @@ jobs:

# vulkan sdk
wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-$VULKAN_SDK_VERSION-jammy.list https://packages.lunarg.com/vulkan/$VULKAN_SDK_VERSION/lunarg-vulkan-$VULKAN_SDK_VERSION-jammy.list
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-$VULKAN_SDK_VERSION-noble.list https://packages.lunarg.com/vulkan/$VULKAN_SDK_VERSION/lunarg-vulkan-$VULKAN_SDK_VERSION-noble.list

sudo apt-get update
sudo apt install -y vulkan-sdk
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ Bottom level categories:

## Unreleased

### Major changes

#### no-std support in naga

XXX TODO

### New Features

#### Naga
Expand Down
29 changes: 24 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading