-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (58 loc) · 1.96 KB
/
build-windows-msvc.yml
File metadata and controls
68 lines (58 loc) · 1.96 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
name: nfx-stringbuilder - Windows MSVC
on:
push:
branches: [main]
paths-ignore:
- "**/*.md"
- "LICENSE"
- ".gitignore"
pull_request:
branches: [main]
paths-ignore:
- "**/*.md"
- "LICENSE"
- ".gitignore"
env:
BUILD_TYPE: Release
permissions:
contents: read
jobs:
build-windows-msvc:
runs-on: windows-2022
name: Windows MSVC 2022
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
submodules: recursive
- name: Cache CMake build
uses: actions/cache@v4
with:
path: |
build
C:\Users\runneradmin\AppData\Local\Microsoft\MSBuild
key: ${{ runner.os }}-msvc2022-vs2022-${{ hashFiles('**/CMakeLists.txt', 'include/**') }}
restore-keys: |
${{ runner.os }}-msvc2022-vs2022-
- name: Configure CMake
run: cmake -B build -G "Visual Studio 17 2022" -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DNFX_STRINGBUILDER_BUILD_STATIC=ON -DNFX_STRINGBUILDER_BUILD_SHARED=ON -DNFX_STRINGBUILDER_BUILD_TESTS=ON -DNFX_STRINGBUILDER_BUILD_SAMPLES=ON -DNFX_STRINGBUILDER_BUILD_BENCHMARKS=ON -DNFX_STRINGBUILDER_BUILD_DOCUMENTATION=OFF
- name: Build with MSVC
run: |
echo "Starting MSVC build at $(date)"
$start_time = Get-Date
cmake --build build --config Release --parallel
$end_time = Get-Date
$duration = $end_time - $start_time
echo "MSVC build completed in $($duration.TotalSeconds) seconds"
- name: Test
working-directory: build
run: ctest -C Release --output-on-failure --parallel
- name: Upload test results on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: test-results-windows-msvc2022
path: |
build/Testing/Temporary/LastTest.log
build/Testing/Temporary/LastTestsFailed.log
retention-days: 7