Skip to content

Commit a154f8a

Browse files
committed
Improve build workflow
1 parent e3a3aec commit a154f8a

File tree

1 file changed

+38
-39
lines changed

1 file changed

+38
-39
lines changed

.github/workflows/ci_build.yml

Lines changed: 38 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ on:
88

99
jobs:
1010
build:
11-
1211
runs-on: windows-latest
1312
strategy:
1413
fail-fast: false
@@ -17,45 +16,45 @@ jobs:
1716
build_platform: [Win32, x64, ARM64]
1817

1918
steps:
20-
# Step 1: Check out the code from the repo
21-
- name: Checkout repo
22-
uses: actions/checkout@v4
23-
with:
24-
submodules: recursive
25-
26-
# Step 2: Prepare for build
27-
- name: Pre Build
28-
uses: microsoft/setup-msbuild@v2
19+
# Step 1: Check out the code from the repo
20+
- name: Checkout repo
21+
uses: actions/checkout@v4
22+
with:
23+
submodules: recursive
24+
25+
# Step 2: Prepare for build
26+
- name: Pre Build
27+
uses: microsoft/setup-msbuild@v2
2928

30-
# Step 3: Build projects and unit test
31-
- name: Build
32-
working-directory: src
33-
run: msbuild NppJSONViewer.sln /m /p:configuration="${{ matrix.build_configuration }}" /p:platform="${{ matrix.build_platform }}" /p:PlatformToolset="v143"
34-
35-
# Step 4: Upload build binary artifacts
36-
- name: Archive binaries artifacts
37-
uses: actions/upload-artifact@v4
38-
with:
39-
name: ${{ matrix.build_platform}}_${{ matrix.build_configuration}}
40-
path: src\Build\Bin\${{ matrix.build_configuration}}\${{ matrix.build_platform}}\NPPJSONViewer.dll
41-
42-
# Step 5: Upload build pdb artifacts
43-
- name: Archive symbols artifacts
44-
uses: actions/upload-artifact@v4
29+
# Step 3: Build projects and unit test
30+
- name: Build code
31+
working-directory: src
32+
run: msbuild NppJSONViewer.sln /m /p:configuration="${{ matrix.build_configuration }}" /p:platform="${{ matrix.build_platform }}" /p:PlatformToolset="v143"
33+
34+
# Step 4: Upload build binary artifacts for deployment
35+
- name: Archive binaries artifacts
36+
uses: actions/upload-artifact@v4
37+
with:
38+
name: NppJSONViewer_${{ matrix.build_platform}}_${{ matrix.build_configuration}}
39+
path: src\Build\Bin\${{ matrix.build_configuration}}\${{ matrix.build_platform}}\NPPJSONViewer.dll
40+
41+
# Step 5: Upload build artifacts with pdb for reference
42+
- name: Archive symbols artifacts
43+
uses: actions/upload-artifact@v4
4544
with:
46-
name: ${{ matrix.build_platform}}_${{ matrix.build_configuration}}_pdb
45+
name: NppJSONViewer_${{ matrix.build_platform}}_${{ matrix.build_configuration}}_pdb
4746
path: src\Build\Bin\${{ matrix.build_configuration}}\${{ matrix.build_platform}}\NPPJSONViewer.pdb
4847

49-
# Step 6: Run unit tests for x86 | Release
50-
- name: Run tests x86 | Release
51-
if: matrix.build_platform == 'Win32' && matrix.build_configuration == 'Release'
52-
run: |
53-
cd src\Build\Bin\Release\Win32
54-
./UnitTest.exe
55-
56-
# Step 7: Run unit tests for x64 | Release
57-
- name: Run tests x64 | Release
58-
if: matrix.build_platform == 'x64' && matrix.build_configuration == 'Release'
59-
run: |
60-
cd src\Build\Bin\Release\x64
61-
./UnitTest.exe
48+
# Step 6: Run unit tests for x86 | Release
49+
- name: Run unit tests x86 | Release
50+
if: matrix.build_platform == 'Win32' && matrix.build_configuration == 'Release'
51+
run: |
52+
cd src\Build\Bin\Release\Win32
53+
./UnitTest.exe
54+
55+
# Step 7: Run unit tests for x64 | Release
56+
- name: Run unit tests x64 | Release
57+
if: matrix.build_platform == 'x64' && matrix.build_configuration == 'Release'
58+
run: |
59+
cd src\Build\Bin\Release\x64
60+
./UnitTest.exe

0 commit comments

Comments
 (0)