Skip to content

Commit b1a5988

Browse files
committed
run unit tests x84 & x64
1 parent 53d0c6b commit b1a5988

File tree

1 file changed

+31
-11
lines changed

1 file changed

+31
-11
lines changed

.github/workflows/main.yml

+31-11
Original file line numberDiff line numberDiff line change
@@ -7,36 +7,56 @@ jobs:
77
build:
88
name: Visual Studio 2019
99
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
1126
steps:
1227
- uses: actions/checkout@v2
1328

1429
- name: Add msbuild to PATH
1530
uses: microsoft/[email protected]
1631
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 }}"
1838
19-
- name: Build MSVC project
39+
- name: Run Unit Tests - ${{ matrix.config.config }} - ${{ matrix.config.platform }}
2040
shell: sh
2141
run: |
22-
MSBuild.exe ./LogReader.sln /property:Configuration=Release
42+
./${{ matrix.config.output_dir }}/tests.exe
2343
2444
- name: Copy Executable
2545
shell: sh
2646
run: |
2747
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"
2949
3050
- name: Pack
3151
working-directory: ${{ runner.temp }}/instdir
3252
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 -- .
3454

3555
- name: Upload
3656
uses: actions/upload-artifact@v2
3757
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
4060

4161
release:
4262
name: Create Release for ${{ github.ref }}
@@ -80,7 +100,7 @@ jobs:
80100
- name: Download artifact
81101
uses: actions/download-artifact@v2
82102
with:
83-
name: logreader-msvc.7z
103+
name: logreader-Release-x64.7z
84104
path: ./
85105

86106
- name: Download URL
@@ -102,6 +122,6 @@ jobs:
102122
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
103123
with:
104124
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
107127
asset_content_type: application/x-7z-compressed

0 commit comments

Comments
 (0)