-
-
Notifications
You must be signed in to change notification settings - Fork 32
140 lines (124 loc) · 4.47 KB
/
CD.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
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
name: Flex Installer
on:
push:
branches: ["release/9.1", "develop", "master", "feature/PubSub", "feature/gha-cd"]
workflow_call:
inputs:
flex_ref:
description: The tag/branch/sha to build
default: 'release/9.1'
required: false
type: string
installer_ref:
description: The tag/branch/sha for the installer
default: 'feature/netfx48IdFix'
required: false
type: string
helps_ref:
description: The tag or branch for helps
default: 'master'
required: false
type: string
lcm_ref:
description: The tag or branch for liblcm (for localization)
default: 'master'
required: false
type: string
l10n_ref:
description: The tag or branch for FieldWorks localizations
default: 'master'
required: false
type: string
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
debug_build_and_test:
env:
CROWDIN_API_KEY: ${{ secrets.FLEX_CROWDIN_API }}
LcmLocalArtifactsDir: ${{ github.workspace }}\Localizations\LCM\artifacts\Debug
LcmRootDir: ${{ github.workspace }}\Localizations\LCM
FILESTOSIGNLATER: "${{ github.workspace }}\\filesToSign"
name: Build Debug and run Tests
runs-on: windows-latest
steps:
- name: Checkout Files
uses: actions/checkout@v4
with:
ref: ${{ inputs.flex_ref }}
- name: Downgrade Wix Toolset
shell: cmd
run: choco install wixtoolset --version 3.11.2 --allow-downgrade --force
- name: Checkout Installer
uses: actions/checkout@v4
with:
repository: sillsdev/genericinstaller
ref: ${{ inputs.installer_ref || 'feature/netfx48IdFix' }}
path: PatchableInstaller
- name: Checkout Helps
uses: actions/checkout@v4
with:
repository: sillsdev/FwHelps
ref: ${{ inputs.helps_ref || 'develop' }}
path: DistFiles/Helps
- name: Checkout Localizations
uses: actions/checkout@v4
with:
repository: sillsdev/FwLocalizations
ref: ${{ inputs.l10n_ref || 'master' }}
path: Localizations
- name: Checkout liblcm (for l10n)
uses: actions/checkout@v4
with:
repository: sillsdev/liblcm
ref: ${{ inputs.lcm_ref || 'master' }}
path: Localizations/LCM
- name: Download 461 targeting pack
uses: suisei-cn/actions-download-file@818d6b7dc8fe73f2f924b6241f2b1134ca1377d9 # 1.6.0
id: downloadfile # Remember to give an ID if you need the output filename
with:
url: "https://download.microsoft.com/download/F/1/D/F1DEB8DB-D277-4EF9-9F48-3A65D4D8F965/NDP461-DevPack-KB3105179-ENU.exe"
target: public/
- name: Install targeting pack
shell: cmd
working-directory: public
run: NDP461-DevPack-KB3105179-ENU.exe /q
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: 5.0.x
- name: Build installer
shell: powershell
working-directory: Build
run: ./build64.bat /t:BuildBaseInstaller /p:config=release /p:action=test /p:desktopNotAvailable=true /v:d /bl ^| tee-object -FilePath build.log
- name: Scan Debug Build Output
shell: powershell
working-directory: Build
run: |
$results = Select-String -Path "build.log" -Pattern "^\s*[1-9][0-9]* Error\(s\)"
if ($results) {
foreach ($result in $results) {
Write-Host "Found errors in build.log $($result.LineNumber): $($result.Line)" -ForegroundColor red
}
exit 1
} else {
Write-Host "No errors found" -ForegroundColor green
exit 0
}
- name: Capture Test Results
shell: powershell
working-directory: Build
run: .\NUnitReport /a ^| tee-object -FilePath test-results.log
- name: Report Test Results
uses: sillsdev/[email protected]
with:
log-path: Build/test-results.log
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v4
with:
name: build-logs
path: |
Build/*.log
**/*.binlog
**/*.msi
if: always()