Skip to content

Commit 5184652

Browse files
Added GitHub Actions build (#72)
* Added GitHub Actions file windows.yaml * Fixed folder name: .github * Testing downloading and usage of the Agility SDK Should fail for now. * Fix for Agility SDK * Trying to fix the path to Agility SDK * Trying to fix the path to Agility SDK (2) * Trying to fix the path to Agility SDK (3) * Trying to fix the path to Agility SDK (4) * Finished CI script, hopefully
1 parent 94c4d92 commit 5184652

1 file changed

Lines changed: 62 additions & 0 deletions

File tree

.github/workflows/windows.yaml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Build code
2+
3+
on:
4+
push:
5+
pull_request:
6+
types: [opened, synchronize, reopened]
7+
8+
env:
9+
DX_AGILITY_SDK_URL: "https://www.nuget.org/api/v2/package/Microsoft.Direct3D.D3D12/1.615.1"
10+
11+
jobs:
12+
windows:
13+
name: ${{ matrix.config.name }}
14+
runs-on: windows-latest
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
config:
19+
- {
20+
name: "Windows MSVC (Debug)",
21+
compiler: "msvc",
22+
cc: "cl", cxx: "cl",
23+
cmake_configure_options: '-G "Visual Studio 17 2022" -A x64',
24+
build_type: "Debug",
25+
}
26+
- {
27+
name: "Windows MSVC (Release)",
28+
compiler: "msvc",
29+
cc: "cl", cxx: "cl",
30+
cmake_configure_options: '-G "Visual Studio 17 2022" -A x64',
31+
build_type: "Release",
32+
}
33+
34+
steps:
35+
- name: Checkout
36+
uses: actions/checkout@v4
37+
38+
- name: Download DirectX 12 Agility SDK
39+
shell: pwsh
40+
run: |
41+
$ProgressPreference = 'SilentlyContinue'
42+
Invoke-WebRequest -Uri $env:DX_AGILITY_SDK_URL -OutFile "agility_sdk.zip"
43+
Expand-Archive -Path "agility_sdk.zip" -DestinationPath "agility_sdk"
44+
45+
- name: Configure CMake
46+
shell: pwsh
47+
run: |
48+
$env:CC="${{ matrix.config.cc }}"
49+
$env:CXX="${{ matrix.config.cxx }}"
50+
$AGILITY_SDK_PATH = "$env:GITHUB_WORKSPACE/agility_sdk"
51+
echo $AGILITY_SDK_PATH
52+
cmake . `
53+
-Bbuild `
54+
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} `
55+
-DD3D12MA_BUILD_SAMPLE=ON `
56+
-DD3D12MA_AGILITY_SDK_DIRECTORY="$AGILITY_SDK_PATH" `
57+
${{ matrix.config.cmake_configure_options }}
58+
59+
- name: Build
60+
shell: pwsh
61+
run: |
62+
cmake --build build --config ${{ matrix.config.build_type }}

0 commit comments

Comments
 (0)