-
Notifications
You must be signed in to change notification settings - Fork 388
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run Linux & Windows screenshot tests via
lavapipe
software rasteriz…
…er (#8620)
- Loading branch information
Showing
13 changed files
with
422 additions
and
82 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 |
---|---|---|
|
@@ -31,6 +31,9 @@ env: | |
# these incremental artifacts when running on CI. | ||
CARGO_INCREMENTAL: "0" | ||
|
||
# Sourced from https://vulkan.lunarg.com/sdk/home#linux | ||
VULKAN_SDK_VERSION: "1.3.296.0" | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
@@ -97,6 +100,19 @@ jobs: | |
with: | ||
pixi-version: v0.39.0 | ||
|
||
# Install the Vulkan SDK, so we can use the software rasterizer. | ||
# TODO(andreas): It would be nice if `setup_software_rasterizer.py` could do that for us as well (note though that this action here is very fast when cached!) | ||
- name: Install Vulkan SDK | ||
uses: jakoch/[email protected] | ||
with: | ||
vulkan_version: ${{ env.VULKAN_SDK_VERSION }} | ||
install_runtime: true | ||
cache: false | ||
stripdown: true | ||
|
||
- name: Setup software rasterizer | ||
run: pixi run python ./scripts/ci/setup_software_rasterizer.py | ||
|
||
- name: Rust checks & tests | ||
run: pixi run rs-check --skip individual_crates docs_slow | ||
|
||
|
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 |
---|---|---|
|
@@ -15,7 +15,6 @@ concurrency: | |
cancel-in-progress: true | ||
|
||
env: | ||
PYTHON_VERSION: "3.8" | ||
# web_sys_unstable_apis is required to enable the web_sys clipboard API which egui_web uses | ||
# https://rustwasm.github.io/wasm-bindgen/api/web_sys/struct.Clipboard.html | ||
# https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html | ||
|
@@ -34,6 +33,12 @@ env: | |
# these incremental artifacts when running on CI. | ||
CARGO_INCREMENTAL: "0" | ||
|
||
# Improve diagnostics for crashes. | ||
RUST_BACKTRACE: full | ||
|
||
# Sourced from https://vulkan.lunarg.com/sdk/home#linux | ||
VULKAN_SDK_VERSION: "1.3.296.0" | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
@@ -52,6 +57,7 @@ jobs: | |
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || '' }} | ||
lfs: true | ||
|
||
- name: Set up Rust | ||
uses: ./.github/actions/setup-rust | ||
|
@@ -65,11 +71,32 @@ jobs: | |
with: | ||
pixi-version: v0.39.0 | ||
|
||
- name: Rust checks & tests | ||
# Install the Vulkan SDK, so we can use the software rasterizer. | ||
# TODO(andreas): It would be nice if `setup_software_rasterizer.py` could do that for us as well (note though that this action here is very fast when cached!) | ||
- name: Install Vulkan SDK | ||
uses: jakoch/[email protected] | ||
with: | ||
vulkan_version: ${{ env.VULKAN_SDK_VERSION }} | ||
install_runtime: true | ||
cache: false | ||
stripdown: true | ||
|
||
- name: Setup software rasterizer | ||
run: pixi run python ./scripts/ci/setup_software_rasterizer.py | ||
|
||
- name: Rust checks (PR subset) | ||
if: ${{ inputs.CHANNEL == 'pr' }} | ||
run: pixi run rs-check --only base_checks sdk_variations cargo_deny wasm docs | ||
|
||
- name: Download test assets | ||
run: pixi run python ./tests/assets/download_test_assets.py | ||
|
||
- name: Run tests (`cargo test --all-targets --all-features`) | ||
if: ${{ inputs.CHANNEL == 'pr' }} | ||
run: pixi run rs-check --skip individual_crates tests docs_slow | ||
# Need to use pixi due to NASM dependency. | ||
run: pixi run cargo test --all-targets --all-features | ||
|
||
- name: Rust checks & tests | ||
- name: Rust most checks & tests | ||
if: ${{ inputs.CHANNEL == 'main' }} | ||
run: pixi run rs-check --skip individual_crates docs_slow | ||
|
||
|
@@ -83,10 +110,10 @@ jobs: | |
strategy: | ||
matrix: | ||
include: | ||
# TODO(#8245): we run mac tests on `main` because that's the only platform where UI snapshot tests are covered. | ||
# When the linux runners are able to run these tests (with a software renderer), we can move that back to all nightly. | ||
- os: ${{ inputs.CHANNEL == 'main' && 'macos-latest' || 'windows-latest-8-cores' }} | ||
name: ${{ inputs.CHANNEL == 'main' && 'macos' || 'windows' }} | ||
- os: "macos-latest" | ||
name: "macos" | ||
- os: "windows-latest-8-cores" | ||
name: "windows" | ||
|
||
# Note: we can't use `matrix.os` here because its evaluated before the matrix stuff. | ||
if: ${{ inputs.CHANNEL == 'main' || inputs.CHANNEL == 'nightly' }} | ||
|
@@ -109,8 +136,28 @@ jobs: | |
with: | ||
pixi-version: v0.39.0 | ||
|
||
# Install the Vulkan SDK, so we can use the software rasterizer. | ||
# TODO(andreas): It would be nice if `setup_software_rasterizer.py` could do that for us as well (note though that this action here is very fast when cached!) | ||
- name: Install Vulkan SDK | ||
if: ${{ matrix.name != 'macos' }} | ||
uses: jakoch/[email protected] | ||
with: | ||
vulkan_version: ${{ env.VULKAN_SDK_VERSION }} | ||
install_runtime: true | ||
cache: true | ||
stripdown: true | ||
|
||
- name: Setup software rasterizer | ||
run: pixi run python ./scripts/ci/setup_software_rasterizer.py | ||
|
||
- name: Download test assets | ||
run: pixi run python ./tests/assets/download_test_assets.py | ||
|
||
- name: pixi run cargo test --all-targets --all-features | ||
- name: Run tests (`cargo test --all-targets --all-features`) | ||
if: ${{ inputs.CHANNEL == 'main' }} | ||
# Need to use pixi due to NASM dependency. | ||
run: pixi run cargo test --all-targets --all-features | ||
|
||
- name: Rust all checks & tests | ||
if: ${{ inputs.CHANNEL == 'nightly' }} | ||
run: pixi run rs-check |
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
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
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
Oops, something went wrong.