-
Notifications
You must be signed in to change notification settings - Fork 1
78 lines (75 loc) · 3 KB
/
Copy pathrust.yml
File metadata and controls
78 lines (75 loc) · 3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Build Engine and Run Unit Tests
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
jobs:
build-test:
strategy:
matrix:
os: [blacksmith-2vcpu-ubuntu-2404, blacksmith-2vcpu-windows-2025, blacksmith-6vcpu-macos-latest]
profile: [dev, release]
feature: [headed, network]
include:
- os: blacksmith-2vcpu-ubuntu-2404
platform: linux
rustflags: "-C target-feature=+aes,+sse2"
- os: blacksmith-2vcpu-windows-2025
platform: windows
rustflags: "-C target-feature=+aes,+sse2"
- os: blacksmith-6vcpu-macos-latest
platform: macos
rustflags: "-C target-feature=+aes,+neon"
runs-on: ${{ matrix.os }}
env:
# gxhash validates cfg(target_feature), so each runner gets the matching baseline explicitly.
RUSTFLAGS: ${{ matrix.rustflags }}
steps:
- uses: actions/checkout@v7
- name: Cache Cargo dependencies
if: matrix.platform == 'linux'
uses: actions/cache@v6
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Setup mold linker (Linux)
if: matrix.platform == 'linux'
uses: rui314/setup-mold@v1
- name: Install Linux dependencies
if: matrix.platform == 'linux'
run: bash install_dependencies.sh
- name: Install Vulkan SDK
if: matrix.platform == 'linux' && matrix.feature == 'headed'
uses: humbletim/setup-vulkan-sdk@v1.2.1
with:
vulkan-query-version: 1.3.204.0
vulkan-components: Vulkan-Headers, Vulkan-Loader
vulkan-use-cache: true
- name: Install DirectX Shader Compiler
if: matrix.platform == 'windows' && matrix.feature == 'headed'
shell: powershell
run: |
$release = Invoke-RestMethod "https://api.github.com/repos/microsoft/DirectXShaderCompiler/releases/latest"
$asset = $release.assets | Where-Object { $_.name -match '^dxc_.*\.zip$' } | Select-Object -First 1
if (-not $asset) {
throw "No DirectX Shader Compiler zip asset found in the latest release."
}
$archive = Join-Path $env:RUNNER_TEMP $asset.name
$install = Join-Path $env:RUNNER_TEMP "dxc"
Invoke-WebRequest $asset.browser_download_url -OutFile $archive
Expand-Archive $archive -DestinationPath $install
$bin = Join-Path $install "bin\x64"
if (-not (Test-Path (Join-Path $bin "dxcompiler.dll"))) {
throw "dxcompiler.dll was not found in the DirectX Shader Compiler archive."
}
Add-Content $env:GITHUB_PATH $bin
- name: Build & Test
run: cargo test --workspace --profile ${{ matrix.profile }} --no-default-features --features ${{ matrix.feature }} -- --skip render # All tests which require rendering are prefixed with "render" and are skipped here.