9
9
env :
10
10
BUILD_DIR : src\Build\Bin
11
11
MSBUILD_TOOLSET : v143
12
+ ARTIFACT_PREFIX : NppJSONViewer_
12
13
13
14
jobs :
14
15
build :
@@ -33,27 +34,27 @@ jobs:
33
34
# Step 3: Build projects and unit test
34
35
- name : Build code
35
36
working-directory : src
36
- run : msbuild NppJSONViewer.sln /m /p:configuration="${{ matrix.build_configuration }}" /p:platform="${{ matrix.build_platform }}" /p:PlatformToolset=${{ env.MSBUILD_TOOLSET }}
37
+ run : msbuild NppJSONViewer.sln /m /p:configuration="${{matrix.build_configuration}}" /p:platform="${{matrix.build_platform}}" /p:PlatformToolset=${{env.MSBUILD_TOOLSET}}
37
38
38
39
# Step 4: Upload build binary artifacts for deployment
39
40
- name : Archive binaries artifacts
40
41
uses : actions/upload-artifact@v4
41
42
with :
42
- name : NppJSONViewer_ ${{ matrix.build_platform}}_${{ matrix.build_configuration}}
43
- path : ${{ env.BUILD_DIR }}\${{ matrix.build_configuration}}\${{ matrix.build_platform}}\NPPJSONViewer.dll
43
+ name : ${{env.ARTIFACT_PREFIX}}${{ matrix.build_platform}}_${{matrix.build_configuration}}
44
+ path : ${{env.BUILD_DIR }}\${{matrix.build_configuration}}\${{matrix.build_platform}}\NPPJSONViewer.dll
44
45
45
46
# Step 5: Upload build pdb artifacts
46
47
- name : Archive symbols artifacts
47
48
uses : actions/upload-artifact@v4
48
49
with :
49
- name : NppJSONViewer_ ${{ matrix.build_platform}}_${{ matrix.build_configuration}}_pdb
50
- path : ${{ env.BUILD_DIR }}\${{ matrix.build_configuration}}\${{ matrix.build_platform}}\NPPJSONViewer.pdb
50
+ name : ${{env.ARTIFACT_PREFIX}}${{ matrix.build_platform}}_${{matrix.build_configuration}}_pdb
51
+ path : ${{env.BUILD_DIR }}\${{matrix.build_configuration}}\${{matrix.build_platform}}\NPPJSONViewer.pdb
51
52
52
53
# Step 6: Run unit tests for x86 and x64
53
54
- name : Run unit tests
54
55
if : matrix.build_platform == 'Win32' || matrix.build_platform == 'x64'
55
56
run : |
56
- cd ${{ env.BUILD_DIR }}\${{ matrix.build_configuration }}\${{ matrix.build_platform }}
57
+ cd ${{env.BUILD_DIR}}\${{matrix.build_configuration}}\${{matrix.build_platform}}
57
58
./UnitTest.exe
58
59
59
60
upload-full-artifacts :
@@ -64,52 +65,16 @@ jobs:
64
65
fail-fast : true
65
66
66
67
steps :
67
- # Step 8 : Download all artifacts from all build jobs
68
- - name : Download Release Win32 binaries and PDBs
68
+ # Step 7 : Download all artifacts from the build job
69
+ - name : Download all artifacts
69
70
uses : actions/download-artifact@v4
70
71
with :
71
- path : all_artifacts/Release/win32
72
- pattern : NppJSONViewer_Win32_Rel*
73
- merge-multiple : true
72
+ pattern : ${{env.ARTIFACT_PREFIX}}*
73
+ path : all_artifacts\
74
74
75
- - name : Download Debug Win32 binaries and PDBs
76
- uses : actions/download-artifact@v4
77
- with :
78
- path : all_artifacts/Debug/win32
79
- pattern : NppJSONViewer_Win32_Deb*
80
- merge-multiple : true
81
-
82
- - name : Download Release x64 binaries and PDBs
83
- uses : actions/download-artifact@v4
84
- with :
85
- path : all_artifacts/Release/x64
86
- pattern : NppJSONViewer_x64_Rel*
87
- merge-multiple : true
88
-
89
- - name : Download Debug x64 binaries and PDBs
90
- uses : actions/download-artifact@v4
91
- with :
92
- path : all_artifacts/Debug/x64
93
- pattern : NppJSONViewer_x64_Deb*
94
- merge-multiple : true
95
-
96
- - name : Download Release ARM64 binaries and PDBs
97
- uses : actions/download-artifact@v4
98
- with :
99
- path : all_artifacts/Release/ARM64
100
- pattern : NppJSONViewer_ARM64_Rel*
101
- merge-multiple : true
102
-
103
- - name : Download Debug ARM64 binaries and PDBs
104
- uses : actions/download-artifact@v4
105
- with :
106
- path : all_artifacts/Debug/ARM64
107
- pattern : NppJSONViewer_ARM64_Deb*
108
- merge-multiple : true
109
-
110
- # Step 9: Upload full artifact
111
- - name : Upload full artifacts
75
+ # Step 8: Upload consolidated artifacts as a single artifact
76
+ - name : Upload full artifact
112
77
uses : actions/upload-artifact@v4
113
78
with :
114
- name : NppJSONViewer_ALL
79
+ name : ${{env.ARTIFACT_PREFIX}}ALL
115
80
path : all_artifacts\**
0 commit comments