-
-
Notifications
You must be signed in to change notification settings - Fork 3
98 lines (80 loc) · 2.89 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: Build and Run Tests. Compile and Upload Installer for Releases
on:
workflow_dispatch:
push:
branches:
- master
pull_request:
branches:
- master
release:
types:
# Doesn't trigger for draft releases
- published
env:
# Path to the solution file relative to the root of the project.
SOLUTION_FILE_PATH: .
# Configuration type to build.
# You can convert this to a build matrix if you need coverage of multiple configuration types.
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
BUILD_CONFIGURATION: Release
PLATFORM: Win32
jobs:
build:
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
- name: Add MSBuild to PATH
uses: microsoft/[email protected]
- name: NuGet Restore
run: nuget restore ${{env.SOLUTION_FILE_PATH}}
- name: Build
working-directory: ${{env.GITHUB_WORKSPACE}}
# Add additional options to the MSBuild command line here (like platform or verbosity level).
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
run: msbuild /m /p:Configuration="${{env.BUILD_CONFIGURATION}}" ${{env.SOLUTION_FILE_PATH}}
- name: Setup VSTest and add to PATH
uses: darenm/Setup-VSTest@v1
- name: Run Unit Tests
working-directory: .\${{env.BUILD_CONFIGURATION}}
run: vstest.console.exe ElanUtilsTest.dll LiftUtilsTest.dll URIParserTest.dll WaveUtilsTest.dll
# This currently fails on github actions due to requiring the Speech Analyzer program to load up for scripting and testing
#- name: Run Integration Tests
# working-directory: .\Release
# run: vstest.console.exe SAScriptingTest.dll
- name: Upload Release/ for installer job
if: github.event_name == 'release'
uses: actions/upload-artifact@v3
with:
name: Release
path: Release/
retention-days: 3
installer:
name: Compile installer and upload asset to release
if: github.event_name == 'release'
needs: build
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Download Release/
uses: actions/[email protected]
with:
name: Release
path: Release/
# Copy iso639.txt to DistFiles
- name: Copy iso639.txt file
run: copy DistFiles/iso639.txt Release/
# Create Installer exe
- name: Run InnoSetup
working-directory: Install/
run: iscc SpeechAnalyzer.iss
- name: Upload the Artifact
uses: actions/upload-artifact@v3
with:
name: SpeechAnalyzerInstaller
path: Install/Output/
# Upload installer to release tag which triggered this build
- uses: softprops/action-gh-release@v1
with:
files: Install/Output/SpeechAnalyzer.exe
tag_name: ${{ github.event.release.tag_name }}