-
Notifications
You must be signed in to change notification settings - Fork 14
138 lines (137 loc) · 5.75 KB
/
cd.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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
name: infinispan-netcore-tests
env:
ISPN_VER: "15.0.0.Dev04"
CLIENT_VERSION: ${{ github.event.release.tag_name }}
on:
push:
tags:
- "9.3.**"
jobs:
run-ci-tests-win:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Inject slug/short variables
uses: rlespinasse/github-slug-action@v4
- run: echo $GITHUB_REF_NAME
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.1
- name: Build Protobuf
shell: cmd
run: |
cd ${{ github.workspace }}
git clone -b v3.8.0 https://github.com/protocolbuffers/protobuf.git
mkdir libs
cd protobuf
mkdir build && cd build
cmake -G "Visual Studio 17 2022" -Dprotobuf_MSVC_STATIC_RUNTIME=OFF -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}\libs -Dprotobuf_BUILD_TESTS=OFF ${{ github.workspace }}\protobuf\cmake
cmake --build . --config Release --target install
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- uses: actions/setup-python@v4
with:
python-version: "3.x" # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: "x64" # optional x64 or x86. Defaults to x64 if not specified
- name: Build C++
shell: cmd
run: |
echo '::echo::on'
where swig
where mvn
where java
dir C:\ProgramData\Chocolatey\tools
set generator="Visual Studio 17 2022"
set SWIG_DIR=C:\ProgramData\Chocolatey\bin
set SWIG_EXECUTABLE=C:\ProgramData\Chocolatey\bin\swig.exe
set MVN_PROGRAM=C:\ProgramData\chocolatey\lib\maven\apache-maven-3.8.6\bin\mvn
set PROTOBUF_LIBRARY=${{ github.workspace }}\libs\lib\libprotobuf.lib
set PROTOBUF_PROTOC_EXECUTABLE=${{ github.workspace }}\libs\bin\protoc.exe
set PROTOBUF_PROTOC_LIBRARY=${{ github.workspace }}\libs\lib\libprotoc.lib
set PROTOBUF_INCLUDE_DIR=${{ github.workspace }}\libs\include
set INFINISPAN_VERSION=15.0.0.Dev04
set cppTag=%GITHUB_REF_NAME%
set CLIENT_VERSION=%GITHUB_REF_NAME%
git clone -b %cppTag% https://github.com/infinispan/cpp-client.git
cd cpp-client
set buildTest=skip
build.bat
- name: Strong Names Setup
shell: pwsh
env:
SECRET_DATA1: ${{ secrets.STRONG_NAMES_KEY }}
run: |
$Base64String = $env:SECRET_DATA1
$StrongNamesKey = "strongNames.key"
[byte[]]$Bytes = [convert]::FromBase64String($Base64String)
[System.IO.File]::WriteAllBytes($StrongNamesKey,$Bytes)
- uses: nuget/setup-nuget@v1
- name: Build C#
shell: cmd
run: |
echo '::echo::on'
where swig
where mvn
where java
dir
set generator="Visual Studio 17 2022"
set checkoutDir=${{ github.workspace }}
set INFINISPAN_VERSION=15.0.0.Dev04
set JBOSS_HOME=${{ github.workspace }}\cpp-client\infinispan-server-15.0.0.Dev04
set PROTOBUF_LIBRARY=${{ github.workspace }}\libs\lib\libprotobuf.lib
set PROTOBUF_PROTOC_EXECUTABLE=${{ github.workspace }}\libs\bin\protoc.exe
set PROTOBUF_PROTOC_LIBRARY=${{ github.workspace }}\libs\lib\libprotoc.lib
set PROTOBUF_INCLUDE_DIR=${{ github.workspace }}\protobuf\src
set HOTROD_SNK=${{ github.workspace }}\strongNames.key
mkdir nupkg
nuget install NLog -Version 2.1.0 -OutputDirectory nupkg
set NLOG_DLL=${{ github.workspace }}\nupkg\NLog.2.1.0\lib\net40\NLog.dll
nuget install NUnit -Version 3.8.0 -OutputDirectory nupkg
set NUNIT_DLL=${{ github.workspace }}\nupkg\NUnit.3.8.0\lib\net45\nunit.framework.dll
set NLOG_LICENSE=${{ github.workspace }}\License.txt
nuget install NUnit.ConsoleRunner -Version 3.8.0 -OutputDirectory nupkg
set PATH=%PATH%;${{ github.workspace }}\nupkg\Nunit.ConsoleRunner.3.8.0\tools
nuget install Google.Protobuf.Tools -Version 3.8.0 -OutputDirectory nupkg
nuget install Google.Protobuf -Version 3.8.0 -OutputDirectory nupkg
set PROTOBUF_PROTOC_EXECUTABLE_CS=${{ github.workspace }}\nupkg\Google.Protobuf.Tools.3.8.0\tools\windows_x64\protoc.exe
set GOOGLE_PROTOBUF_NUPKG=${{ github.workspace }}\nupkg
nuget install swigwintools -Version 3.0.12 -OutputDirectory nupkg
set SWIG_DIR=${{ github.workspace }}\nupkg\swigwintools.3.0.12\tools\swigwin-3.0.12\Lib
set SWIG_EXECUTABLE=${{ github.workspace }}\nupkg\swigwintools.3.0.12\tools\swigwin-3.0.12\swig.exe
set CLIENT_VERSION=%GITHUB_REF_NAME%
set packNuget=true
set buildTest=skip
set buildPack=skip
build.bat
- name: Test C#
shell: cmd
run: |
echo '::echo::on'
set buildTest=
set buildBuild=skip
set buildPack=skip
build.bat
- name: Pack C#
shell: cmd
run: |
echo '::echo::on'
set buildTest=skip
set buildBuild=skip
set buildPack=
build.bat
- name: Delete old release assets
uses: mknejp/delete-release-assets@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ env.GITHUB_REF_NAME }}
assets: '*.msi'
fail-if-no-assets: false
fail-if-no-release: false
- uses: ncipollo/release-action@v1
with:
artifacts: "build_windows/*.msi"
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true
tag: ${{ env.GITHUB_REF_NAME }}
prerelease: ${{ !endsWith( env.GITHUB_REF_NAME, 'Final') }}