CI: use lavapipe instead of swiftshader when running examples (#3358)
# Objective - fixes #3344 - have example run faster ## Solution - thanks to the nice folks at wgpu, I was able to switch from swift shader to lavapipe which is faster - I also reduced the runtime for some of the examples - I enabled the trace_chrome feature on the examples, and stored the results as an artefact. it can be useful to debug - runtime is back to around 10 minutes Co-authored-by: François <8672791+mockersf@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									9a16a4d018
								
							
						
					
					
						commit
						e677755c5e
					
				
							
								
								
									
										2
									
								
								.github/example-run/breakout.ron
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/example-run/breakout.ron
									
									
									
									
										vendored
									
									
								
							| @ -1,3 +1,3 @@ | |||||||
| ( | ( | ||||||
|     exit_after: Some(1800) |     exit_after: Some(900) | ||||||
| ) | ) | ||||||
|  | |||||||
							
								
								
									
										2
									
								
								.github/example-run/contributors.ron
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/example-run/contributors.ron
									
									
									
									
										vendored
									
									
								
							| @ -1,3 +1,3 @@ | |||||||
| ( | ( | ||||||
|     exit_after: Some(1800) |     exit_after: Some(900) | ||||||
| ) | ) | ||||||
|  | |||||||
							
								
								
									
										2
									
								
								.github/example-run/scene.ron
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/example-run/scene.ron
									
									
									
									
										vendored
									
									
								
							| @ -1,3 +1,3 @@ | |||||||
| ( | ( | ||||||
|     exit_after: Some(1800) |     exit_after: Some(100) | ||||||
| ) | ) | ||||||
|  | |||||||
							
								
								
									
										26
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										26
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							| @ -216,11 +216,17 @@ jobs: | |||||||
|   run-examples: |   run-examples: | ||||||
|     runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
|     steps: |     steps: | ||||||
|       - name: Install dependencies |       - name: Install Bevy dependencies | ||||||
|         run: | |         run: | | ||||||
|           sudo apt-get update; |           sudo apt-get update; | ||||||
|           DEBIAN_FRONTEND=noninteractive sudo apt-get install --no-install-recommends -yq \ |           DEBIAN_FRONTEND=noninteractive sudo apt-get install --no-install-recommends -yq \ | ||||||
|             libasound2-dev libudev-dev wget unzip xvfb; |             libasound2-dev libudev-dev; | ||||||
|  |       - name: install xvfb, llvmpipe and lavapipe | ||||||
|  |         run: | | ||||||
|  |           sudo apt-get update -y -qq | ||||||
|  |           sudo add-apt-repository ppa:oibaf/graphics-drivers -y | ||||||
|  |           sudo apt-get update | ||||||
|  |           sudo apt install -y xvfb libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers | ||||||
|       - uses: actions/checkout@v2 |       - uses: actions/checkout@v2 | ||||||
|       - uses: actions/cache@v2 |       - uses: actions/cache@v2 | ||||||
|         with: |         with: | ||||||
| @ -234,23 +240,23 @@ jobs: | |||||||
|       - uses: actions-rs/toolchain@v1 |       - uses: actions-rs/toolchain@v1 | ||||||
|         with: |         with: | ||||||
|           toolchain: stable |           toolchain: stable | ||||||
|       - name: Setup swiftshader |  | ||||||
|         run: | |  | ||||||
|           wget https://github.com/qarmin/gtk_library_store/releases/download/3.24.0/swiftshader.zip; |  | ||||||
|           unzip swiftshader.zip; |  | ||||||
|           curr="$(pwd)/libvk_swiftshader.so"; |  | ||||||
|           sed -i "s|PATH_TO_CHANGE|$curr|" vk_swiftshader_icd.json; |  | ||||||
|       - name: Build bevy |       - name: Build bevy | ||||||
|         run: | |         run: | | ||||||
|           cargo build --no-default-features --features "bevy_dynamic_plugin,bevy_gilrs,bevy_gltf,bevy_winit,render,png,hdr,x11,bevy_ci_testing" |           cargo build --no-default-features --features "bevy_dynamic_plugin,bevy_gilrs,bevy_gltf,bevy_winit,render,png,hdr,x11,bevy_ci_testing,trace,trace_chrome" | ||||||
|       - name: Run examples |       - name: Run examples | ||||||
|         run: | |         run: | | ||||||
|           for example in .github/example-run/*.ron; do |           for example in .github/example-run/*.ron; do | ||||||
|             example_name=`basename $example .ron` |             example_name=`basename $example .ron` | ||||||
|             echo "running $example_name - "`date` |             echo "running $example_name - "`date` | ||||||
|             time CI_TESTING_CONFIG=$example VK_ICD_FILENAMES=$(pwd)/vk_swiftshader_icd.json DRI_PRIME=0 xvfb-run cargo run --example $example_name --no-default-features --features "bevy_dynamic_plugin,bevy_gilrs,bevy_gltf,bevy_winit,render,png,hdr,x11,bevy_ci_testing" |             time CI_TESTING_CONFIG=$example xvfb-run cargo run --example $example_name --no-default-features --features "bevy_dynamic_plugin,bevy_gilrs,bevy_gltf,bevy_winit,render,png,hdr,x11,bevy_ci_testing,trace,trace_chrome" | ||||||
|             sleep 10 |             sleep 10 | ||||||
|           done |           done | ||||||
|  |           zip traces.zip trace*.json | ||||||
|  |       - name: save traces | ||||||
|  |         uses: actions/upload-artifact@v1 | ||||||
|  |         with: | ||||||
|  |           name: example-traces.zip | ||||||
|  |           path: traces.zip | ||||||
| 
 | 
 | ||||||
|   check-doc: |   check-doc: | ||||||
|     runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 François
						François