4545 OpenCppCoverageVersion : 0.9.9.0
4646
4747jobs :
48- build :
49- name : ${{matrix.configuration}}-${{matrix.platform}}-${{matrix.type}}
48+ msbuild :
49+ name : ${{matrix.configuration}}-${{matrix.platform}}-msbuild
5050 runs-on : windows-2022
5151 strategy :
5252 matrix :
53- type : [libs-cmake, msbuild]
5453 platform : [x64, arm64]
55- configuration : [Release]
54+ configuration : [Release, Debug ]
5655 fail-fast : false
5756 steps :
5857 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
@@ -62,14 +61,14 @@ jobs:
6261
6362 - name : Download OpenCppCoverage
6463 uses : suisei-cn/actions-download-file@818d6b7dc8fe73f2f924b6241f2b1134ca1377d9
65- if : success() && matrix.platform == 'x64'
64+ if : success() && matrix.platform == 'x64' && matrix.configuration == 'Release'
6665 id : DownloadOpenCppCoverage
6766 with :
6867 url : " https://github.com/OpenCppCoverage/OpenCppCoverage/releases/download/release-${{ env.OpenCppCoverageVersion }}/OpenCppCoverageSetup-x64-${{ env.OpenCppCoverageVersion }}.exe"
6968 target : ${{github.workspace}}\temp\
7069
7170 - name : Install OpenCppCoverage
72- if : success() && matrix.platform == 'x64'
71+ if : success() && matrix.platform == 'x64' && matrix.configuration == 'Release'
7372 shell : powershell
7473 run : |
7574 Start-Process "${{github.workspace}}\temp\OpenCppCoverageSetup-x64-${{ env.OpenCppCoverageVersion }}.exe" -ArgumentList "/verysilent /dir=${{github.workspace}}\temp\OpenCppCoverage" -Wait
@@ -98,16 +97,16 @@ jobs:
9897 key : windows-${{matrix.platform}}-${{matrix.configuration}}-${{hashFiles('win_build/vcpkg_3rdparty_dependencies.vcxproj', '.github/workflows/windows.yml')}}
9998
10099 - name : Install Trusted Signing Client Tools
101- if : success() && matrix.type == 'msbuild ' && startsWith(github.ref, 'refs/tags/') && env.AZURE_CLIENT_ID != 0 && env.AZURE_CLIENT_SECRET != 0 && env.AZURE_TENANT_ID != 0 && env.AZURE_ENDPOINT != 0 && env.AZURE_CODE_SIGNING_NAME != 0 && env.AZURE_CERT_PROFILE_NAME != 0
100+ if : success() && matrix.configuration == 'Release ' && startsWith(github.ref, 'refs/tags/') && env.AZURE_CLIENT_ID != 0 && env.AZURE_CLIENT_SECRET != 0 && env.AZURE_TENANT_ID != 0 && env.AZURE_ENDPOINT != 0 && env.AZURE_CODE_SIGNING_NAME != 0 && env.AZURE_CERT_PROFILE_NAME != 0
102101 run : nuget.exe install Microsoft.Trusted.Signing.Client -Version 1.0.60 -x -OutputDirectory "${{ env.TSCT }}"
103102
104103 - name : Write metadata.json
105- if : success() && matrix.type == 'msbuild ' && startsWith(github.ref, 'refs/tags/') && env.AZURE_CLIENT_ID != 0 && env.AZURE_CLIENT_SECRET != 0 && env.AZURE_TENANT_ID != 0 && env.AZURE_ENDPOINT != 0 && env.AZURE_CODE_SIGNING_NAME != 0 && env.AZURE_CERT_PROFILE_NAME != 0
104+ if : success() && matrix.configuration == 'Release ' && startsWith(github.ref, 'refs/tags/') && env.AZURE_CLIENT_ID != 0 && env.AZURE_CLIENT_SECRET != 0 && env.AZURE_TENANT_ID != 0 && env.AZURE_ENDPOINT != 0 && env.AZURE_CODE_SIGNING_NAME != 0 && env.AZURE_CERT_PROFILE_NAME != 0
106105 run : |
107106 python ./ci_tools/create_signing_metadata.py "${{ env.DMDF }}" "${{ env.AZURE_ENDPOINT }}" "${{ env.AZURE_CODE_SIGNING_NAME }}" "${{ env.AZURE_CERT_PROFILE_NAME }}"
108107
109108 - name : Install MsiVal2 and Orca tools
110- if : success() && matrix.type == 'msbuild' && !startsWith(github.ref, 'refs/tags/')
109+ if : success() && !startsWith(github.ref, 'refs/tags/') && matrix.configuration == 'Release'
111110 shell : powershell
112111 run : |
113112 md -Force ./temp
@@ -123,31 +122,27 @@ jobs:
123122 Start-Process "msiexec.exe" -ArgumentList "/i temp\Orca-x86_en-us.msi" -Wait
124123
125124 - name : Build
126- if : success() && matrix.type == 'msbuild'
125+ if : success()
127126 run : msbuild win_build\boinc.sln -p:Configuration=${{matrix.configuration}} -p:Platform=${{matrix.platform}} -p:VcpkgTripletConfig=ci -p:DLIB=${{ env.DLIB }} -p:DMDF=${{ env.DMDF }} -m
128127
129- - name : Build CMake
130- if : success() && matrix.type == 'libs-cmake'
131- run : windows\ci_build_libs_cmake.bat ${{matrix.platform}} ${{matrix.configuration}}
132-
133128 - name : Run unit tests
134- if : success() && matrix.platform == 'x64' && matrix.type == 'msbuild '
129+ if : success() && matrix.platform == 'x64' && matrix.configuration == 'Release '
135130 working-directory : win_build\Build\${{matrix.platform}}\${{matrix.configuration}}
136131 run : |
137132 ${{github.workspace}}\temp\OpenCppCoverage\OpenCppCoverage.exe --cover_children --optimized_build --sources ${{github.workspace}} --export_type=binary:gtest.cov -- unittests.exe --gtest_output=xml:gtest.xml
138133 ${{github.workspace}}\temp\OpenCppCoverage\OpenCppCoverage.exe --cover_children --optimized_build --modules ${{github.workspace}} --sources ${{github.workspace}} --input_coverage=gtest.cov --export_type=cobertura:cobertura.xml -- python ${{github.workspace}}\tests\crypt_prog_tests.py ${{github.workspace}}\win_build\Build\x64\${{matrix.configuration}}\crypt_prog.exe
139134
140135 - name : Verify MSI file
141- if : success() && matrix.type == 'msbuild' && !startsWith(github.ref, 'refs/tags/')
136+ if : success() && !startsWith(github.ref, 'refs/tags/') && matrix.configuration == 'Release'
142137 run : python ./tests/msi_validation.py "C:\Program Files (x86)\MsiVal2\MsiVal2.exe" "${{github.workspace}}\win_build\Build\${{matrix.platform}}\${{matrix.configuration}}\boinc.msi" "${{github.workspace}}\installer\darice.cub"
143138
144139 - name : Run installation
145- if : success() && matrix.platform == 'x64' && matrix.type == 'msbuild '
140+ if : success() && matrix.platform == 'x64' && matrix.configuration == 'Release '
146141 shell : powershell
147142 run : Start-Process "msiexec.exe" -ArgumentList "/i ${{github.workspace}}\win_build\Build\x64\${{matrix.configuration}}\boinc.msi /quiet /qn /l*v ${{github.workspace}}\win_build\Build\x64\${{matrix.configuration}}\install.log" -Wait
148143
149144 - name : Run installation tests
150- if : success() && matrix.platform == 'x64' && matrix.type == 'msbuild '
145+ if : success() && matrix.platform == 'x64' && matrix.configuration == 'Release '
151146 run : python ./tests/windows_installer_integration_tests.py
152147
153148 - name : Prepare logs on failure
@@ -159,11 +154,11 @@ jobs:
159154 if : ${{failure()}}
160155 uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
161156 with :
162- name : windows_logs_ ${{matrix.type }}_${{matrix.platform }}_${{github.event.pull_request.head.sha}}
157+ name : windows_logs_msbuild_ ${{matrix.platform }}_${{matrix.configuration }}_${{github.event.pull_request.head.sha}}
163158 path : deploy/logs.7z
164159
165160 - name : Prepare artifacts for deploy
166- if : success() && matrix.type == 'msbuild '
161+ if : success() && matrix.configuration == 'Release '
167162 shell : cmd
168163 run : |
169164 python deploy\prepare_deployment.py win_apps
@@ -172,49 +167,95 @@ jobs:
172167 python deploy\prepare_deployment.py win_installer
173168
174169 - name : Upload apps
175- if : success() && matrix.type == 'msbuild '
170+ if : success() && matrix.configuration == 'Release '
176171 uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
177172 with :
178173 name : win_apps_${{matrix.platform}}_${{github.event.pull_request.head.sha}}
179174 path : deploy/win_apps.7z
180175
181176 - name : Upload client
182- if : success() && matrix.type == 'msbuild '
177+ if : success() && matrix.configuration == 'Release '
183178 uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
184179 with :
185180 name : win_client_${{matrix.platform}}_${{github.event.pull_request.head.sha}}
186181 path : deploy/win_client.7z
187182
188183 - name : Upload manager
189- if : success() && matrix.type == 'msbuild '
184+ if : success() && matrix.configuration == 'Release '
190185 uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
191186 with :
192187 name : win_manager_${{matrix.platform}}_${{github.event.pull_request.head.sha}}
193188 path : deploy/win_manager.7z
194189
195190 - name : Upload installer files
196- if : success() && matrix.type == 'msbuild '
191+ if : success() && matrix.configuration == 'Release '
197192 uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
198193 with :
199194 name : win_installer_${{matrix.platform}}_${{github.event.pull_request.head.sha}}
200195 path : deploy/win_installer.7z
201196
202197 - name : Upload symbol files
203- if : success() && matrix.type == 'msbuild '
198+ if : success() && matrix.configuration == 'Release '
204199 uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
205200 with :
206201 name : win_pdb_${{matrix.platform}}_${{github.event.pull_request.head.sha}}
207202 path : win_build/Build/${{matrix.platform}}/${{matrix.configuration}}/*.pdb
208203
209204 - name : Upload Google Tests Results
210- if : always() && matrix.platform == 'x64' && matrix.type == 'msbuild '
205+ if : always() && matrix.platform == 'x64' && matrix.configuration == 'Release '
211206 uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
212207 with :
213208 name : Windows_tests_results
214209 path : " win_build/Build/${{matrix.platform}}/${{matrix.configuration}}/**/gtest.xml"
215210
216211 - name : Upload coverage report
217- if : success() && matrix.platform == 'x64' && matrix.type == 'msbuild '
212+ if : success() && matrix.platform == 'x64' && matrix.configuration == 'Release '
218213 uses : codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24
219214 env :
220215 CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
216+
217+ cmake :
218+ name : ${{matrix.configuration}}-${{matrix.platform}}-cmake
219+ runs-on : windows-2022
220+ strategy :
221+ matrix :
222+ platform : [x64, arm64]
223+ configuration : [Release, Debug]
224+ fail-fast : false
225+ steps :
226+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
227+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
228+ with :
229+ fetch-depth : 2
230+
231+ - name : Setup msbuild
232+ uses : microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce
233+
234+ - name : Check if build is running from origin repo
235+ if : ${{success() && env.AWS_ACCESS_KEY_ID != 0 && env.AWS_SECRET_ACCESS_KEY != 0}}
236+ run : |
237+ echo "VCPKG_BINARY_SOURCES=clear;x-aws,s3://vcpkg.cache.boinc/,readwrite" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
238+
239+ - name : Check if build is running from fork
240+ if : ${{success() && (env.AWS_ACCESS_KEY_ID == 0 || env.AWS_SECRET_ACCESS_KEY == 0)}}
241+ run : |
242+ echo "VCPKG_BINARY_SOURCES=clear;x-aws-config,no-sign-request;x-aws,s3://vcpkg.cache.boinc/,read" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
243+
244+ - name : Fix vcpkg
245+ run : vcpkg.exe integrate remove
246+
247+ - name : Build
248+ if : success()
249+ run : windows\ci_build_libs_cmake.bat ${{matrix.platform}} ${{matrix.configuration}}
250+
251+ - name : Prepare logs on failure
252+ if : ${{failure()}}
253+ run : |
254+ python ./deploy/prepare_deployment.py logs
255+
256+ - name : Upload logs on failure
257+ if : ${{failure()}}
258+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
259+ with :
260+ name : windows_logs_cmake_${{matrix.platform}}_${{matrix.configuration}}_${{github.event.pull_request.head.sha}}
261+ path : deploy/logs.7z
0 commit comments