-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (64 loc) · 2.46 KB
/
Copy pathci.yml
File metadata and controls
79 lines (64 loc) · 2.46 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
79
name: CI
on:
push:
branches: [main, master]
pull_request:
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Vulkan SDK (LunarG apt repo)
run: |
wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -
CODENAME=$(. /etc/os-release && echo $VERSION_CODENAME)
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-$CODENAME.list \
https://packages.lunarg.com/vulkan/lunarg-vulkan-$CODENAME.list
sudo apt-get update
sudo apt-get install -y vulkan-sdk
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
ocl-icd-opencl-dev \
opencl-headers \
cmake \
build-essential
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo workspace
uses: Swatinem/rust-cache@v2
- name: Configure CMake
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
- name: Build
run: |
cmake --build build --config Release --parallel
cargo build --workspace --release
- name: Smoke test (list commands)
run: |
echo "Smoke test only: GPU-less CI runners may fail the list commands; build failures above are NOT masked."
./build/gpubench --list-benchmarks || true
./build/gpubench --list-backends || true
build-windows:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Vulkan SDK
shell: pwsh
run: |
Invoke-WebRequest -Uri "https://sdk.lunarg.com/sdk/download/latest/windows/vulkan_sdk.exe" -OutFile VulkanSDK.exe
Start-Process -FilePath .\VulkanSDK.exe -ArgumentList "--root", "C:\VulkanSDK", "--accept-licenses", "--default-answer", "--confirm-command", "install" -NoNewWindow -Wait
echo "VULKAN_SDK=C:\VulkanSDK" >> $env:GITHUB_ENV
echo "C:\VulkanSDK\Bin" >> $env:GITHUB_PATH
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo workspace
uses: Swatinem/rust-cache@v2
- name: Configure CMake
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
- name: Build
run: |
cmake --build build --config Release
cargo build --workspace --release