1919
2020 steps :
2121 - uses : actions/checkout@v2
22+ - uses : ayltai/setup-graalvm@v1
23+ with :
24+ java-version : 11
25+ graalvm-version : 21.3.0
26+ native-image : true
2227
2328 - name : Build native spp-cli
2429 run : gradle assemble nativeImage -Dbuild.profile=release
@@ -36,29 +41,37 @@ jobs:
3641 name : spp-cli-macOS.zip
3742 path : ./spp-cli-macOS.zip
3843
39- # buildOnWindows:
40- # runs-on: windows-2016
41-
42- # steps:
43- # - uses: actions/checkout@v2
44- # - uses: microsoft/setup-msbuild@v1.0.2
45- # - uses: seanmiddleditch/gha-setup-vsdevenv@master
46-
47- # - name: Build native spp-cli.exe
48- # run: ./gradlew assemble nativeImage --debug --info --stacktrace
49- # shell: powershell
50- # - run: ls build/graal
51- # # - name: Run UPX
52- # # uses: crazy-max/ghaction-upx@v1.3.3
53- # # with:
54- # # version: latest
55- # # file: target/demo-cli.exe
56- # # args: '-7'
57- # - uses: actions/upload-artifact@v2
58- # with:
59- # if-no-files-found: warn
60- # name: spp-cli.exe
61- # path: build/graal/spp-cli.exe
44+ buildOnWindows :
45+ runs-on : windows-2019
46+
47+ steps :
48+ - uses : actions/checkout@v2
49+ - uses : microsoft/setup-msbuild@v1.0.2
50+ - uses : seanmiddleditch/gha-setup-vsdevenv@master
51+ - uses : ayltai/setup-graalvm@v1
52+ with :
53+ java-version : 11
54+ graalvm-version : 21.3.0
55+ native-image : true
56+
57+ - name : Build native spp-cli.exe
58+ run : ./gradlew assemble nativeImage '-Dbuild.profile=release'
59+ shell : powershell
60+ - name : Run UPX
61+ uses : crazy-max/ghaction-upx@v1.3.3
62+ with :
63+ version : latest
64+ file : build/graal/spp-cli.exe
65+ args : ' -7'
66+
67+ - name : Zip CLI
68+ run : jar -cfM spp-cli-win64.zip build/graal/
69+
70+ - uses : actions/upload-artifact@v2
71+ with :
72+ if-no-files-found : warn
73+ name : spp-cli-win64.zip
74+ path : ./spp-cli-win64.zip
6275
6376 buildOnLinux :
6477 runs-on : ubuntu-latest
@@ -68,12 +81,11 @@ jobs:
6881 version : ${{ steps.properties.outputs.version }}
6982 steps :
7083 - uses : actions/checkout@v2
71- - name : Set up JDK 11
72- uses : actions/setup-java@v2
84+ - uses : ayltai/setup-graalvm@v1
7385 with :
74- java-version : ' 11 '
75- distribution : ' adopt '
76- cache : gradle
86+ java-version : 11
87+ graalvm-version : 21.3.0
88+ native-image : true
7789
7890 - name : Export Properties
7991 id : properties
@@ -90,14 +102,6 @@ jobs:
90102 run : docker inspect --format='{{.Name}} - {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $(docker ps -aq)
91103 - name : Set SPP_PLATFORM_HOST
92104 run : SPP_PLATFORM_HOST=$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $(docker ps -aqf "name=spp-platform")) && echo "SPP_PLATFORM_HOST=$SPP_PLATFORM_HOST" >> $GITHUB_ENV
93- - run : sleep 30s
94-
95- - run : ./gradlew test -Dtest.profile=integration
96-
97- - name : Compress CLI
98- uses : svenstaro/upx-action@v2
99- with :
100- file : build/graal/spp-cli
101105
102106 - name : " [CLI] Get developers"
103107 run : ./build/graal/spp-cli -v admin get-developers
@@ -153,6 +157,15 @@ jobs:
153157 run : ./build/graal/spp-cli -v get-logs
154158 - name : " [CLI] Remove live instruments"
155159 run : ./build/graal/spp-cli -v remove-instruments spp.example.webapp.model.User 48
160+ - name : " [CLI] Reset"
161+ run : ./build/graal/spp-cli -v admin reset
162+
163+ - run : ./gradlew test -Dtest.profile=integration
164+
165+ - name : Compress CLI
166+ uses : svenstaro/upx-action@v2
167+ with :
168+ file : build/graal/spp-cli
156169
157170 - name : Zip spp-cli
158171 run : zip spp-cli-linux64.zip -j build/graal/spp-cli
@@ -161,10 +174,10 @@ jobs:
161174 with :
162175 name : spp-cli-linux64.zip
163176 path : ./spp-cli-linux64.zip
164-
177+
165178 releaseDraft :
166179 name : Release Draft
167- needs : [buildOnMac, buildOnLinux]
180+ needs : [ buildOnMac, buildOnWindows, buildOnLinux ]
168181 runs-on : ubuntu-latest
169182 if : github.ref == 'refs/heads/master'
170183 steps :
@@ -205,6 +218,21 @@ jobs:
205218 asset_name : spp-cli-${{ needs.buildOnLinux.outputs.version }}-macOS.zip
206219 asset_content_type : application/zip
207220
221+ - name : Download spp-cli-win64 artifact
222+ uses : actions/download-artifact@v2
223+ with :
224+ name : spp-cli-win64.zip
225+
226+ - name : Upload spp-cli-win64 asset
227+ uses : actions/upload-release-asset@v1
228+ env :
229+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
230+ with :
231+ upload_url : ${{ steps.createDraft.outputs.upload_url }}
232+ asset_path : ./spp-cli-win64.zip
233+ asset_name : spp-cli-${{ needs.buildOnWindows.outputs.version }}-win64.zip
234+ asset_content_type : application/zip
235+
208236 - name : Download spp-cli-linux64 artifact
209237 uses : actions/download-artifact@v2
210238 with :
0 commit comments