-
-
Notifications
You must be signed in to change notification settings - Fork 4
66 lines (55 loc) · 2.51 KB
/
msvc-windows-x64.yml
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
name: msvc-2022:windows
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
build_mode: ["Release", "Debug"]
os: ["windows-2022", "windows-2019"]
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Cache and Install Dependencies
id: cache-and-install
uses: actions/cache@v3
with:
path: |
${{ github.workspace }}/SDKs
${{ github.workspace }}/deps
${{ github.workspace }}/tools
./third_party
key: ${{ matrix.os }}-${{ hashFiles('**/lockfiles') }}-${{ hashFiles('CMakeLists.txt') }}-${{ hashFiles('vcpkg.json') }}
- name: Install Vulkan SDK
run: |
Invoke-WebRequest -Uri "https://sdk.lunarg.com/sdk/download/1.3.239.0/windows/VulkanSDK-1.3.239.0-Installer.exe" -OutFile "vulkan_installer.exe" && ./vulkan_installer.exe --root ${{ github.workspace }}/SDKs/VulkanSDK/1.3.239.0 --accept-licenses --default-answer --confirm-command install
if: steps.cache-and-install.outputs.cache-hit != 'true'
- name: Build SDL3
run: |
git clone --depth=1 https://github.com/libsdl-org/SDL ${{ github.workspace }}/deps/SDL
cd ${{ github.workspace }}/deps/SDL && mkdir build
cd build && cmake .. -DSDL_STATIC=ON
if: steps.cache-and-install.outputs.cache-hit != 'true'
- name: Install SDL3
run: |
cd ${{ github.workspace }}/deps/SDL/build && cmake --build . --config Release --target install
- name: Install VCPKG
run: |
git clone --depth=1 https://github.com/microsoft/vcpkg.git ${{ github.workspace }}/tools/vcpkg
cd ${{ github.workspace }}/tools/vcpkg && ./bootstrap-vcpkg.bat -disableMetrics
if: steps.cache-and-install.outputs.cache-hit != 'true'
- name: Install Dependencies, Configure, and Build Ashura
env:
VULKAN_SDK: ${{ github.workspace }}/SDKs/VulkanSDK/1.3.239.0
run: |
mkdir build
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/tools/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows -DVCPKG_HOST_TRIPLET=x64-windows -DVCPKG_INSTALLED_DIR=${{ github.workspace }}/tools/vcpkg/installed
cmake --build . --config ${{ matrix.build_mode }}
- name: Run Ashura Test
run: |
cd build/ashura/${{ matrix.build_mode }}/ && ./ashura_test.exe