-
Notifications
You must be signed in to change notification settings - Fork 462
162 lines (134 loc) · 4.47 KB
/
build.yaml
File metadata and controls
162 lines (134 loc) · 4.47 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
name: VFS for Git
on:
pull_request:
branches: [ master, releases/shipped ]
push:
branches: [ master, releases/shipped ]
workflow_dispatch:
inputs:
git_version:
description: 'Microsoft Git version tag to include in the build (leave empty for default)'
required: false
type: string
env:
GIT_VERSION: ${{ github.event.inputs.git_version || 'v2.50.1.vfs.0.1' }}
jobs:
validate:
runs-on: windows-2025
name: Validation
steps:
- name: Checkout source
uses: actions/checkout@v5
- name: Validate Microsoft Git version
shell: pwsh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
& "$env:GITHUB_WORKSPACE\.github\workflows\scripts\validate_release.ps1" `
-Repository microsoft/git `
-Tag $env:GIT_VERSION && `
Write-Host ::notice title=Validation::Using microsoft/git version $env:GIT_VERSION
build:
runs-on: windows-2025
name: Build and Unit Test
needs: validate
strategy:
matrix:
configuration: [ Debug, Release ]
steps:
- name: Checkout source
uses: actions/checkout@v5
with:
path: src
- name: Install .NET SDK
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.413
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v2.0.0
- name: Build VFS for Git
shell: cmd
run: src\scripts\Build.bat ${{ matrix.configuration }}
- name: Run unit tests
shell: cmd
run: src\scripts\RunUnitTests.bat ${{ matrix.configuration }}
- name: Create build artifacts
shell: cmd
run: src\scripts\CreateBuildArtifacts.bat ${{ matrix.configuration }} artifacts
- name: Download microsoft/git installers
shell: cmd
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release download %GIT_VERSION% --repo microsoft/git --pattern "Git*.exe" --dir artifacts\GVFS.Installers
- name: Upload functional tests drop
uses: actions/upload-artifact@v4
with:
name: FunctionalTests_${{ matrix.configuration }}
path: artifacts\GVFS.FunctionalTests
- name: Upload FastFetch drop
uses: actions/upload-artifact@v4
with:
name: FastFetch_${{ matrix.configuration }}
path: artifacts\FastFetch
- name: Upload installers
uses: actions/upload-artifact@v4
with:
name: Installers_${{ matrix.configuration }}
path: artifacts\GVFS.Installers
functional_test:
runs-on: ${{ matrix.architecture == 'arm64' && 'windows-11-arm' || 'windows-2025' }}
name: Functional Tests
needs: build
strategy:
matrix:
configuration: [ Debug, Release ]
architecture: [ x86_64, arm64 ]
steps:
- name: Download installers
uses: actions/download-artifact@v5
with:
name: Installers_${{ matrix.configuration }}
path: install
- name: Download functional tests drop
uses: actions/download-artifact@v5
with:
name: FunctionalTests_${{ matrix.configuration }}
path: ft
- name: ProjFS details (pre-install)
shell: cmd
run: install\info.bat
- name: Install product
shell: cmd
run: install\install.bat
- name: ProjFS details (post-install)
shell: cmd
run: install\info.bat
- name: Upload installation logs
if: always()
uses: actions/upload-artifact@v4
with:
name: InstallationLogs_${{ matrix.configuration }}_${{ matrix.architecture }}
path: install\logs
- name: Run functional tests
shell: cmd
run: |
SET PATH=C:\Program Files\VFS for Git;%PATH%
SET GIT_TRACE2_PERF=C:\temp\git-trace2.log
ft\GVFS.FunctionalTests.exe /result:TestResult.xml --ci
- name: Upload functional test results
if: always()
uses: actions/upload-artifact@v4
with:
name: FunctionalTests_Results_${{ matrix.configuration }}_${{ matrix.architecture }}
path: TestResult.xml
- name: Upload Git trace2 output
if: always()
uses: actions/upload-artifact@v4
with:
name: GitTrace2_${{ matrix.configuration }}_${{ matrix.architecture }}
path: C:\temp\git-trace2.log
- name: ProjFS details (post-test)
if: always()
shell: cmd
run: install\info.bat