88
99jobs :
1010 build :
11-
1211 runs-on : windows-latest
1312 strategy :
1413 fail-fast : false
@@ -17,45 +16,57 @@ 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
45- with :
46- name : ${{ matrix.build_platform}}_${{ matrix.build_configuration}}_pdb
47- path : src\Build\Bin\${{ matrix.build_configuration}}\${{ matrix.build_platform}}\NPPJSONViewer.pdb
48-
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
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 full artifacts
43+ uses : actions/upload-artifact@v4
44+ with :
45+ name : NppJSONViewer_Build_artifacts_full
46+ path : |
47+ src/Build/Bin/Release/Win32/NPPJSONViewer.dll
48+ src/Build/Bin/Release/Win32/NPPJSONViewer.pdb
49+ src/Build/Bin/Release/x64/NPPJSONViewer.dll
50+ src/Build/Bin/Release/x64/NPPJSONViewer.pdb
51+ src/Build/Bin/Release/Arm64/NPPJSONViewer.dll
52+ src/Build/Bin/Release/Arm64/NPPJSONViewer.pdb
53+ src/Build/Bin/Debug/Win32/NPPJSONViewer.dll
54+ src/Build/Bin/Debug/Win32/NPPJSONViewer.pdb
55+ src/Build/Bin/Debug/x64/NPPJSONViewer.dll
56+ src/Build/Bin/Debug/x64/NPPJSONViewer.pdb
57+ src/Build/Bin/Debug/Arm64/NPPJSONViewer.dll
58+ src/Build/Bin/Debug/Arm64/NPPJSONViewer.pdb
59+
60+ # Step 6: Run unit tests for x86 | Release
61+ - name : Run unit tests x86 | Release
62+ if : matrix.build_platform == 'Win32' && matrix.build_configuration == 'Release'
63+ run : |
64+ cd src\Build\Bin\Release\Win32
65+ ./UnitTest.exe
66+
67+ # Step 7: Run unit tests for x64 | Release
68+ - name : Run unit tests x64 | Release
69+ if : matrix.build_platform == 'x64' && matrix.build_configuration == 'Release'
70+ run : |
71+ cd src\Build\Bin\Release\x64
72+ ./UnitTest.exe
0 commit comments