2020-12-23 11:31:16 +00:00
|
|
|
name: Windows
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ master ]
|
|
|
|
schedule:
|
|
|
|
- cron: '15 12 * * 0'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: ${{ matrix.configuration }}-${{ matrix.platform }}-build
|
|
|
|
runs-on: windows-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
platform: [x64]
|
|
|
|
configuration: [Release]
|
|
|
|
env:
|
|
|
|
VCPKG_BINARY_SOURCES: 'clear;files,${{ github.workspace }}\3rdParty\buildCache\windows\vcpkgcache\,readwrite'
|
|
|
|
steps:
|
|
|
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
|
|
|
- uses: actions/checkout@v2
|
2021-02-17 20:29:36 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 2
|
2020-12-23 11:31:16 +00:00
|
|
|
|
2021-04-12 16:03:26 +00:00
|
|
|
- name: Download OpenCppCoverage
|
2020-12-23 11:31:16 +00:00
|
|
|
uses: suisei-cn/actions-download-file@v1
|
2021-04-12 16:03:26 +00:00
|
|
|
id: DownloadOpenCppCoverage
|
2020-12-23 11:31:16 +00:00
|
|
|
with:
|
2021-04-12 16:03:26 +00:00
|
|
|
url: "https://opencppcoverage.gallerycdn.vsassets.io/extensions/opencppcoverage/opencppcoverageplugin/0.9.7.1/1581265346391/OpenCppCoverage-0.9.7.1.vsix"
|
2020-12-23 11:31:16 +00:00
|
|
|
target: ${{ github.workspace }}\temp\
|
|
|
|
|
2021-04-12 16:03:26 +00:00
|
|
|
- name: Unzip OpenCppCoverage
|
2020-12-23 11:31:16 +00:00
|
|
|
uses: DuckSoft/extract-7z-action@v1.0
|
|
|
|
with:
|
2021-04-12 16:03:26 +00:00
|
|
|
pathSource: ${{ github.workspace }}\temp\OpenCppCoverage-0.9.7.1.vsix
|
|
|
|
pathTarget: ${{ github.workspace }}\temp\OpenCppCoverage
|
2020-12-23 11:31:16 +00:00
|
|
|
|
|
|
|
- name: Setup msbuild
|
|
|
|
uses: microsoft/setup-msbuild@v1
|
|
|
|
|
|
|
|
- name: Fix vcpkg
|
|
|
|
run: vcpkg.exe integrate remove
|
|
|
|
|
|
|
|
- name: Cache dependencies
|
|
|
|
uses: actions/cache@v2.1.3
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
${{ github.workspace }}\3rdParty\buildCache\windows\vcpkgcache\
|
|
|
|
${{ github.workspace }}\3rdParty\Windows\cuda\
|
|
|
|
key: windows-${{ matrix.platform }}-${{ matrix.configuration }}-${{ hashFiles('win_build/vcpkg_3rdparty_dependencies_vs2019.vcxproj') }}
|
|
|
|
restore-keys: windows-${{ matrix.platform }}-${{ matrix.configuration }}-
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: msbuild win_build\boinc_vs2019.sln -p:Configuration=${{ matrix.configuration }} -p:Platform=${{ matrix.platform }} -p:VcpkgTripletConfig=ci -m
|
|
|
|
|
|
|
|
- name: Run tests
|
2021-04-12 16:03:26 +00:00
|
|
|
working-directory: win_build\Build\${{ matrix.platform }}\${{ matrix.configuration }}
|
|
|
|
run: ${{ github.workspace }}\temp\OpenCppCoverage\OpenCppCoverage-x64\OpenCppCoverage.exe --cover_children --optimized_build --sources ${{ github.workspace }} --export_type=cobertura:cobertura.xml -- unittests.exe --gtest_output=xml:gtest.xml
|
2020-12-23 11:31:16 +00:00
|
|
|
|
|
|
|
- name: Deploy to BinTray
|
|
|
|
if: ${{ success() }}
|
|
|
|
env:
|
|
|
|
BINTRAY_API_KEY: ${{ secrets.BINTRAY_API_KEY }}
|
|
|
|
PULL_REQUEST: ${{ github.event.number }}
|
|
|
|
PULL_REQUEST_SHA: ${{ github.event.pull_request.head.sha }}
|
|
|
|
platform: ${{ matrix.platform }}
|
|
|
|
configuration: ${{ matrix.configuration }}
|
|
|
|
shell: cmd
|
|
|
|
run: |
|
|
|
|
call deploy\prepare_deployment.bat
|
|
|
|
call deploy\deploy_to_bintray.bat
|
2021-01-04 13:02:50 +00:00
|
|
|
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: win_apps_${{ github.event.pull_request.head.sha }}
|
|
|
|
path: deploy/win_apps/*.7z
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: win_client_${{ github.event.pull_request.head.sha }}
|
|
|
|
path: deploy/win_client/*.7z
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: win_manager_${{ github.event.pull_request.head.sha }}
|
|
|
|
path: deploy/win_manager/*.7z
|
2021-04-12 16:03:26 +00:00
|
|
|
|
|
|
|
- name: Upload coverage report
|
|
|
|
uses: codecov/codecov-action@v1
|
|
|
|
if: success()
|
|
|
|
with:
|
|
|
|
fail_ci_if_error: true
|
|
|
|
verbose: false
|