7
7
build :
8
8
name : Visual Studio 2019
9
9
runs-on : windows-2019
10
-
10
+ strategy :
11
+ fail-fast : false
12
+ matrix :
13
+ config :
14
+ - config : Release
15
+ platform : x64
16
+ output_dir : Release-x64
17
+ - config : Release
18
+ platform : x86
19
+ output_dir : Release-Win32
20
+ - config : Debug
21
+ platform : x64
22
+ output_dir : Debug-x64
23
+ - config : Debug
24
+ platform : x86
25
+ output_dir : Debug-Win32
11
26
steps :
12
27
- uses : actions/checkout@v2
13
28
14
29
- name : Add msbuild to PATH
15
30
16
31
with :
17
- msbuild-architecture : x64
32
+ msbuild-architecture : ${{ matrix.config.platform }}
33
+
34
+ - name : Build MSVC project - ${{ matrix.config.config }} - ${{ matrix.config.platform }}
35
+ shell : cmd
36
+ run : |
37
+ MSBuild.exe ./LogReader.sln "/property:Configuration=${{ matrix.config.config }}" "/p:Platform=${{ matrix.config.platform }}"
18
38
19
- - name : Build MSVC project
39
+ - name : Run Unit Tests - ${{ matrix.config.config }} - ${{ matrix.config.platform }}
20
40
shell : sh
21
41
run : |
22
- MSBuild.exe ./LogReader.sln /property:Configuration=Release
42
+ ./${{ matrix.config.output_dir }}/tests.exe
23
43
24
44
- name : Copy Executable
25
45
shell : sh
26
46
run : |
27
47
mkdir -p -- "$RUNNER_TEMP/instdir"
28
- cp -- ./Release-x64 /LogReader.exe "$RUNNER_TEMP/instdir"
48
+ cp -- ./${{ matrix.config.output_dir }} /LogReader.exe "$RUNNER_TEMP/instdir"
29
49
30
50
- name : Pack
31
51
working-directory : ${{ runner.temp }}/instdir
32
52
shell : sh
33
- run : cmake -E tar cfv "$RUNNER_TEMP/msvc .7z" --format=7zip -- .
53
+ run : cmake -E tar cfv "$RUNNER_TEMP/logreader-${{ matrix.config.config }}-${{ matrix.config.platform }} .7z" --format=7zip -- .
34
54
35
55
- name : Upload
36
56
uses : actions/upload-artifact@v2
37
57
with :
38
- path : ${{ runner.temp }}/msvc .7z
39
- name : logreader-msvc .7z
58
+ path : ${{ runner.temp }}/logreader-${{ matrix.config.config }}-${{ matrix.config.platform }} .7z
59
+ name : logreader-${{ matrix.config.config }}-${{ matrix.config.platform }} .7z
40
60
41
61
release :
42
62
name : Create Release for ${{ github.ref }}
80
100
- name : Download artifact
81
101
uses : actions/download-artifact@v2
82
102
with :
83
- name : logreader-msvc .7z
103
+ name : logreader-Release-x64 .7z
84
104
path : ./
85
105
86
106
- name : Download URL
@@ -102,6 +122,6 @@ jobs:
102
122
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
103
123
with :
104
124
upload_url : ${{ steps.set_upload_url.outputs.upload_url }}
105
- asset_path : ./logreader-msvc .7z
106
- asset_name : logreader-msvc .7z
125
+ asset_path : ./logreader-Release-x64 .7z
126
+ asset_name : logreader-Release-x64 .7z
107
127
asset_content_type : application/x-7z-compressed
0 commit comments