-
Notifications
You must be signed in to change notification settings - Fork 2
79 lines (58 loc) · 2.74 KB
/
msbuild.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
67
68
69
70
71
72
73
74
75
76
77
78
79
name: SharpGit
on:
push:
branches: [ main, stable/* ]
pull_request:
branches: [ main, stable/* ]
env:
# Path to the solution file relative to the root of the project.
SOLUTION_FILE_PATH: SharpGit/src/SharpGit.sln
buildDir: '${{ github.workspace }}/build'
jobs:
build:
runs-on: windows-latest
steps:
- name: Git Checkout
uses: actions/checkout@v2
with:
path: SharpGit
- name: Get latest CMake and ninja
# Using 'latest' branch, the most recent CMake and ninja are installed.
uses: lukka/get-cmake@latest
- name: Build proj via VCPKG
uses: lukka/run-vcpkg@v10
with:
vcpkgDirectory: '${{ github.workspace }}/vcpkg'
vcpkgGitCommitId: 03ca9b59af1506a86840e3a3a01a092f3333a29b
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1
- name: Setup VSTest Path
uses: darenm/Setup-VSTest@v1
- name: Ensure Proj packages are available
run: vcpkg.exe install libgit2:x64-windows-static-md libgit2:x86-windows-static-md apr-util:x64-windows-static-md apr-util:x86-windows-static-md libssh2:x64-windows-static-md libssh2:x86-windows-static-md
- name: Restore NuGet package (legacy style, vcxproj only)
working-directory: ${{env.GITHUB_WORKSPACE}}
run: nuget restore SharpGit\src\SharpGit\SharpGit.vcxproj -SolutionDirectory SharpGit\src
- name: Setup version
working-directory: ${{env.GITHUB_WORKSPACE}}
run: cmd.exe /C SharpGit\scripts\gh-version-setup vcpkg\installed\x86-windows-static-md\include\git2\version.h ${{ github.run_number }}
- name: Build-x86
working-directory: ${{env.GITHUB_WORKSPACE}}
run: msbuild /m /restore /p:Platform=x86 /p:Configuration=Release ${{env.SOLUTION_FILE_PATH}} @SharpGit\scripts\msbuild-version.rsp
- name: Build-x64
working-directory: ${{env.GITHUB_WORKSPACE}}
run: msbuild /m /restore /p:Platform=x64 /p:Configuration=Release ${{env.SOLUTION_FILE_PATH}} @SharpGit\scripts\msbuild-version.rsp
- name: VSTest-x86
working-directory: ${{env.GITHUB_WORKSPACE}}
run: vstest.console.exe /InIsolation /Platform:x86 SharpGit/src/SharpGit.Tests/bin/x86/Release/SharpGit.Tests.dll "--testcasefilter:TestCategory!=NeedsNetwork"
- name: VSTest-x64
working-directory: ${{env.GITHUB_WORKSPACE}}
run: vstest.console.exe /InIsolation /Platform:x64 SharpGit/src/SharpGit.Tests/bin/x64/Release/SharpGit.Tests.dll "--testcasefilter:TestCategory!=NeedsNetwork"
- name: Create nupkg files
working-directory: ${{env.GITHUB_WORKSPACE}}
run: cmd.exe /C SharpGit\scripts\gh-build-nuget.cmd
- name: Package nupkg files
uses: actions/upload-artifact@v2
with:
name: nupkg-files
path: SharpGit/nuspec/bin/*.nupkg