Skip to content

Commit

Permalink
rewrite dragonwell11 ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Accelerator1996 committed Mar 5, 2024
1 parent 0d5b44a commit 70c5667
Show file tree
Hide file tree
Showing 4 changed files with 300 additions and 290 deletions.
173 changes: 106 additions & 67 deletions .github/workflows/check_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,91 +19,130 @@
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#

name: Dragonwell_11_build_test
name: Prerequisites

on: [pull_request]
on:
workflow_call:
inputs:
platforms:
required: true
type: string

jobs:
check_commit:
name: 'Check Commit Message'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dragonwell-releng/check_commit_action@master

build_release_amd64_jdk:
prerequisites:
name: 'Prerequisites'
runs-on: ubuntu-latest
container:
image: docker.io/alibabadragonwelljdk/build_jdk:11-latest
outputs:
should_run: ${{ steps.check_submit.outputs.should_run }}
bundle_id: ${{ steps.check_bundle_id.outputs.bundle_id }}
jdk_version: ${{ steps.check_jdk_versions.outputs.jdk_version }}
platform_linux_x64: ${{ steps.check_platforms.outputs.platform_linux_x64 }}
platform_linux_aarch64: ${{ steps.check_platforms.outputs.platform_linux_aarch64 }}
platform_windows_x64: ${{ steps.check_platforms.outputs.platform_windows_x64 }}
dependencies: ${{ steps.check_deps.outputs.dependencies }}

steps:
- uses: actions/checkout@v2
- name: Compile release mode on amd64
run: |
chmod 755 configure
bash make.sh release
- 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: Sanity test
- name: 'Check which platforms should be included'
id: check_platforms
run: |
TEST_JDK_HOME=build/linux-x86_64-normal-server-release/images/jdk
${TEST_JDK_HOME}/bin/java -version
echo "::set-output name=platform_linux_x64::${{ contains(github.event.inputs.platforms, 'linux x64') || (github.event.inputs.platforms == '') }}"
echo "::set-output name=platform_linux_aarch64::${{ contains(github.event.inputs.platforms, 'linux aarch64') || (github.event.inputs.platforms == '') }}"
echo "::set-output name=platform_windows_x64::${{ contains(github.event.inputs.platforms, 'windows x64') || (github.event.inputs.platforms == '') }}"
if: steps.check_submit.outputs.should_run != 'false'

build_release_arm64_jdk:
runs-on: [self-hosted , ARM64]
container:
image: docker.io/alibabadragonwelljdk/build_jdk:11-latest
steps:
- uses: actions/checkout@v2
- name: Compile release mode on arm64
run: |
chmod 755 configure
bash make.sh release
- 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: Sanity test
run: |
TEST_JDK_HOME=build/linux-aarch64-normal-server-release/images/jdk
${TEST_JDK_HOME}/bin/java -version
- name: 'Checkout the source'
uses: actions/checkout@v3
with:
path: jdk
if: steps.check_submit.outputs.should_run != 'false'

build_fastdebug_amd64_jdk:
runs-on: ubuntu-latest
container:
image: docker.io/alibabadragonwelljdk/build_jdk:11-latest
steps:
- uses: actions/checkout@v2
- name: Compile slowdebug mode
run: |
chmod 755 configure
bash make.sh fastdebug
- name: 'Determine versions and locations to be used for dependencies'
id: check_deps
run: "echo ::set-output name=dependencies::`cat make/autoconf/version-numbers 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: Sanity test
run: |
TEST_JDK_HOME=build/linux-x86_64-normal-server-fastdebug/images/jdk
${TEST_JDK_HOME}/bin/java -version
- name: 'Print extracted dependencies to the log'
run: "echo '${{ steps.check_deps.outputs.dependencies }}'"
if: steps.check_submit.outputs.should_run != 'false'

build_slowdebug_amd64_jdk:
runs-on: ubuntu-latest
container:
image: docker.io/alibabadragonwelljdk/build_jdk:11-latest
steps:
- uses: actions/checkout@v2
- name: Compile slowdebug mode
- name: 'Determine full JDK versions'
id: check_jdk_versions
shell: bash
run: |
chmod 755 configure
bash make.sh debug
FEATURE=${{ fromJson(steps.check_deps.outputs.dependencies).DEFAULT_VERSION_FEATURE }}
INTERIM=${{ fromJson(steps.check_deps.outputs.dependencies).DEFAULT_VERSION_INTERIM }}
UPDATE=${{ fromJson(steps.check_deps.outputs.dependencies).DEFAULT_VERSION_UPDATE }}
PATCH=${{ fromJson(steps.check_deps.outputs.dependencies).DEFAULT_VERSION_PATCH }}
if [ "x${PATCH}" != "x0" ]; then
V=${FEATURE}.${INTERIM}.${UPDATE}.${PATCH}
elif [ "x${UPDATE}" != "x0" ]; then
V=${FEATURE}.${INTERIM}.${UPDATE}
elif [ "x${INTERIM}" != "x0" ]; then
V={FEATURE}.${INTERIM}
else
V=${FEATURE}
fi
echo "::set-output name=jdk_version::${V}"
if: steps.check_submit.outputs.should_run != 'false'

- name: Sanity test
run: |
TEST_JDK_HOME=build/linux-x86_64-normal-server-slowdebug/images/jdk
${TEST_JDK_HOME}/bin/java -version
- name: 'Determine the jtreg ref to checkout'
run: "echo JTREG_REF=jtreg-${{ fromJson(steps.check_deps.outputs.dependencies).JTREG_VERSION }} >> $GITHUB_ENV"
if: steps.check_submit.outputs.should_run != 'false'

build_release_riscv_jdk:
runs-on: [self-hosted , X64]
container:
image: docker.io/alibabadragonwelljdk/centos7_gcc7_build_image:latest
steps:
- uses: actions/checkout@v2
- name: Compile release mode riscv jdk
run: |
chmod 755 configure
LD_LIBRARY_PATH=/opt/riscv_toolchain_linux/lib64 \
PATH=/opt/riscv_toolchain_linux/bin:/usr/local/gcc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
bash configure --verbose --with-vendor-name=Alibaba --with-vendor-url=http://www.alibabagroup.com --with-vendor-bug-url='mailto:[email protected]' --with-vendor-vm-bug-url='mailto:[email protected]' --with-vendor-name=Alibaba --with-vendor-url=http://www.alibabagroup.com --with-vendor-bug-url='mailto:[email protected]' --with-vendor-vm-bug-url='mailto:[email protected]' --without-version-opt --without-version-pre --with-version-build=9 --with-version-patch=14 --with-boot-jdk=/usr/lib/jvm/jdk-10 --with-debug-level=release --with-native-debug-symbols=external --with-jvm-variants=server --disable-warnings-as-errors --openjdk-target=riscv64-unknown-linux-gnu --with-sysroot=/opt/fedora28_riscv_root -with-boot-jdk=/usr/lib/jvm/jdk-10 --openjdk-target=riscv64-unknown-linux-gnu --with-sysroot=/opt/fedora28_riscv_root
make images
- name: 'Determine the jtreg version to build'
run: echo "BUILD_VERSION=${{ fromJson(steps.check_deps.outputs.dependencies).JTREG_VERSION }}" >> $GITHUB_ENV
if: steps.check_submit.outputs.should_run != 'false'

- name: 'Determine the jtreg build number to build'
run: echo "BUILD_NUMBER=${{ 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@v3
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@v3
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@v3
with:
name: transient_jtreg_${{ steps.check_bundle_id.outputs.bundle_id }}
path: ~/jtreg/
if: steps.check_submit.outputs.should_run != 'false'
109 changes: 109 additions & 0 deletions .github/workflows/check_pr.yml.bak
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
#
# Copyright (c) 2019 Alibaba Group Holding Limited. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Alibaba designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#

name: Dragonwell_11_build_test

on: [pull_request]

jobs:
check_commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dragonwell-releng/check_commit_action@master

build_release_amd64_jdk:
runs-on: ubuntu-latest
container:
image: docker.io/alibabadragonwelljdk/build_jdk:11-latest
steps:
- uses: actions/checkout@v2
- name: Compile release mode on amd64
run: |
chmod 755 configure
bash make.sh release

- name: Sanity test
run: |
TEST_JDK_HOME=build/linux-x86_64-normal-server-release/images/jdk
${TEST_JDK_HOME}/bin/java -version

build_release_arm64_jdk:
runs-on: [self-hosted , ARM64]
container:
image: docker.io/alibabadragonwelljdk/build_jdk:11-latest
steps:
- uses: actions/checkout@v2
- name: Compile release mode on arm64
run: |
chmod 755 configure
bash make.sh release

- name: Sanity test
run: |
TEST_JDK_HOME=build/linux-aarch64-normal-server-release/images/jdk
${TEST_JDK_HOME}/bin/java -version

build_fastdebug_amd64_jdk:
runs-on: ubuntu-latest
container:
image: docker.io/alibabadragonwelljdk/build_jdk:11-latest
steps:
- uses: actions/checkout@v2
- name: Compile slowdebug mode
run: |
chmod 755 configure
bash make.sh fastdebug

- name: Sanity test
run: |
TEST_JDK_HOME=build/linux-x86_64-normal-server-fastdebug/images/jdk
${TEST_JDK_HOME}/bin/java -version

build_slowdebug_amd64_jdk:
runs-on: ubuntu-latest
container:
image: docker.io/alibabadragonwelljdk/build_jdk:11-latest
steps:
- uses: actions/checkout@v2
- name: Compile slowdebug mode
run: |
chmod 755 configure
bash make.sh debug

- name: Sanity test
run: |
TEST_JDK_HOME=build/linux-x86_64-normal-server-slowdebug/images/jdk
${TEST_JDK_HOME}/bin/java -version

build_release_riscv_jdk:
runs-on: [self-hosted , X64]
container:
image: docker.io/alibabadragonwelljdk/centos7_gcc7_build_image:latest
steps:
- uses: actions/checkout@v2
- name: Compile release mode riscv jdk
run: |
chmod 755 configure
LD_LIBRARY_PATH=/opt/riscv_toolchain_linux/lib64 \
PATH=/opt/riscv_toolchain_linux/bin:/usr/local/gcc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
bash configure --verbose --with-vendor-name=Alibaba --with-vendor-url=http://www.alibabagroup.com --with-vendor-bug-url='mailto:[email protected]' --with-vendor-vm-bug-url='mailto:[email protected]' --with-vendor-name=Alibaba --with-vendor-url=http://www.alibabagroup.com --with-vendor-bug-url='mailto:[email protected]' --with-vendor-vm-bug-url='mailto:[email protected]' --without-version-opt --without-version-pre --with-version-build=9 --with-version-patch=14 --with-boot-jdk=/usr/lib/jvm/jdk-10 --with-debug-level=release --with-native-debug-symbols=external --with-jvm-variants=server --disable-warnings-as-errors --openjdk-target=riscv64-unknown-linux-gnu --with-sysroot=/opt/fedora28_riscv_root -with-boot-jdk=/usr/lib/jvm/jdk-10 --openjdk-target=riscv64-unknown-linux-gnu --with-sysroot=/opt/fedora28_riscv_root
make images
Loading

0 comments on commit 70c5667

Please sign in to comment.