-
Notifications
You must be signed in to change notification settings - Fork 960
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
72 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,8 +8,10 @@ on: | |
merge_group: | ||
|
||
env: | ||
RUST_BACKTRACE: 1 | ||
RUST_VERSION: 1.64 | ||
CARGO_INCREMENTAL: false | ||
CARGO_TERM_COLOR: always | ||
RUST_BACKTRACE: full | ||
MSRV: 1.64 | ||
PKG_CONFIG_ALLOW_CROSS: 1 # allow android to work | ||
RUSTFLAGS: --cfg=web_sys_unstable_apis -D warnings | ||
RUSTDOCFLAGS: -Dwarnings | ||
|
@@ -92,22 +94,17 @@ jobs: | |
- name: checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: install rust ${{ env.RUST_VERSION }} | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ env.RUST_VERSION }} | ||
target: ${{ matrix.target }} | ||
profile: minimal | ||
override: true | ||
components: clippy | ||
- name: Install MSRV toolchain | ||
run: | | ||
rustup toolchain install ${{ env.MSRV }} --no-self-update --profile=minimal --component clippy --target ${{ matrix.target }} | ||
rustup default ${{ env.MSRV }} | ||
- name: disable debug | ||
shell: bash | ||
run: | | ||
mkdir -p .cargo | ||
echo """ | ||
[profile.dev] | ||
incremental = false | ||
debug = false" >> .cargo/config.toml | ||
- name: caching | ||
|
@@ -142,8 +139,7 @@ jobs: | |
set -e | ||
# build for Emscripten/WebGL | ||
cargo clippy --target ${{ matrix.target }} -p wgpu -p wgpu-hal \ | ||
--no-default-features --features webgl,emscripten | ||
cargo clippy --target ${{ matrix.target }} -p wgpu -p wgpu-hal --no-default-features --features webgl,emscripten | ||
# build cube example | ||
cargo clippy --target ${{ matrix.target }} --example cube --features webgl,emscripten | ||
|
@@ -164,8 +160,7 @@ jobs: | |
# (But watch out for backend-selection features in wgpu-core; some of | ||
# those only build on the right platforms.) | ||
cargo clippy --target ${{ matrix.target }} -p wgpu -p wgpu-info -p player --tests --all-features | ||
cargo clippy --target ${{ matrix.target }} -p wgpu-core --tests \ | ||
--features="portable_features" | ||
cargo clippy --target ${{ matrix.target }} -p wgpu-core --tests --features="portable_features" | ||
# build docs | ||
# (Watch out for backend-selection features in wgpu-core; some of | ||
|
@@ -180,19 +175,14 @@ jobs: | |
- name: checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: install rust stable | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
profile: minimal | ||
override: true | ||
|
||
- name: install wasm-pack # install from fork until this is merged: https://github.com/rustwasm/wasm-pack/pull/1185 | ||
run: | | ||
# replace with "install wasm-pack action", which doesn't work for this project because of https://github.com/rustwasm/wasm-pack/issues/1180 | ||
# - name: install wasm-pack | ||
# uses: jetli/[email protected] | ||
cargo install --git https://github.com/haraldreingruber/wasm-pack wasm-pack | ||
# TODO: replace with this once there is a release containing this PR: | ||
# https://github.com/rustwasm/wasm-pack/pull/1185 | ||
# - name: Install wasm-pack | ||
# uses: taiki-e/install-action@v2 | ||
# with: | ||
# tool: wasm-pack | ||
- name: install wasm-pack | ||
run: cargo install --git https://github.com/rustwasm/wasm-pack --rev e1010233b0ce304f42cda59962254bf30ae97c3e wasm-pack | ||
|
||
- name: execute tests | ||
run: | | ||
|
@@ -221,18 +211,10 @@ jobs: | |
- name: checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: install rust stable | ||
uses: actions-rs/toolchain@v1 | ||
- name: Install cargo-nextest and cargo-llvm-cov | ||
uses: taiki-e/install-action@v2 | ||
with: | ||
toolchain: nightly | ||
profile: minimal | ||
override: true | ||
components: llvm-tools-preview | ||
|
||
- name: latest cargo-nextest | ||
uses: taiki-e/install-action@nextest | ||
- name: install cargo-llvm-cov | ||
uses: taiki-e/install-action@cargo-llvm-cov | ||
tool: cargo-nextest,cargo-llvm-cov | ||
|
||
- name: install swiftshader | ||
if: matrix.os == 'ubuntu-22.04' | ||
|
@@ -266,7 +248,6 @@ jobs: | |
mkdir -p .cargo | ||
echo """ | ||
[profile.dev] | ||
incremental = false | ||
debug = 1" >> .cargo/config.toml | ||
- name: caching | ||
|
@@ -279,7 +260,7 @@ jobs: | |
run: | | ||
set -e | ||
cargo llvm-cov run --bin wgpu-info --no-report | ||
cargo llvm-cov --no-cfg-coverage run --bin wgpu-info --no-report | ||
- name: run tests | ||
shell: bash | ||
|
@@ -288,7 +269,7 @@ jobs: | |
for backend in ${{ matrix.backends }}; do | ||
echo "======= NATIVE TESTS $backend ======"; | ||
WGPU_BACKEND=$backend cargo llvm-cov nextest -p wgpu -p wgpu-types -p wgpu-hal -p wgpu-core -p player --no-fail-fast --no-report | ||
WGPU_BACKEND=$backend cargo llvm-cov --no-cfg-coverage nextest -p wgpu -p wgpu-types -p wgpu-hal -p wgpu-core -p player --no-fail-fast --no-report | ||
done | ||
- name: generate coverage report | ||
|
@@ -305,26 +286,18 @@ jobs: | |
|
||
doctest: | ||
name: Doctest | ||
runs-on: ubuntu-22.04 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: install rust stable | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
profile: minimal | ||
override: true | ||
|
||
- name: disable debug | ||
shell: bash | ||
run: | | ||
mkdir -p .cargo | ||
echo """ | ||
[profile.dev] | ||
incremental = false | ||
debug = 1" >> .cargo/config.toml | ||
- name: caching | ||
|
@@ -346,14 +319,6 @@ jobs: | |
- name: checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: install rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
components: rustfmt | ||
|
||
- name: run rustfmt | ||
run: | | ||
cargo fmt -- --check | ||
|
@@ -365,21 +330,17 @@ jobs: | |
- name: checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: install rust ${{ env.RUST_VERSION }} | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: ${{ env.RUST_VERSION }} | ||
override: true | ||
components: clippy | ||
- name: Install MSRV toolchain | ||
run: | | ||
rustup toolchain install ${{ env.MSRV }} --no-self-update --profile=minimal --component clippy | ||
rustup default ${{ env.MSRV }} | ||
- name: disable debug | ||
shell: bash | ||
run: | | ||
mkdir -p .cargo | ||
echo """ | ||
[profile.dev] | ||
incremental = false | ||
debug = 1" >> .cargo/config.toml | ||
- name: caching | ||
|
@@ -403,7 +364,7 @@ jobs: | |
with: | ||
command: check advisories | ||
arguments: --all-features --workspace | ||
rust-version: ${{ env.RUST_VERSION }} | ||
rust-version: ${{ env.MSRV }} | ||
|
||
cargo-deny-check-rest: | ||
name: "Run `cargo deny check`" | ||
|
@@ -417,4 +378,4 @@ jobs: | |
with: | ||
command: check bans licenses sources | ||
arguments: --all-features --workspace | ||
rust-version: ${{ env.RUST_VERSION }} | ||
rust-version: ${{ env.MSRV }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters