forked from openjdk/jdk
-
Notifications
You must be signed in to change notification settings - Fork 0
1717 lines (1509 loc) · 73 KB
/
submit.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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
name: Pre-submit tests
on:
push:
branches-ignore:
- master
- pr/*
workflow_dispatch:
inputs:
platforms:
description: "Platform(s) to execute on"
required: true
default: "Linux additional (hotspot only), Linux x64, Linux x86, Windows aarch64, Windows x64, macOS x64"
jobs:
prerequisites:
name: Prerequisites
runs-on: "ubuntu-20.04"
outputs:
should_run: ${{ steps.check_submit.outputs.should_run }}
bundle_id: ${{ steps.check_bundle_id.outputs.bundle_id }}
platform_linux_additional: ${{ steps.check_platforms.outputs.platform_linux_additional }}
platform_linux_x64: ${{ steps.check_platforms.outputs.platform_linux_x64 }}
platform_linux_x86: ${{ steps.check_platforms.outputs.platform_linux_x86 }}
platform_windows_aarch64: ${{ steps.check_platforms.outputs.platform_windows_aarch64 }}
platform_windows_x64: ${{ steps.check_platforms.outputs.platform_windows_x64 }}
platform_macos_x64: ${{ steps.check_platforms.outputs.platform_macos_x64 }}
platform_macos_aarch64: ${{ steps.check_platforms.outputs.platform_macos_aarch64 }}
dependencies: ${{ steps.check_deps.outputs.dependencies }}
steps:
- name: Check if submit tests should actually run depending on secrets and manual triggering
id: check_submit
run: echo "::set-output name=should_run::${{ github.event.inputs.platforms != '' || (!secrets.JDK_SUBMIT_FILTER || startsWith(github.ref, 'refs/heads/submit/')) }}"
- name: Check which platforms should be included
id: check_platforms
run: |
echo "::set-output name=platform_linux_additional::${{ contains(github.event.inputs.platforms, 'linux additional (hotspot only)') || (github.event.inputs.platforms == '' && (secrets.JDK_SUBMIT_PLATFORMS == '' || contains(secrets.JDK_SUBMIT_PLATFORMS, 'linux additional (hotspot only)'))) }}"
echo "::set-output name=platform_linux_x64::${{ contains(github.event.inputs.platforms, 'linux x64') || (github.event.inputs.platforms == '' && (secrets.JDK_SUBMIT_PLATFORMS == '' || contains(secrets.JDK_SUBMIT_PLATFORMS, 'linux x64'))) }}"
echo "::set-output name=platform_linux_x86::${{ contains(github.event.inputs.platforms, 'linux x86') || (github.event.inputs.platforms == '' && (secrets.JDK_SUBMIT_PLATFORMS == '' || contains(secrets.JDK_SUBMIT_PLATFORMS, 'linux x86'))) }}"
echo "::set-output name=platform_windows_aarch64::${{ contains(github.event.inputs.platforms, 'windows aarch64') || (github.event.inputs.platforms == '' && (secrets.JDK_SUBMIT_PLATFORMS == '' || contains(secrets.JDK_SUBMIT_PLATFORMS, 'windows aarch64'))) }}"
echo "::set-output name=platform_windows_x64::${{ contains(github.event.inputs.platforms, 'windows x64') || (github.event.inputs.platforms == '' && (secrets.JDK_SUBMIT_PLATFORMS == '' || contains(secrets.JDK_SUBMIT_PLATFORMS, 'windows x64'))) }}"
echo "::set-output name=platform_macos_x64::${{ contains(github.event.inputs.platforms, 'macos x64') || (github.event.inputs.platforms == '' && (secrets.JDK_SUBMIT_PLATFORMS == '' || contains(secrets.JDK_SUBMIT_PLATFORMS, 'macos x64'))) }}"
echo "::set-output name=platform_macos_aarch64::${{ contains(github.event.inputs.platforms, 'macos aarch64') || (github.event.inputs.platforms == '' && (secrets.JDK_SUBMIT_PLATFORMS == '' || contains(secrets.JDK_SUBMIT_PLATFORMS, 'macos aarch64'))) }}"
if: steps.check_submit.outputs.should_run != 'false'
- name: Determine unique bundle identifier
id: check_bundle_id
run: echo "::set-output name=bundle_id::${GITHUB_ACTOR}_${GITHUB_SHA:0:8}"
if: steps.check_submit.outputs.should_run != 'false'
- name: Checkout the source
uses: actions/checkout@v2
with:
path: jdk
if: steps.check_submit.outputs.should_run != 'false'
- name: Determine versions and locations to be used for dependencies
id: check_deps
run: "echo ::set-output name=dependencies::`cat make/conf/version-numbers.conf make/conf/test-dependencies | sed -e '1i {' -e 's/#.*//g' -e 's/\"//g' -e 's/\\(.*\\)=\\(.*\\)/\"\\1\": \"\\2\",/g' -e '$s/,\\s\\{0,\\}$/\\}/'`"
working-directory: jdk
if: steps.check_submit.outputs.should_run != 'false'
- name: Print extracted dependencies to the log
run: "echo '${{ steps.check_deps.outputs.dependencies }}'"
if: steps.check_submit.outputs.should_run != 'false'
- name: Determine the jtreg ref to checkout
run: "echo JTREG_REF=jtreg-${{ fromJson(steps.check_deps.outputs.dependencies).JTREG_VERSION }}+${{ fromJson(steps.check_deps.outputs.dependencies).JTREG_BUILD }} >> $GITHUB_ENV"
if: steps.check_submit.outputs.should_run != 'false'
- name: Check if a jtreg image is present in the cache
id: jtreg
uses: actions/cache@v2
with:
path: ~/jtreg/
key: jtreg-${{ env.JTREG_REF }}-v1
if: steps.check_submit.outputs.should_run != 'false'
- name: Checkout the jtreg source
uses: actions/checkout@v2
with:
repository: "openjdk/jtreg"
ref: ${{ env.JTREG_REF }}
path: jtreg
if: steps.check_submit.outputs.should_run != 'false' && steps.jtreg.outputs.cache-hit != 'true'
- name: Build jtreg
run: bash make/build.sh --jdk ${JAVA_HOME_8_X64}
working-directory: jtreg
if: steps.check_submit.outputs.should_run != 'false' && steps.jtreg.outputs.cache-hit != 'true'
- name: Move jtreg image to destination folder
run: mv build/images/jtreg ~/
working-directory: jtreg
if: steps.check_submit.outputs.should_run != 'false' && steps.jtreg.outputs.cache-hit != 'true'
- name: Store jtreg for use by later steps
uses: actions/upload-artifact@v2
with:
name: transient_jtreg_${{ steps.check_bundle_id.outputs.bundle_id }}
path: ~/jtreg/
if: steps.check_submit.outputs.should_run != 'false'
linux_x64_build:
name: Linux x64
runs-on: "ubuntu-20.04"
needs: prerequisites
if: needs.prerequisites.outputs.should_run != 'false' && (needs.prerequisites.outputs.platform_linux_x64 != 'false' || needs.prerequisites.outputs.platform_linux_additional == 'true')
strategy:
fail-fast: false
matrix:
flavor:
- build release
- build debug
include:
- flavor: build debug
flags: --enable-debug
artifact: -debug
env:
JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).DEFAULT_VERSION_FEATURE }}"
BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}"
BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_FILENAME }}"
BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_URL }}"
BOOT_JDK_SHA256: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_SHA256 }}"
steps:
- name: Checkout the source
uses: actions/checkout@v2
with:
path: jdk
- name: Restore boot JDK from cache
id: bootjdk
uses: actions/cache@v2
with:
path: ~/bootjdk/${{ env.BOOT_JDK_VERSION }}
key: bootjdk-${{ runner.os }}-${{ env.BOOT_JDK_VERSION }}-${{ env.BOOT_JDK_SHA256 }}-v1
- name: Download boot JDK
run: |
mkdir -p "${HOME}/bootjdk/${BOOT_JDK_VERSION}"
wget -O "${HOME}/bootjdk/${BOOT_JDK_FILENAME}" "${BOOT_JDK_URL}"
echo "${BOOT_JDK_SHA256} ${HOME}/bootjdk/${BOOT_JDK_FILENAME}" | sha256sum -c >/dev/null -
tar -xf "${HOME}/bootjdk/${BOOT_JDK_FILENAME}" -C "${HOME}/bootjdk/${BOOT_JDK_VERSION}"
mv "${HOME}/bootjdk/${BOOT_JDK_VERSION}/"*/* "${HOME}/bootjdk/${BOOT_JDK_VERSION}/"
if: steps.bootjdk.outputs.cache-hit != 'true'
- name: Restore jtreg artifact
id: jtreg_restore
uses: actions/download-artifact@v2
with:
name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }}
path: ~/jtreg/
continue-on-error: true
- name: Restore jtreg artifact (retry)
uses: actions/download-artifact@v2
with:
name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }}
path: ~/jtreg/
if: steps.jtreg_restore.outcome == 'failure'
- name: Checkout gtest sources
uses: actions/checkout@v2
with:
repository: "google/googletest"
ref: "release-${{ fromJson(needs.prerequisites.outputs.dependencies).GTEST_VERSION }}"
path: gtest
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install gcc-10=10.3.0-1ubuntu1~20.04 g++-10=10.3.0-1ubuntu1~20.04 libxrandr-dev libxtst-dev libcups2-dev libasound2-dev
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10
- name: Configure
run: >
bash configure
--with-conf-name=linux-x64
${{ matrix.flags }}
--with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
--with-version-build=0
--with-boot-jdk=${HOME}/bootjdk/${BOOT_JDK_VERSION}
--with-jtreg=${HOME}/jtreg
--with-gtest=${GITHUB_WORKSPACE}/gtest
--with-default-make-target="product-bundles test-bundles"
--with-zlib=system
--enable-jtreg-failure-handler
working-directory: jdk
- name: Build
run: make CONF_NAME=linux-x64
working-directory: jdk
- name: Persist test bundles
uses: actions/upload-artifact@v2
with:
name: transient_jdk-linux-x64${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }}
path: |
jdk/build/linux-x64/bundles/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin${{ matrix.artifact }}.tar.gz
jdk/build/linux-x64/bundles/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin-tests${{ matrix.artifact }}.tar.gz
linux_x64_test:
name: Linux x64
runs-on: "ubuntu-20.04"
needs:
- prerequisites
- linux_x64_build
strategy:
fail-fast: false
matrix:
test:
- jdk/tier1 part 1
- jdk/tier1 part 2
- jdk/tier1 part 3
- langtools/tier1
- hs/tier1 common
- hs/tier1 compiler
- hs/tier1 gc
- hs/tier1 runtime
- hs/tier1 serviceability
include:
- test: jdk/tier1 part 1
suites: test/jdk/:tier1_part1
- test: jdk/tier1 part 2
suites: test/jdk/:tier1_part2
- test: jdk/tier1 part 3
suites: test/jdk/:tier1_part3
- test: langtools/tier1
suites: test/langtools/:tier1
- test: hs/tier1 common
suites: test/hotspot/jtreg/:tier1_common
artifact: -debug
- test: hs/tier1 compiler
suites: test/hotspot/jtreg/:tier1_compiler
artifact: -debug
- test: hs/tier1 gc
suites: test/hotspot/jtreg/:tier1_gc
artifact: -debug
- test: hs/tier1 runtime
suites: test/hotspot/jtreg/:tier1_runtime
artifact: -debug
- test: hs/tier1 serviceability
suites: test/hotspot/jtreg/:tier1_serviceability
artifact: -debug
env:
JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).DEFAULT_VERSION_FEATURE }}"
BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}"
BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_FILENAME }}"
BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_URL }}"
BOOT_JDK_SHA256: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_SHA256 }}"
steps:
- name: Checkout the source
uses: actions/checkout@v2
- name: Restore boot JDK from cache
id: bootjdk
uses: actions/cache@v2
with:
path: ~/bootjdk/${{ env.BOOT_JDK_VERSION }}
key: bootjdk-${{ runner.os }}-${{ env.BOOT_JDK_VERSION }}-${{ env.BOOT_JDK_SHA256 }}-v1
- name: Download boot JDK
run: |
mkdir -p "${HOME}/bootjdk/${BOOT_JDK_VERSION}"
wget -O "${HOME}/bootjdk/${BOOT_JDK_FILENAME}" "${BOOT_JDK_URL}"
echo "${BOOT_JDK_SHA256} ${HOME}/bootjdk/${BOOT_JDK_FILENAME}" | sha256sum -c >/dev/null -
tar -xf "${HOME}/bootjdk/${BOOT_JDK_FILENAME}" -C "${HOME}/bootjdk/${BOOT_JDK_VERSION}"
mv "${HOME}/bootjdk/${BOOT_JDK_VERSION}/"*/* "${HOME}/bootjdk/${BOOT_JDK_VERSION}/"
if: steps.bootjdk.outputs.cache-hit != 'true'
- name: Restore jtreg artifact
id: jtreg_restore
uses: actions/download-artifact@v2
with:
name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }}
path: ~/jtreg/
continue-on-error: true
- name: Restore jtreg artifact (retry)
uses: actions/download-artifact@v2
with:
name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }}
path: ~/jtreg/
if: steps.jtreg_restore.outcome == 'failure'
- name: Restore build artifacts
id: build_restore
uses: actions/download-artifact@v2
with:
name: transient_jdk-linux-x64${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }}
path: ~/jdk-linux-x64${{ matrix.artifact }}
continue-on-error: true
- name: Restore build artifacts (retry)
uses: actions/download-artifact@v2
with:
name: transient_jdk-linux-x64${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }}
path: ~/jdk-linux-x64${{ matrix.artifact }}
if: steps.build_restore.outcome == 'failure'
- name: Unpack jdk
run: |
mkdir -p "${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin${{ matrix.artifact }}"
tar -xf "${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin${{ matrix.artifact }}.tar.gz" -C "${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin${{ matrix.artifact }}"
- name: Unpack tests
run: |
mkdir -p "${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin-tests${{ matrix.artifact }}"
tar -xf "${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin-tests${{ matrix.artifact }}.tar.gz" -C "${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin-tests${{ matrix.artifact }}"
- name: Find root of jdk image dir
run: |
imageroot=`find ${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin${{ matrix.artifact }} -name release -type f`
echo "imageroot=`dirname ${imageroot}`" >> $GITHUB_ENV
- name: Run tests
run: >
JDK_IMAGE_DIR=${{ env.imageroot }}
TEST_IMAGE_DIR=${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin-tests${{ matrix.artifact }}
BOOT_JDK=${HOME}/bootjdk/${BOOT_JDK_VERSION}
JT_HOME=${HOME}/jtreg
make test-prebuilt
CONF_NAME=run-test-prebuilt
LOG_CMDLINES=true
JTREG_VERBOSE=fail,error,time
TEST="${{ matrix.suites }}"
TEST_OPTS_JAVA_OPTIONS=
JTREG_KEYWORDS="!headful"
JTREG="JAVA_OPTIONS=-XX:-CreateCoredumpOnCrash"
- name: Check that all tests executed successfully
if: always()
run: >
if ! grep --include=test-summary.txt -lqr build/*/test-results -e "TEST SUCCESS" ; then
cat build/*/test-results/*/text/newfailures.txt ;
exit 1 ;
fi
- name: Create suitable test log artifact name
if: always()
run: echo "logsuffix=`echo ${{ matrix.test }} | sed -e 's!/!_!'g -e 's! !_!'g`" >> $GITHUB_ENV
- name: Package test results
if: always()
working-directory: build/run-test-prebuilt/test-results/
run: >
zip -r9
"$HOME/linux-x64${{ matrix.artifact }}_testresults_${{ env.logsuffix }}.zip"
.
continue-on-error: true
- name: Package test support
if: always()
working-directory: build/run-test-prebuilt/test-support/
run: >
zip -r9
"$HOME/linux-x64${{ matrix.artifact }}_testsupport_${{ env.logsuffix }}.zip"
.
-i *.jtr
-i */hs_err*.log
-i */replay*.log
continue-on-error: true
- name: Persist test results
if: always()
uses: actions/upload-artifact@v2
with:
path: ~/linux-x64${{ matrix.artifact }}_testresults_${{ env.logsuffix }}.zip
continue-on-error: true
- name: Persist test outputs
if: always()
uses: actions/upload-artifact@v2
with:
path: ~/linux-x64${{ matrix.artifact }}_testsupport_${{ env.logsuffix }}.zip
continue-on-error: true
linux_additional_build:
name: Linux additional
runs-on: "ubuntu-20.04"
needs:
- prerequisites
- linux_x64_build
if: needs.prerequisites.outputs.should_run != 'false' && needs.prerequisites.outputs.platform_linux_additional != 'false'
strategy:
fail-fast: false
matrix:
flavor:
- hs x64 build only
- hs x64 zero build only
- hs x64 minimal build only
- hs x64 optimized build only
- hs aarch64 build only
- hs arm build only
- hs s390x build only
- hs ppc64le build only
include:
- flavor: hs x64 build only
flags: --enable-debug --disable-precompiled-headers
- flavor: hs x64 zero build only
flags: --enable-debug --disable-precompiled-headers --with-jvm-variants=zero
- flavor: hs x64 minimal build only
flags: --enable-debug --disable-precompiled-headers --with-jvm-variants=minimal
- flavor: hs x64 optimized build only
flags: --with-debug-level=optimized --disable-precompiled-headers
- flavor: hs aarch64 build only
flags: --enable-debug --disable-precompiled-headers
debian-arch: arm64
gnu-arch: aarch64
- flavor: hs arm build only
flags: --enable-debug --disable-precompiled-headers
debian-arch: armhf
gnu-arch: arm
gnu-flavor: eabihf
- flavor: hs s390x build only
flags: --enable-debug --disable-precompiled-headers
debian-arch: s390x
gnu-arch: s390x
- flavor: hs ppc64le build only
flags: --enable-debug --disable-precompiled-headers
debian-arch: ppc64el
gnu-arch: powerpc64le
env:
JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).DEFAULT_VERSION_FEATURE }}"
BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}"
BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_FILENAME }}"
BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_URL }}"
BOOT_JDK_SHA256: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_SHA256 }}"
steps:
- name: Checkout the source
uses: actions/checkout@v2
with:
path: jdk
- name: Restore boot JDK from cache
id: bootjdk
uses: actions/cache@v2
with:
path: ~/bootjdk/${{ env.BOOT_JDK_VERSION }}
key: bootjdk-${{ runner.os }}-${{ env.BOOT_JDK_VERSION }}-${{ env.BOOT_JDK_SHA256 }}-v1
- name: Download boot JDK
run: |
mkdir -p "${HOME}/bootjdk/${BOOT_JDK_VERSION}"
wget -O "${HOME}/bootjdk/${BOOT_JDK_FILENAME}" "${BOOT_JDK_URL}"
echo "${BOOT_JDK_SHA256} ${HOME}/bootjdk/${BOOT_JDK_FILENAME}" | sha256sum -c >/dev/null -
tar -xf "${HOME}/bootjdk/${BOOT_JDK_FILENAME}" -C "${HOME}/bootjdk/${BOOT_JDK_VERSION}"
mv "${HOME}/bootjdk/${BOOT_JDK_VERSION}/"*/* "${HOME}/bootjdk/${BOOT_JDK_VERSION}/"
if: steps.bootjdk.outputs.cache-hit != 'true'
- name: Restore build JDK
id: build_restore
uses: actions/download-artifact@v2
with:
name: transient_jdk-linux-x64_${{ needs.prerequisites.outputs.bundle_id }}
path: ~/jdk-linux-x64
continue-on-error: true
- name: Restore build JDK (retry)
uses: actions/download-artifact@v2
with:
name: transient_jdk-linux-x64_${{ needs.prerequisites.outputs.bundle_id }}
path: ~/jdk-linux-x64
if: steps.build_restore.outcome == 'failure'
- name: Unpack build JDK
run: |
mkdir -p "${HOME}/jdk-linux-x64/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin"
tar -xf "${HOME}/jdk-linux-x64/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin.tar.gz" -C "${HOME}/jdk-linux-x64/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin"
- name: Find root of build JDK image dir
run: |
build_jdk_root=`find ${HOME}/jdk-linux-x64/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin -name release -type f`
echo "build_jdk_root=`dirname ${build_jdk_root}`" >> $GITHUB_ENV
- name: Update apt
run: sudo apt-get update
- name: Install native host dependencies
run: |
sudo apt-get install gcc-10=10.3.0-1ubuntu1~20.04 g++-10=10.3.0-1ubuntu1~20.04 libxrandr-dev libxtst-dev libcups2-dev libasound2-dev
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10
if: matrix.debian-arch == ''
- name: Install cross-compilation host dependencies
run: sudo apt-get install gcc-10-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-flavor}}=10.3.0-1ubuntu1~20.04cross1 g++-10-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-flavor}}=10.3.0-1ubuntu1~20.04cross1
if: matrix.debian-arch != ''
- name: Cache sysroot
id: cache-sysroot
uses: actions/cache@v2
with:
path: ~/sysroot-${{ matrix.debian-arch }}/
key: sysroot-${{ matrix.debian-arch }}-${{ hashFiles('jdk/.github/workflows/submit.yml') }}
if: matrix.debian-arch != ''
- name: Install sysroot host dependencies
run: sudo apt-get install debootstrap qemu-user-static
if: matrix.debian-arch != '' && steps.cache-sysroot.outputs.cache-hit != 'true'
- name: Create sysroot
run: >
sudo qemu-debootstrap
--arch=${{ matrix.debian-arch }}
--verbose
--include=fakeroot,symlinks,build-essential,libx11-dev,libxext-dev,libxrender-dev,libxrandr-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype6-dev,libpng-dev
--resolve-deps
buster
~/sysroot-${{ matrix.debian-arch }}
http://httpredir.debian.org/debian/
if: matrix.debian-arch != '' && steps.cache-sysroot.outputs.cache-hit != 'true'
- name: Prepare sysroot for caching
run: |
sudo chroot ~/sysroot-${{ matrix.debian-arch }} symlinks -cr .
sudo chown ${USER} -R ~/sysroot-${{ matrix.debian-arch }}
rm -rf ~/sysroot-${{ matrix.debian-arch }}/{dev,proc,run,sys}
if: matrix.debian-arch != '' && steps.cache-sysroot.outputs.cache-hit != 'true'
- name: Configure cross compiler
run: |
echo "CC=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-flavor}}-gcc-10" >> $GITHUB_ENV
echo "CXX=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-flavor}}-g++-10" >> $GITHUB_ENV
if: matrix.debian-arch != ''
- name: Configure cross specific flags
run: >
echo "cross_flags=
--openjdk-target=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-flavor}}
--with-sysroot=${HOME}/sysroot-${{ matrix.debian-arch }}/
" >> $GITHUB_ENV
if: matrix.debian-arch != ''
- name: Configure
run: >
bash configure
--with-conf-name=linux-${{ matrix.gnu-arch }}-hotspot
${{ matrix.flags }}
${{ env.cross_flags }}
--with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
--with-version-build=0
--with-boot-jdk=${HOME}/bootjdk/${BOOT_JDK_VERSION}
--with-build-jdk=${{ env.build_jdk_root }}
--with-default-make-target="hotspot"
--with-zlib=system
working-directory: jdk
- name: Build
run: make CONF_NAME=linux-${{ matrix.gnu-arch }}-hotspot
working-directory: jdk
linux_x86_build:
name: Linux x86
runs-on: "ubuntu-20.04"
needs: prerequisites
if: needs.prerequisites.outputs.should_run != 'false' && needs.prerequisites.outputs.platform_linux_x86 != 'false'
strategy:
fail-fast: false
matrix:
flavor:
- build release
- build debug
include:
- flavor: build debug
flags: --enable-debug
artifact: -debug
# Reduced 32-bit build uses the same boot JDK as 64-bit build
env:
JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).DEFAULT_VERSION_FEATURE }}"
BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}"
BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_FILENAME }}"
BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_URL }}"
BOOT_JDK_SHA256: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_SHA256 }}"
steps:
- name: Checkout the source
uses: actions/checkout@v2
with:
path: jdk
- name: Restore boot JDK from cache
id: bootjdk
uses: actions/cache@v2
with:
path: ~/bootjdk/${{ env.BOOT_JDK_VERSION }}
key: bootjdk-${{ runner.os }}-${{ env.BOOT_JDK_VERSION }}-${{ env.BOOT_JDK_SHA256 }}-v1
- name: Download boot JDK
run: |
mkdir -p "${HOME}/bootjdk/${BOOT_JDK_VERSION}"
wget -O "${HOME}/bootjdk/${BOOT_JDK_FILENAME}" "${BOOT_JDK_URL}"
echo "${BOOT_JDK_SHA256} ${HOME}/bootjdk/${BOOT_JDK_FILENAME}" | sha256sum -c >/dev/null -
tar -xf "${HOME}/bootjdk/${BOOT_JDK_FILENAME}" -C "${HOME}/bootjdk/${BOOT_JDK_VERSION}"
mv "${HOME}/bootjdk/${BOOT_JDK_VERSION}/"*/* "${HOME}/bootjdk/${BOOT_JDK_VERSION}/"
if: steps.bootjdk.outputs.cache-hit != 'true'
- name: Restore jtreg artifact
id: jtreg_restore
uses: actions/download-artifact@v2
with:
name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }}
path: ~/jtreg/
continue-on-error: true
- name: Restore jtreg artifact (retry)
uses: actions/download-artifact@v2
with:
name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }}
path: ~/jtreg/
if: steps.jtreg_restore.outcome == 'failure'
- name: Checkout gtest sources
uses: actions/checkout@v2
with:
repository: "google/googletest"
ref: "release-${{ fromJson(needs.prerequisites.outputs.dependencies).GTEST_VERSION }}"
path: gtest
# Roll in the multilib environment and its dependencies.
# Some multilib libraries do not have proper inter-dependencies, so we have to
# install their dependencies manually. Additionally, upgrading apt solves
# the libc6 installation bugs until base image catches up, see JDK-8260460.
- name: Install dependencies
run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install --only-upgrade apt
sudo apt-get install gcc-10-multilib g++-10-multilib libfreetype6-dev:i386 libxrandr-dev:i386 libxtst-dev:i386 libtiff-dev:i386 libcupsimage2-dev:i386 libcups2-dev:i386 libasound2-dev:i386
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10
- name: Configure
run: >
bash configure
--with-conf-name=linux-x86
--with-target-bits=32
${{ matrix.flags }}
--with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
--with-version-build=0
--with-boot-jdk=${HOME}/bootjdk/${BOOT_JDK_VERSION}
--with-jtreg=${HOME}/jtreg
--with-gtest=${GITHUB_WORKSPACE}/gtest
--with-default-make-target="product-bundles test-bundles"
--with-zlib=system
--enable-jtreg-failure-handler
working-directory: jdk
- name: Build
run: make CONF_NAME=linux-x86
working-directory: jdk
- name: Persist test bundles
uses: actions/upload-artifact@v2
with:
name: transient_jdk-linux-x86${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }}
path: |
jdk/build/linux-x86/bundles/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x86_bin${{ matrix.artifact }}.tar.gz
jdk/build/linux-x86/bundles/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x86_bin-tests${{ matrix.artifact }}.tar.gz
linux_x86_test:
name: Linux x86
runs-on: "ubuntu-20.04"
needs:
- prerequisites
- linux_x86_build
strategy:
fail-fast: false
matrix:
test:
- jdk/tier1 part 1
- jdk/tier1 part 2
- jdk/tier1 part 3
- langtools/tier1
- hs/tier1 common
- hs/tier1 compiler
- hs/tier1 gc
- hs/tier1 runtime
- hs/tier1 serviceability
include:
- test: jdk/tier1 part 1
suites: test/jdk/:tier1_part1
- test: jdk/tier1 part 2
suites: test/jdk/:tier1_part2
- test: jdk/tier1 part 3
suites: test/jdk/:tier1_part3
- test: langtools/tier1
suites: test/langtools/:tier1
- test: hs/tier1 common
suites: test/hotspot/jtreg/:tier1_common
artifact: -debug
- test: hs/tier1 compiler
suites: test/hotspot/jtreg/:tier1_compiler
artifact: -debug
- test: hs/tier1 gc
suites: test/hotspot/jtreg/:tier1_gc
artifact: -debug
- test: hs/tier1 runtime
suites: test/hotspot/jtreg/:tier1_runtime
artifact: -debug
- test: hs/tier1 serviceability
suites: test/hotspot/jtreg/:tier1_serviceability
artifact: -debug
# Reduced 32-bit build uses the same boot JDK as 64-bit build
env:
JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).DEFAULT_VERSION_FEATURE }}"
BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}"
BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_FILENAME }}"
BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_URL }}"
BOOT_JDK_SHA256: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_SHA256 }}"
steps:
- name: Checkout the source
uses: actions/checkout@v2
- name: Restore boot JDK from cache
id: bootjdk
uses: actions/cache@v2
with:
path: ~/bootjdk/${{ env.BOOT_JDK_VERSION }}
key: bootjdk-${{ runner.os }}-${{ env.BOOT_JDK_VERSION }}-${{ env.BOOT_JDK_SHA256 }}-v1
- name: Download boot JDK
run: |
mkdir -p "${HOME}/bootjdk/${BOOT_JDK_VERSION}"
wget -O "${HOME}/bootjdk/${BOOT_JDK_FILENAME}" "${BOOT_JDK_URL}"
echo "${BOOT_JDK_SHA256} ${HOME}/bootjdk/${BOOT_JDK_FILENAME}" | sha256sum -c >/dev/null -
tar -xf "${HOME}/bootjdk/${BOOT_JDK_FILENAME}" -C "${HOME}/bootjdk/${BOOT_JDK_VERSION}"
mv "${HOME}/bootjdk/${BOOT_JDK_VERSION}/"*/* "${HOME}/bootjdk/${BOOT_JDK_VERSION}/"
if: steps.bootjdk.outputs.cache-hit != 'true'
- name: Restore jtreg artifact
id: jtreg_restore
uses: actions/download-artifact@v2
with:
name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }}
path: ~/jtreg/
continue-on-error: true
- name: Restore jtreg artifact (retry)
uses: actions/download-artifact@v2
with:
name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }}
path: ~/jtreg/
if: steps.jtreg_restore.outcome == 'failure'
- name: Restore build artifacts
id: build_restore
uses: actions/download-artifact@v2
with:
name: transient_jdk-linux-x86${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }}
path: ~/jdk-linux-x86${{ matrix.artifact }}
continue-on-error: true
- name: Restore build artifacts (retry)
uses: actions/download-artifact@v2
with:
name: transient_jdk-linux-x86${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }}
path: ~/jdk-linux-x86${{ matrix.artifact }}
if: steps.build_restore.outcome == 'failure'
- name: Unpack jdk
run: |
mkdir -p "${HOME}/jdk-linux-x86${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x86_bin${{ matrix.artifact }}"
tar -xf "${HOME}/jdk-linux-x86${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x86_bin${{ matrix.artifact }}.tar.gz" -C "${HOME}/jdk-linux-x86${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x86_bin${{ matrix.artifact }}"
- name: Unpack tests
run: |
mkdir -p "${HOME}/jdk-linux-x86${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x86_bin-tests${{ matrix.artifact }}"
tar -xf "${HOME}/jdk-linux-x86${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x86_bin-tests${{ matrix.artifact }}.tar.gz" -C "${HOME}/jdk-linux-x86${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x86_bin-tests${{ matrix.artifact }}"
- name: Find root of jdk image dir
run: |
imageroot=`find ${HOME}/jdk-linux-x86${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x86_bin${{ matrix.artifact }} -name release -type f`
echo "imageroot=`dirname ${imageroot}`" >> $GITHUB_ENV
- name: Run tests
run: >
JDK_IMAGE_DIR=${{ env.imageroot }}
TEST_IMAGE_DIR=${HOME}/jdk-linux-x86${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x86_bin-tests${{ matrix.artifact }}
BOOT_JDK=${HOME}/bootjdk/${BOOT_JDK_VERSION}
JT_HOME=${HOME}/jtreg
make test-prebuilt
CONF_NAME=run-test-prebuilt
LOG_CMDLINES=true
JTREG_VERBOSE=fail,error,time
TEST="${{ matrix.suites }}"
TEST_OPTS_JAVA_OPTIONS=
JTREG_KEYWORDS="!headful"
JTREG="JAVA_OPTIONS=-XX:-CreateCoredumpOnCrash"
- name: Check that all tests executed successfully
if: always()
run: >
if ! grep --include=test-summary.txt -lqr build/*/test-results -e "TEST SUCCESS" ; then
cat build/*/test-results/*/text/newfailures.txt ;
exit 1 ;
fi
- name: Create suitable test log artifact name
if: always()
run: echo "logsuffix=`echo ${{ matrix.test }} | sed -e 's!/!_!'g -e 's! !_!'g`" >> $GITHUB_ENV
- name: Package test results
if: always()
working-directory: build/run-test-prebuilt/test-results/
run: >
zip -r9
"$HOME/linux-x86${{ matrix.artifact }}_testresults_${{ env.logsuffix }}.zip"
.
continue-on-error: true
- name: Package test support
if: always()
working-directory: build/run-test-prebuilt/test-support/
run: >
zip -r9
"$HOME/linux-x86${{ matrix.artifact }}_testsupport_${{ env.logsuffix }}.zip"
.
-i *.jtr
-i */hs_err*.log
-i */replay*.log
continue-on-error: true
- name: Persist test results
if: always()
uses: actions/upload-artifact@v2
with:
path: ~/linux-x86${{ matrix.artifact }}_testresults_${{ env.logsuffix }}.zip
continue-on-error: true
- name: Persist test outputs
if: always()
uses: actions/upload-artifact@v2
with:
path: ~/linux-x86${{ matrix.artifact }}_testsupport_${{ env.logsuffix }}.zip
continue-on-error: true
windows_aarch64_build:
name: Windows aarch64
runs-on: "windows-2019"
needs: prerequisites
if: needs.prerequisites.outputs.should_run != 'false' && needs.prerequisites.outputs.platform_windows_aarch64 != 'false'
strategy:
fail-fast: false
matrix:
flavor:
- build debug
include:
- flavor: build debug
flags: --enable-debug
artifact: -debug
env:
JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).DEFAULT_VERSION_FEATURE }}"
BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}"
BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).WINDOWS_X64_BOOT_JDK_FILENAME }}"
BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).WINDOWS_X64_BOOT_JDK_URL }}"
BOOT_JDK_SHA256: "${{ fromJson(needs.prerequisites.outputs.dependencies).WINDOWS_X64_BOOT_JDK_SHA256 }}"
steps:
- name: Restore cygwin packages from cache
id: cygwin
uses: actions/cache@v2
with:
path: ~/cygwin/packages
key: cygwin-packages-${{ runner.os }}-v1
- name: Install cygwin
run: |
New-Item -Force -ItemType directory -Path "$HOME\cygwin"
& curl -L "https://www.cygwin.com/setup-x86_64.exe" -o "$HOME/cygwin/setup-x86_64.exe"
Start-Process -FilePath "$HOME\cygwin\setup-x86_64.exe" -ArgumentList "--quiet-mode --packages autoconf,make,zip,unzip --root $HOME\cygwin\cygwin64 --local-package-dir $HOME\cygwin\packages --site http://mirrors.kernel.org/sourceware/cygwin --no-desktop --no-shortcuts --no-startmenu --no-admin" -Wait -NoNewWindow
- name: Checkout the source
uses: actions/checkout@v2
with:
path: jdk
- name: Restore boot JDK from cache
id: bootjdk
uses: actions/cache@v2
with:
path: ~/bootjdk/${{ env.BOOT_JDK_VERSION }}
key: bootjdk-${{ runner.os }}-${{ env.BOOT_JDK_VERSION }}-${{ env.BOOT_JDK_SHA256 }}-v1
- name: Download boot JDK
run: |
mkdir -p "$HOME\bootjdk\$env:BOOT_JDK_VERSION"
& curl -L "$env:BOOT_JDK_URL" -o "$HOME/bootjdk/$env:BOOT_JDK_FILENAME"
$FileHash = Get-FileHash -Algorithm SHA256 "$HOME/bootjdk/$env:BOOT_JDK_FILENAME"
$FileHash.Hash -eq $env:BOOT_JDK_SHA256
& tar -xf "$HOME/bootjdk/$env:BOOT_JDK_FILENAME" -C "$HOME/bootjdk/$env:BOOT_JDK_VERSION"
Get-ChildItem "$HOME\bootjdk\$env:BOOT_JDK_VERSION\*\*" | Move-Item -Destination "$HOME\bootjdk\$env:BOOT_JDK_VERSION"
if: steps.bootjdk.outputs.cache-hit != 'true'
- name: Ensure a specific version of MSVC is installed
run: >
Start-Process -FilePath 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe' -Wait -NoNewWindow -ArgumentList
'modify --installPath "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise" --quiet
--add Microsoft.VisualStudio.Component.VC.14.29.arm64'
- name: Configure
run: >
$env:Path = "$HOME\cygwin\cygwin64\bin;$HOME\cygwin\cygwin64\bin;$env:Path" ;
$env:Path = $env:Path -split ";" -match "C:\\Windows|PowerShell|cygwin" -join ";" ;
$env:BOOT_JDK = cygpath "$HOME/bootjdk/$env:BOOT_JDK_VERSION" ;
& bash configure
--with-conf-name=windows-aarch64
--with-msvc-toolset-version=14.29
--openjdk-target=aarch64-unknown-cygwin
${{ matrix.flags }}
--with-version-opt="$env:GITHUB_ACTOR-$env:GITHUB_SHA"
--with-version-build=0
--with-boot-jdk="$env:BOOT_JDK"
--with-default-make-target="hotspot"
working-directory: jdk
- name: Build
run: |
$env:Path = "$HOME\cygwin\cygwin64\bin;$HOME\cygwin\cygwin64\bin;$env:Path" ;
$env:Path = $env:Path -split ";" -match "C:\\Windows|PowerShell|cygwin" -join ";" ;
& make CONF_NAME=windows-aarch64
working-directory: jdk
windows_x64_build:
name: Windows x64
runs-on: "windows-2019"
needs: prerequisites
if: needs.prerequisites.outputs.should_run != 'false' && needs.prerequisites.outputs.platform_windows_x64 != 'false'
strategy:
fail-fast: false
matrix:
flavor:
- build release
- build debug
include:
- flavor: build debug
flags: --enable-debug
artifact: -debug
env:
JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).DEFAULT_VERSION_FEATURE }}"
BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}"
BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).WINDOWS_X64_BOOT_JDK_FILENAME }}"
BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).WINDOWS_X64_BOOT_JDK_URL }}"
BOOT_JDK_SHA256: "${{ fromJson(needs.prerequisites.outputs.dependencies).WINDOWS_X64_BOOT_JDK_SHA256 }}"
steps:
- name: Restore cygwin packages from cache
id: cygwin
uses: actions/cache@v2
with:
path: ~/cygwin/packages
key: cygwin-packages-${{ runner.os }}-v1
- name: Install cygwin
run: |
New-Item -Force -ItemType directory -Path "$HOME\cygwin"
& curl -L "https://www.cygwin.com/setup-x86_64.exe" -o "$HOME/cygwin/setup-x86_64.exe"
Start-Process -FilePath "$HOME\cygwin\setup-x86_64.exe" -ArgumentList "--quiet-mode --packages autoconf,make,zip,unzip --root $HOME\cygwin\cygwin64 --local-package-dir $HOME\cygwin\packages --site http://mirrors.kernel.org/sourceware/cygwin --no-desktop --no-shortcuts --no-startmenu --no-admin" -Wait -NoNewWindow
- name: Checkout the source
uses: actions/checkout@v2
with:
path: jdk
- name: Restore boot JDK from cache
id: bootjdk
uses: actions/cache@v2
with:
path: ~/bootjdk/${{ env.BOOT_JDK_VERSION }}
key: bootjdk-${{ runner.os }}-${{ env.BOOT_JDK_VERSION }}-${{ env.BOOT_JDK_SHA256 }}-v1
- name: Download boot JDK
run: |
mkdir -p "$HOME\bootjdk\$env:BOOT_JDK_VERSION"
& curl -L "$env:BOOT_JDK_URL" -o "$HOME/bootjdk/$env:BOOT_JDK_FILENAME"
$FileHash = Get-FileHash -Algorithm SHA256 "$HOME/bootjdk/$env:BOOT_JDK_FILENAME"
$FileHash.Hash -eq $env:BOOT_JDK_SHA256
& tar -xf "$HOME/bootjdk/$env:BOOT_JDK_FILENAME" -C "$HOME/bootjdk/$env:BOOT_JDK_VERSION"
Get-ChildItem "$HOME\bootjdk\$env:BOOT_JDK_VERSION\*\*" | Move-Item -Destination "$HOME\bootjdk\$env:BOOT_JDK_VERSION"
if: steps.bootjdk.outputs.cache-hit != 'true'
- name: Checkout gtest sources