44 push :
55 branches-ignore :
66 - master
7+ - pr/*
78 workflow_dispatch :
89 inputs :
910 platforms :
2425 platform_windows_aarch64 : ${{ steps.check_platforms.outputs.platform_windows_aarch64 }}
2526 platform_windows_x64 : ${{ steps.check_platforms.outputs.platform_windows_x64 }}
2627 platform_macos_x64 : ${{ steps.check_platforms.outputs.platform_macos_x64 }}
28+ platform_macos_aarch64 : ${{ steps.check_platforms.outputs.platform_macos_aarch64 }}
2729 dependencies : ${{ steps.check_deps.outputs.dependencies }}
2830
2931 steps :
4042 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'))) }}"
4143 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'))) }}"
4244 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'))) }}"
45+ 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'))) }}"
4346 if : steps.check_submit.outputs.should_run != 'false'
4447
4548 - name : Determine unique bundle identifier
@@ -536,10 +539,6 @@ jobs:
536539 echo "cross_flags=
537540 --openjdk-target=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-flavor}}
538541 --with-sysroot=${HOME}/sysroot-${{ matrix.debian-arch }}/
539- --with-toolchain-path=${HOME}/sysroot-${{ matrix.debian-arch }}/
540- --with-freetype-lib=${HOME}/sysroot-${{ matrix.debian-arch }}/usr/lib/${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-flavor}}/
541- --with-freetype-include=${HOME}/sysroot-${{ matrix.debian-arch }}/usr/include/freetype2/
542- --x-libraries=${HOME}/sysroot-${{ matrix.debian-arch }}/usr/lib/${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-flavor}}/
543542 " >> $GITHUB_ENV
544543 if : matrix.debian-arch != ''
545544
@@ -1362,8 +1361,112 @@ jobs:
13621361 with :
13631362 name : transient_jdk-macos-x64${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }}
13641363 path : |
1365- jdk/build/macos-x64/bundles/jdk-${{ env.JDK_VERSION }}-internal+0_osx-x64_bin${{ matrix.artifact }}.tar.gz
1366- jdk/build/macos-x64/bundles/jdk-${{ env.JDK_VERSION }}-internal+0_osx-x64_bin-tests${{ matrix.artifact }}.tar.gz
1364+ jdk/build/macos-x64/bundles/jdk-${{ env.JDK_VERSION }}-internal+0_macos-x64_bin${{ matrix.artifact }}.tar.gz
1365+ jdk/build/macos-x64/bundles/jdk-${{ env.JDK_VERSION }}-internal+0_macos-x64_bin-tests${{ matrix.artifact }}.tar.gz
1366+
1367+ macos_aarch64_build :
1368+ name : macOS aarch64
1369+ runs-on : " macos-10.15"
1370+ needs : prerequisites
1371+ if : needs.prerequisites.outputs.should_run != 'false' && needs.prerequisites.outputs.platform_macos_aarch64 != 'false'
1372+
1373+ strategy :
1374+ fail-fast : false
1375+ matrix :
1376+ flavor :
1377+ - build release
1378+ - build debug
1379+ include :
1380+ - flavor : build release
1381+ - flavor : build debug
1382+ flags : --enable-debug
1383+ artifact : -debug
1384+
1385+ env :
1386+ JDK_VERSION : " ${{ fromJson(needs.prerequisites.outputs.dependencies).DEFAULT_VERSION_FEATURE }}"
1387+ BOOT_JDK_VERSION : " ${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}"
1388+ BOOT_JDK_FILENAME : " ${{ fromJson(needs.prerequisites.outputs.dependencies).MACOS_X64_BOOT_JDK_FILENAME }}"
1389+ BOOT_JDK_URL : " ${{ fromJson(needs.prerequisites.outputs.dependencies).MACOS_X64_BOOT_JDK_URL }}"
1390+ BOOT_JDK_SHA256 : " ${{ fromJson(needs.prerequisites.outputs.dependencies).MACOS_X64_BOOT_JDK_SHA256 }}"
1391+
1392+ steps :
1393+ - name : Checkout the source
1394+ uses : actions/checkout@v2
1395+ with :
1396+ path : jdk
1397+
1398+ - name : Restore boot JDK from cache
1399+ id : bootjdk
1400+ uses : actions/cache@v2
1401+ with :
1402+ path : ~/bootjdk/${{ env.BOOT_JDK_VERSION }}
1403+ key : bootjdk-${{ runner.os }}-${{ env.BOOT_JDK_VERSION }}-${{ env.BOOT_JDK_SHA256 }}-v1
1404+
1405+ - name : Download boot JDK
1406+ run : |
1407+ mkdir -p ${HOME}/bootjdk/${BOOT_JDK_VERSION} || true
1408+ wget -O "${HOME}/bootjdk/${BOOT_JDK_FILENAME}" "${BOOT_JDK_URL}"
1409+ echo "${BOOT_JDK_SHA256} ${HOME}/bootjdk/${BOOT_JDK_FILENAME}" | shasum -a 256 -c >/dev/null -
1410+ tar -xf "${HOME}/bootjdk/${BOOT_JDK_FILENAME}" -C "${HOME}/bootjdk/${BOOT_JDK_VERSION}"
1411+ mv "${HOME}/bootjdk/${BOOT_JDK_VERSION}/"*/* "${HOME}/bootjdk/${BOOT_JDK_VERSION}/"
1412+ if : steps.bootjdk.outputs.cache-hit != 'true'
1413+
1414+ - name : Restore jtreg artifact
1415+ id : jtreg_restore
1416+ uses : actions/download-artifact@v2
1417+ with :
1418+ name : transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }}
1419+ path : ~/jtreg/
1420+ continue-on-error : true
1421+
1422+ - name : Restore jtreg artifact (retry)
1423+ uses : actions/download-artifact@v2
1424+ with :
1425+ name : transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }}
1426+ path : ~/jtreg/
1427+ if : steps.jtreg_restore.outcome == 'failure'
1428+
1429+ - name : Checkout gtest sources
1430+ uses : actions/checkout@v2
1431+ with :
1432+ repository : " google/googletest"
1433+ ref : " release-${{ fromJson(needs.prerequisites.outputs.dependencies).GTEST_VERSION }}"
1434+ path : gtest
1435+
1436+ - name : Install dependencies
1437+ run : brew install make
1438+
1439+ - name : Select Xcode version
1440+ run : sudo xcode-select --switch /Applications/Xcode_12.4.app/Contents/Developer
1441+
1442+ - name : Configure
1443+ run : >
1444+ bash configure
1445+ --with-conf-name=macos-aarch64
1446+ --openjdk-target=aarch64-apple-darwin
1447+ ${{ matrix.flags }}
1448+ --with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
1449+ --with-version-build=0
1450+ --with-boot-jdk=${HOME}/bootjdk/${BOOT_JDK_VERSION}/Contents/Home
1451+ --with-jtreg=${HOME}/jtreg
1452+ --with-gtest=${GITHUB_WORKSPACE}/gtest
1453+ --with-default-make-target="product-bundles test-bundles"
1454+ --with-zlib=system
1455+ --enable-jtreg-failure-handler
1456+ working-directory : jdk
1457+
1458+ - name : Build
1459+ run : make CONF_NAME=macos-aarch64
1460+ working-directory : jdk
1461+
1462+ - name : Persist test bundles
1463+ uses : actions/upload-artifact@v2
1464+ with :
1465+ name : transient_jdk-macos-aarch64${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }}
1466+ path : |
1467+ jdk/build/macos-aarch64/bundles/jdk-${{ env.JDK_VERSION }}-internal+0_macos-aarch64_bin${{ matrix.artifact }}.tar.gz
1468+ jdk/build/macos-aarch64/bundles/jdk-${{ env.JDK_VERSION }}-internal+0_macos-aarch64_bin-tests${{ matrix.artifact }}.tar.gz
1469+
13671470
13681471 macos_x64_test :
13691472 name : macOS x64
@@ -1469,13 +1572,13 @@ jobs:
14691572
14701573 - name : Unpack jdk
14711574 run : |
1472- mkdir -p "${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_osx -x64_bin${{ matrix.artifact }}"
1473- tar -xf "${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_osx -x64_bin${{ matrix.artifact }}.tar.gz" -C "${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_osx -x64_bin${{ matrix.artifact }}"
1575+ mkdir -p "${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_macos -x64_bin${{ matrix.artifact }}"
1576+ tar -xf "${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_macos -x64_bin${{ matrix.artifact }}.tar.gz" -C "${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_macos -x64_bin${{ matrix.artifact }}"
14741577
14751578 - name : Unpack tests
14761579 run : |
1477- mkdir -p "${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_osx -x64_bin-tests${{ matrix.artifact }}"
1478- tar -xf "${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_osx -x64_bin-tests${{ matrix.artifact }}.tar.gz" -C "${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_osx -x64_bin-tests${{ matrix.artifact }}"
1580+ mkdir -p "${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_macos -x64_bin-tests${{ matrix.artifact }}"
1581+ tar -xf "${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_macos -x64_bin-tests${{ matrix.artifact }}.tar.gz" -C "${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_macos -x64_bin-tests${{ matrix.artifact }}"
14791582
14801583 - name : Install dependencies
14811584 run : brew install make
@@ -1485,13 +1588,13 @@ jobs:
14851588
14861589 - name : Find root of jdk image dir
14871590 run : |
1488- imageroot=`find ${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_osx -x64_bin${{ matrix.artifact }} -name release -type f`
1591+ imageroot=`find ${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_macos -x64_bin${{ matrix.artifact }} -name release -type f`
14891592 echo "imageroot=`dirname ${imageroot}`" >> $GITHUB_ENV
14901593
14911594 - name : Run tests
14921595 run : >
14931596 JDK_IMAGE_DIR=${{ env.imageroot }}
1494- TEST_IMAGE_DIR=${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_osx -x64_bin-tests${{ matrix.artifact }}
1597+ TEST_IMAGE_DIR=${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_macos -x64_bin-tests${{ matrix.artifact }}
14951598 BOOT_JDK=${HOME}/bootjdk/${BOOT_JDK_VERSION}/Contents/Home
14961599 JT_HOME=${HOME}/jtreg
14971600 gmake test-prebuilt
@@ -1563,6 +1666,7 @@ jobs:
15631666 - linux_x86_test
15641667 - windows_x64_test
15651668 - macos_x64_test
1669+ - macos_aarch64_build
15661670
15671671 steps :
15681672 - name : Determine current artifacts endpoint
0 commit comments