static dxc #219
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
name: validation jobs | |
on: | |
push: | |
env: | |
CARGO_TERM_COLOR: always | |
CARGO_INCREMENTAL: 0 | |
CARGO_PROFILE_TEST_DEBUG: 0 | |
CARGO_PROFILE_DEV_DEBUG: 0 | |
# If nightly is breaking CI, modify this variable to target a specific nightly version. | |
NIGHTLY_TOOLCHAIN: nightly | |
jobs: | |
run-examples-on-windows-dx12: | |
# also run when pushed to main to update reference screenshots | |
if: ${{ github.event_name != 'pull_request' }} | |
runs-on: windows-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- name: Run examples | |
shell: bash | |
run: | | |
for example in .github/example-run/*.ron; do | |
example_name=`basename $example .ron` | |
echo -n $example_name > last_example_run | |
echo "running $example_name - "`date` | |
time WGPU_BACKEND=dx12 TRACE_CHROME=trace-$example_name.json CI_TESTING_CONFIG=$example cargo run --example $example_name --features "statically-linked-dxc,bevy_ci_testing,trace,trace_chrome" | |
sleep 10 | |
if [ `find ./ -maxdepth 1 -name 'screenshot-*.png' -print -quit` ]; then | |
mkdir screenshots-$example_name | |
mv screenshot-*.png screenshots-$example_name/ | |
fi | |
done | |
mkdir traces && mv trace*.json traces/ | |
mkdir screenshots && mv screenshots-* screenshots/ | |
- name: save traces | |
uses: actions/upload-artifact@v4 | |
with: | |
name: example-traces-windows | |
path: traces | |
- name: save screenshots | |
uses: actions/upload-artifact@v4 | |
with: | |
name: screenshots-windows | |
path: screenshots | |
- uses: actions/upload-artifact@v4 | |
if: ${{ failure() && github.event_name == 'pull_request' }} | |
with: | |
name: example-run-windows | |
path: example-run/ |