-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (59 loc) · 1.87 KB
/
ci.yml
File metadata and controls
72 lines (59 loc) · 1.87 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
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [windows-2025]
configuration: [Debug, RelWithDebInfo]
buildDevel: [ON]
include:
- os: windows-2025
preset: vs2022-ci
- os: windows-2025
configuration: RelWithDebInfo
buildDevel: OFF
preset: vs2022-ci
runs-on: ${{ matrix.os }}
env:
FETCH_CONTENT_DIR: ./_deps
steps:
- uses: actions/checkout@v5
- name: Setup environment
run: Write-Output "DXSDK_DIR=${env:TEMP}/DXSDK" >> ${env:GITHUB_ENV}
- name: Cache DirectX SDK
uses: actions/cache@v4
with:
path: ${{ env.DXSDK_DIR }}
key: June2010-v2
- name: Cache CMake FetchContent
uses: actions/cache@v4
with:
path: ${{ env.FETCH_CONTENT_DIR }}
key: CMakeFC-${{ matrix.os }}-${{ hashFiles('external/**') }}
- name: Install DirectX SDK
run: |
if (Test-Path -Path $env:DXSDK_DIR) {
Write-Host "Using cached DirectX SDK. Skipping install ..."
return
}
Write-Host "Downloading..."
$exePath = "$env:TEMP\DXSDK_Jun10.exe"
(New-Object Net.WebClient).DownloadFile('https://download.microsoft.com/download/A/E/7/AE743F1F-632B-4809-87A9-AA1BB3458E31/DXSDK_Jun10.exe', $exePath)
Write-Host "Installing..."
Start-Process -Wait -FilePath $exePath -ArgumentList "/P ""$env:DXSDK_DIR"" /U"
- name: Configure
run: 'cmake --preset=${{ matrix.preset }}
-D BASALT_BUILD_DEVEL=${{ matrix.buildDevel }}
-D FETCHCONTENT_BASE_DIR=${{ env.FETCH_CONTENT_DIR }}'
- name: Build
run: 'cmake --build --preset=${{ matrix.preset }}
--config ${{ matrix.configuration }}
--parallel'