|
14 | 14 | merge_group: |
15 | 15 |
|
16 | 16 | env: |
| 17 | + # |
| 18 | + # Keep in sync with cts.yml |
| 19 | + # |
| 20 | + |
17 | 21 | # |
18 | 22 | # Dependency versioning |
19 | 23 | # |
|
27 | 31 | CORE_MSRV: "1.87" |
28 | 32 |
|
29 | 33 | # |
30 | | - # Environment variables |
| 34 | + # Build and test configuration |
31 | 35 | # |
32 | 36 |
|
33 | 37 | CARGO_INCREMENTAL: false |
34 | 38 | CARGO_TERM_COLOR: always |
35 | | - WGPU_DX12_COMPILER: dxc |
36 | 39 | RUST_LOG: debug,wasm_bindgen_wasm_interpreter=warn,wasm_bindgen_cli_support=warn,walrus=warn,naga=info |
37 | 40 | RUST_BACKTRACE: full |
38 | 41 | PKG_CONFIG_ALLOW_CROSS: 1 # allow android to work |
|
42 | 45 | CACHE_SUFFIX: e # cache busting |
43 | 46 | WGPU_CI: true |
44 | 47 |
|
| 48 | + # |
| 49 | + # Runtime configuration |
| 50 | + # |
| 51 | + |
| 52 | + LVP_POISON_MEMORY: true # to test memory init; see docs/testing.md |
| 53 | + WGPU_DX12_COMPILER: dxc |
| 54 | + |
45 | 55 | # Every time a PR is pushed to, cancel any previous jobs. This |
46 | 56 | # makes us behave nicer to github and get faster turnaround times |
47 | 57 | # on PRs that are pushed to multiple times in rapid succession. |
@@ -577,16 +587,25 @@ jobs: |
577 | 587 | rustup override set ${{ env.REPO_MSRV }} |
578 | 588 | cargo -V |
579 | 589 |
|
580 | | - - name: Install `wasm-pack` |
| 590 | + - name: Get `wasm-bindgen` version |
| 591 | + run: | |
| 592 | + WASM_BINDGEN_VERSION=$(cargo metadata --format-version 1 --all-features | jq '.packages[] | select(.name == "wasm-bindgen") | .version' | tr -d '"') |
| 593 | +
|
| 594 | + echo $WASM_BINDGEN_VERSION |
| 595 | +
|
| 596 | + echo "WASM_BINDGEN_VERSION=$WASM_BINDGEN_VERSION" >> "$GITHUB_ENV" |
| 597 | +
|
| 598 | + - name: Install `wasm-bindgen` |
| 599 | + run: cargo +stable install wasm-bindgen-cli --version=$WASM_BINDGEN_VERSION |
| 600 | + |
| 601 | + - name: Install `cargo-nextest` |
581 | 602 | uses: taiki-e/install-action@v2 |
582 | 603 | with: |
583 | | - tool: wasm-pack |
| 604 | + tool: cargo-nextest |
584 | 605 |
|
585 | 606 | - name: Execute tests |
586 | 607 | run: | |
587 | | - cd wgpu |
588 | | -
|
589 | | - wasm-pack test --headless --chrome --no-default-features --features wgsl,webgl,web --workspace |
| 608 | + cargo xtask test-wasm |
590 | 609 |
|
591 | 610 | gpu-test: |
592 | 611 | # runtime is normally 5-15 minutes |
@@ -727,7 +746,7 @@ jobs: |
727 | 746 | cargo --locked llvm-cov report --lcov --output-path lcov.info |
728 | 747 |
|
729 | 748 | - name: Upload coverage report to Codecov |
730 | | - uses: codecov/codecov-action@v6 |
| 749 | + uses: codecov/codecov-action@v7 |
731 | 750 | if: steps.coverage.outcome == 'success' |
732 | 751 | with: |
733 | 752 | files: lcov.info |
@@ -816,26 +835,20 @@ jobs: |
816 | 835 | rustup override set ${{ env.REPO_MSRV }} |
817 | 836 | cargo -V |
818 | 837 |
|
819 | | - # NOTE: Keep this above the others, because this will fail if there are _any_ changes to |
820 | | - # files, even ones this step doesn't modify. |
821 | 838 | - name: "Format `**/*.{md,js,html,yml}` files" |
822 | | - uses: creyD/prettier_action@v4.6 |
823 | | - with: |
824 | | - prettier_version: 3.8.1 |
825 | | - prettier_options: --check --write . |
826 | | - dry: true |
| 839 | + run: npx --yes prettier@3.8.1 --check . |
827 | 840 |
|
828 | 841 | - name: Run `cargo fmt` |
829 | 842 | run: | |
830 | 843 | cargo --locked fmt -- --check |
831 | 844 |
|
832 | | - - name: Install Taplo |
833 | | - uses: uncenter/setup-taplo@v2 |
| 845 | + - name: Install Tombi |
| 846 | + uses: tombi-toml/setup-tombi@v1.1.3 |
834 | 847 | with: |
835 | | - version: "0.9.3" |
| 848 | + version: "1.1.3" |
836 | 849 |
|
837 | | - - name: Run `taplo fmt` |
838 | | - run: taplo format --check --diff |
| 850 | + - name: Format TOML files |
| 851 | + run: tombi format --check --diff |
839 | 852 |
|
840 | 853 | - name: Check for typos |
841 | 854 | uses: crate-ci/typos@v1.47.2 |
|
0 commit comments