-
Notifications
You must be signed in to change notification settings - Fork 11
111 lines (96 loc) · 3.77 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# Copyright 2020, 2022 Oracle Corporation and/or its affiliates. All rights reserved.
# Licensed under the Universal Permissive License v 1.0 as shown at
# https://oss.oracle.com/licenses/upl.
# ---------------------------------------------------------------------------
# Coherence .NET Extend Client GitHub Actions CI build.
# ---------------------------------------------------------------------------
name: CI Build
on:
workflow_dispatch:
push:
branches-ignore:
- gh-pages
- p4-integ*
- last-p4-*
pull_request:
types:
- opened
- committed
branches:
- '*'
pull_request_review:
types:
- submitted
- edited
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2
# Install the .NET Core workload
- name: Install .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild.exe
uses: microsoft/[email protected]
# Install and Set up dependencies/tools which are required by build
- name: Build Setup
run: |
Get-ChildItem Env: | Sort name
# Install msbuild.extension.pack
mkdir -p tools\internal\msbuild
$client = new-object System.Net.WebClient
$client.DownloadFile("https://www.nuget.org/api/v2/package/MSBuild.Extension.Pack/1.9.1","$Env:TEMP\msbuild.extension.pack.1.9.1.nupkg")
unzip $Env:TEMP\msbuild.extension.pack.1.9.1.nupkg -d tools\internal\msbuild
# Install nunit and nunit.runner
$client.DownloadFile("https://launchpad.net/nunitv2/trunk/2.6.2/+download/NUnit-2.6.2.zip","$Env:TEMP\NUnit-2.6.2.zip")
unzip $Env:TEMP\NUnit-2.6.2.zip -d tools\internal\
move tools\internal\NUnit-2.6.2 tools\internal\nunit
mkdir tools\internal\nunit\lib
xcopy tools\internal\nunit\bin\framework\nunit.framework.dll tools\internal\nunit\lib
mkdir tools\internal\nunit.runners
$client.DownloadFile("https://www.nuget.org/api/v2/package/NUnit.Runners/2.6.2","$Env:TEMP\nunit.runners.2.6.2.nupkg")
unzip $Env:TEMP\nunit.runners.2.6.2.nupkg -d tools\internal\nunit.runners\
# Install ant under tools\internal\ant
$client.DownloadFile("https://archive.apache.org/dist/ant/binaries/apache-ant-1.7.0-bin.zip","$Env:TEMP\ant.zip")
mkdir -p tools\internal\ant
unzip $Env:TEMP\ant.zip -d tools\internal\
move tools\internal\apache-ant-1.7.0 tools\internal\ant
# Install Sandcastle Help File Builder and Tools
mkdir -p tools\internal\shfb
$client.DownloadFile("https://www.nuget.org/api/v2/package/EWSoftware.SHFB/2019.11.17", "$Env:TEMP\shfb.nupkg")
unzip $Env:TEMP\shfb.nupkg -d tools\internal\shfb\
move tools\internal\shfb\tools\* tools\internal\shfb\
# Install winhttpcertcfg and certmgr required for running tests
mkdir -p tools\internal\resourcekit
choco install winhttpcertcfg
move C:\ProgramData\chocolatey\lib\WinHttpCertCfg\tools\* tools\internal\resourcekit\
# Build
- name: Build
run: |
$Env:DEV_ROOT = pwd
touch ./.rnd
bin\cfgbuild.cmd
msbuild /t:clean /t:build Coherence.msbuild
# Verify
- name: Verify
run: |
$Env:DEV_ROOT = pwd
bin\cfgbuild.cmd
msbuild /t:test Coherence.msbuild
# Capture logs and test reports for diagnosing failures
- name: Capture test logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: build-output
path: build\**\*.log
- name: Capture test reports
uses: actions/upload-artifact@v4
if: failure()
with:
name: test-reports
path: build\**\*tests.xml