Skip to content

Commit

Permalink
add smoketest
Browse files Browse the repository at this point in the history
Signed-off-by: Sophia Guo <[email protected]>
  • Loading branch information
sophia-guo committed Jun 11, 2021
1 parent 8d1b2a0 commit d0a6f7a
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 150 deletions.
183 changes: 33 additions & 150 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,9 @@ jobs:
strategy:
matrix:
os: [linux]
version: [jdk8u, jdk11u, jdk16u, jdk]
version: [jdk11u]
vm: [hotspot]
image: [adoptopenjdk/centos7_build_image]
include:
- os: alpine-linux
version: jdk16u
vm: hotspot
image: adoptopenjdk/alpine3_build_image
- os: alpine-linux
version: jdk
vm: hotspot
image: adoptopenjdk/alpine3_build_image
- os: linux
version: jdk11u
vm: dragonwell
image: adoptopenjdk/centos7_build_image
- os: linux
version: jdk11u
vm: bisheng
image: adoptopenjdk/centos7_build_image
steps:
- uses: actions/checkout@v2

Expand All @@ -52,139 +35,39 @@ jobs:
with:
name: ${{matrix.version}}-${{matrix.os}}-${{matrix.vm}}
path: workspace/target/*

build_macos:
name: macOS
runs-on: macos-latest
build_linux_smoke:
name: Linux x64 smoke
runs-on: ubuntu-latest
needs:
- build_linux
strategy:
matrix:
os: [macOS]
version: [jdk8u, jdk11u]
os: [linux]
version: [jdk11u]
vm: [hotspot]

image: [adoptopenjdk/centos7_build_image]
steps:
- uses: actions/checkout@v2

- name: Install Dependencies
run: |
brew install bash binutils freetype gnu-sed nasm
- uses: actions/setup-java@v1
id: setup-java
with:
java-version: 7
if: matrix.version == 'jdk8u'

- name: Select correct Xcode
run: |
rm -rf /Applications/Xcode.app
ln -s /Applications/Xcode_11.7.app /Applications/Xcode.app
- name: Build macOS
run: |
export JAVA_HOME=$JAVA_HOME_11_X64
# Skip freetype build on jdk11+
if [ ${{ matrix.version }} != "jdk8u" ]; then
export BUILD_ARGS="--skip-freetype --make-exploded-image"
./build-farm/make-adopt-build-farm.sh
export BUILD_ARGS="--assemble-exploded-image"
./build-farm/make-adopt-build-farm.sh
else
./build-farm/make-adopt-build-farm.sh
fi
env:
JAVA_TO_BUILD: ${{ matrix.version }}
ARCHITECTURE: x64
VARIANT: ${{ matrix.vm }}
TARGET_OS: mac
FILENAME: OpenJDK.tar.gz
JDK7_BOOT_DIR: ${{ steps.setup-java.outputs.path }}

- uses: actions/upload-artifact@v2
name: Collect and Archive Artifacts
with:
name: ${{matrix.version}}-${{matrix.os}}-${{matrix.vm}}
path: workspace/target/*

build_windows:
name: Windows
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-2019]
version: [jdk]
vm: [hotspot]
include:
- os: windows-2016
version: jdk11u
vm: hotspot

steps:
- name: Restore cygwin packages from cache
id: cygwin
uses: actions/cache@v2
with:
path: C:\cygwin_packages
key: cygwin-packages-${{ runner.os }}-v1

- name: Install Cygwin
run: |
New-Item -Path C:\ -Name 'openjdk' -ItemType 'directory'
Invoke-WebRequest -UseBasicParsing 'https://cygwin.com/setup-x86_64.exe' -OutFile 'C:\temp\cygwin.exe'
Start-Process -Wait -FilePath 'C:\temp\cygwin.exe' -ArgumentList '--packages autoconf,automake,bsdtar,cpio,curl,gcc-core,git,gnupg,grep,libtool,make,mingw64-x86_64-gcc-core,perl,rsync,unzip,wget,zip --quiet-mode --download --local-install --delete-orphans --site https://mirrors.kernel.org/sourceware/cygwin/ --local-package-dir C:\cygwin_packages --root C:\cygwin64'
- uses: actions/setup-java@v1
id: setup-java7
with:
java-version: 7
if: matrix.version == 'jdk8u'

- uses: actions/setup-java@v1
id: setup-java11
with:
java-version: 11

- name: Install Git
run: |
Invoke-WebRequest 'https://github.com/git-for-windows/git/releases/download/v2.14.3.windows.1/Git-2.14.3-64-bit.exe' -OutFile 'C:\temp\git.exe'
Start-Process -Wait -FilePath 'C:\temp\git.exe' -ArgumentList '/SILENT /ALLOWDOWNGRADE=1** /COMPONENTS="icons,ext\reg\shellhere,assoc,assoc_sh"'
- name: Set PATH
run: echo "C:\cygwin64\bin;C:\Program Files\Git\bin;" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

- name: Install Visual Studio 2013
run: |
choco install visualstudiocommunity2013
if: matrix.version == 'jdk8u'

- name: Cygwin git configuration
shell: bash
run: mkdir $HOME && git config --system core.autocrlf false

- uses: actions/checkout@v2

- name: Setup 8dot3name
run: fsutil behavior set disable8dot3 0

- name: Set JAVA_HOME
run: echo "JAVA_HOME=$(cygpath ${{ steps.setup-java11.outputs.path }})" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

- name: Set JDK7_BOOT_DIR
run: echo "JDK7_BOOT_DIR=$(cygpath ${{ steps.setup-java7.outputs.path }})" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
if: matrix.version == 'jdk8u'

- name: Build Windows
run: |
bash build-farm/make-adopt-build-farm.sh
shell: cmd
env:
JAVA_TO_BUILD: ${{ matrix.version }}
ARCHITECTURE: x64
VARIANT: ${{ matrix.vm }}
TARGET_OS: windows
FILENAME: OpenJDK.tar.gz

- uses: actions/upload-artifact@v2
name: Collect and Archive Artifacts
with:
name: ${{matrix.version}}-${{matrix.os}}-${{matrix.vm}}
path: workspace/target/*
- name: Checkout the source
uses: actions/checkout@v2
- name: Restore build artifacts
id: build_restore
uses: actions/download-artifact@v2
with:
name: ${{matrix.version}}-${{matrix.os}}-${{matrix.vm}}
path: ~/${{matrix.version}}-${{matrix.os}}-${{matrix.vm}}
- name: Unpack jdk
run: |
tar -xf "${HOME}/${{matrix.version}}-${{matrix.os}}-${{matrix.vm}}/OpenJDK.tar.gz" -C "${HOME}/${{matrix.version}}-${{matrix.os}}-${{matrix.vm}}"
- name: Set root of jdk image dir
run: |
imageroot=`find ${HOME}/${{matrix.version}}-${{matrix.os}}-${{matrix.vm}} -name release -type f`
echo "TEST_JDK_HOME=`dirname ${imageroot}`" >> $GITHUB_ENV
- name: AQA smoke
uses: smlambert/run-aqa@vendorRepos
with:
build_list: 'functional/buildAndPackage'
target: '_extended.functional'
version: ${{ matrix.version }}
vendor_testRepos: "https://github.com/${{ github.repository }}.git"
vendor_testBranches: "${{ github.head_ref }}"
vendor_testDirs: "/test/functional"
11 changes: 11 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>openjdk-build</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>

0 comments on commit d0a6f7a

Please sign in to comment.