forked from KindDragon/vld
-
Notifications
You must be signed in to change notification settings - Fork 30
108 lines (87 loc) · 3.92 KB
/
dev_test.yml
File metadata and controls
108 lines (87 loc) · 3.92 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: TestDevelopment
on:
push:
branches: [ "dev" ]
env:
# Path to the solution file relative to the root of the project.
SOLUTION_FILE_PATH: ./vld.sln
permissions:
contents: read
checks: write
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v3
with:
versionSpec: '6.0.5'
- name: Determine Version
uses: gittools/actions/gitversion/execute@v3
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v2
- name: Restore NuGet packages
working-directory: ${{env.GITHUB_WORKSPACE}}
run: nuget restore ${{env.SOLUTION_FILE_PATH}}
- name: Setup VSTest.exe
uses: Malcolmnixon/Setup-VSTest@v4
- name: Update version number in version.h
shell: pwsh
run: |
./update_version.ps1
- name: Build Win64 VLD
working-directory: ${{env.GITHUB_WORKSPACE}}
run: msbuild /m /p:Configuration="Release" /p:Platform=x64 -target:vld ${{env.SOLUTION_FILE_PATH}}
- name: Build Win64 Tests
working-directory: ${{env.GITHUB_WORKSPACE}}
run: msbuild /m /p:Configuration="Debug(Release)" /p:Platform=x64 ${{env.SOLUTION_FILE_PATH}}
- name: Build Win64 StaticCRT Tests
working-directory: ${{env.GITHUB_WORKSPACE}}
run: msbuild /m /p:Configuration="Debug(Release)_StaticCRT" /p:Platform=x64 ${{env.SOLUTION_FILE_PATH}}
- name: Test Win64
run: |
vstest.console '.\bin\tests\x64\debug(release)\vld_tests.dll' /InIsolation /Logger:trx
vstest.console '.\bin\tests\x64\debug(release)\threads.dll' /InIsolation /Logger:trx
vstest.console '.\bin\tests\x64\debug(release)\vld_unload.dll' /InIsolation /Logger:trx
vstest.console '.\bin\tests\x64\debug(release)_staticcrt\vld_tests.dll' /InIsolation /Logger:trx
vstest.console '.\bin\tests\x64\debug(release)_staticcrt\threads.dll' /InIsolation /Logger:trx
vstest.console '.\bin\tests\x64\debug(release)_staticcrt\vld_unload.dll' /InIsolation /Logger:trx
- name: Build Win32 VLD
working-directory: ${{env.GITHUB_WORKSPACE}}
run: msbuild /m /p:Configuration="Release" /p:Platform=Win32 -target:vld ${{env.SOLUTION_FILE_PATH}}
- name: Build Win32 Tests
working-directory: ${{env.GITHUB_WORKSPACE}}
run: msbuild /m /p:Configuration="Debug(Release)" /p:Platform=Win32 ${{env.SOLUTION_FILE_PATH}}
- name: Build Win32 StaticCRT Tests
working-directory: ${{env.GITHUB_WORKSPACE}}
run: msbuild /m /p:Configuration="Debug(Release)_StaticCRT" /p:Platform=Win32 ${{env.SOLUTION_FILE_PATH}}
- name: Test Win32
run: |
vstest.console '.\bin\tests\win32\debug(release)\vld_tests.dll' /InIsolation /Logger:trx
vstest.console '.\bin\tests\win32\debug(release)\threads.dll' /InIsolation /Logger:trx
vstest.console '.\bin\tests\win32\debug(release)\vld_unload.dll' /InIsolation /Logger:trx
vstest.console '.\bin\tests\win32\debug(release)_staticcrt\vld_tests.dll' /InIsolation /Logger:trx
vstest.console '.\bin\tests\win32\debug(release)_staticcrt\threads.dll' /InIsolation /Logger:trx
vstest.console '.\bin\tests\win32\debug(release)_staticcrt\vld_unload.dll' /InIsolation /Logger:trx
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action/windows@v2
if: always()
with:
files: |
TestResults\**\*.trx
comment_mode: off
- name: Create installer
uses: Minionguyjpro/Inno-Setup-Action@v1.2.4
with:
path: ./setup/vld-setup.iss
options: /V0 /O+ /DMyAppVersion=${{ env.GitVersion_MajorMinorPatch }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: Installer
path: ./setup/Output/vld-${{ env.GitVersion_MajorMinorPatch }}-setup.exe
retention-days: 1