-
-
Notifications
You must be signed in to change notification settings - Fork 4
46 lines (38 loc) · 1.46 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
name: msvc:windows
on: push
jobs:
build:
strategy:
matrix:
build_mode: ["Release", "Debug"]
os: ["windows-2022"]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Cache and Install Dependencies
id: cache-and-install
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/.deps
key: ${{ matrix.os }}-${{ hashFiles('**/lockfiles') }}-${{ hashFiles('CMakeLists.txt') }}-${{ hashFiles('vcpkg.json') }}
- name: Install VCPKG
if: steps.cache-and-install.outputs.cache-hit != 'true'
run: |
git clone --depth=1 https://github.com/microsoft/vcpkg.git ${{ github.workspace }}/.deps/vcpkg
cd ${{ github.workspace }}/.deps/vcpkg
./bootstrap-vcpkg.bat -disableMetrics
- name: Install Dependencies, Configure, and Build Ashura
env:
VCPKG_ROOT: ${{ github.workspace }}/.deps/vcpkg
run: |
mkdir build
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows -DVCPKG_HOST_TRIPLET=x64-windows -DVCPKG_INSTALLED_DIR=${{ env.VCPKG_ROOT }}/installed
cmake --build . --config ${{ matrix.build_mode }}
- name: Run Tests
run: |
cd build/${{ matrix.build_mode }}/
./ashura_std_tests.exe
./ashura_engine_tests.exe