-
Notifications
You must be signed in to change notification settings - Fork 1
/
.cirrus.yml
75 lines (70 loc) · 3.44 KB
/
.cirrus.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
# Copyright 2021, akashche at redhat.com
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
task:
matrix:
container:
image: ojdkbuild/centos6-jdk11u
cpu: 2
memory: 4G
environment:
GITHUB_TOKEN: ENCRYPTED[290c8060da18eef43892b5d22502c547d7e27c6be2601783407e793547f003bfaa0da5923e28adc634a8abfc81c85834]
LD_LIBRARY_PATH: /opt/rh/devtoolset-7/root/usr/lib64:/opt/rh/devtoolset-7/root/usr/lib:/opt/rh/devtoolset-7/root/usr/lib64/dyninst:/opt/rh/devtoolset-7/root/usr/lib/dyninst:/opt/rh/devtoolset-7/root/usr/lib64:/opt/rh/devtoolset-7/root/usr/lib:/opt/rh/autotools-latest/root/usr/lib64
PATH: /opt/rh/devtoolset-7/root/usr/bin:/opt/rh/autotools-latest/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
script: |
export OJDK_TAG=`git describe --exact-match --tags HEAD`
if [ -z ${OJDK_TAG} ] ; then exit 1 ; fi
echo ${OJDK_TAG}
export OJDK_UPDATE=`echo ${OJDK_TAG} | sed 's/\./ /g' | sed 's/+/ /' | awk '{print $3}'`
echo ${OJDK_UPDATE}
export OJDK_BUILD=`echo ${OJDK_TAG} | sed 's/+/ /' | awk '{print $2}'`
echo ${OJDK_BUILD}
export OJDK_IMAGE=jdk-11.0.${OJDK_UPDATE}-ojdkbuild-linux-x64
# warning: Remote branch jdk-11.0.13+8 not found in upstream origin, using HEAD instead
#git clone --depth 1 --branch ${OJDK_TAG} https://github.com/openjdk/jdk11u.git /jdk11u
git clone https://github.com/openjdk/jdk11u.git /jdk11u
pushd /jdk11u
git checkout ${OJDK_TAG}
rm -rf .git
popd
# build
mkdir /build
cd /build && bash /jdk11u/configure \
--enable-unlimited-crypto=yes \
--disable-warnings-as-errors \
--disable-hotspot-gtest \
--disable-sjavac \
--with-native-debug-symbols=none \
--with-debug-level=release \
--with-stdc++lib=static \
--with-zlib=bundled \
--with-boot-jdk=/bootjdk \
--with-version-pre='' \
--with-version-build=${OJDK_BUILD} \
--with-version-opt='LTS' \
--with-vendor-version-string=18.9 \
--with-vendor-name=ojdkbuild \
--with-vendor-url=https://github.com/ojdkbuild \
--with-vendor-bug-url=https://github.com/ojdkbuild/ojdkbuild/issues \
--with-vendor-vm-bug-url=https://github.com/ojdkbuild/ojdkbuild/issues \
--with-num-cores=1
cd /build && make images LOG=info
mv /build/images/jdk /build/${OJDK_IMAGE}
cd /build && zip -qyr9 ${OJDK_IMAGE}.zip ${OJDK_IMAGE}
mkdir /build/dist
mv /build/${OJDK_IMAGE}.zip /build/dist/${OJDK_IMAGE}.zip
cd /build/dist && sha256sum ${OJDK_IMAGE}.zip > ${OJDK_IMAGE}.zip.sha256
# deploy
cd /build && curl -LO https://github.com/tcnksm/ghr/releases/download/v0.13.0/ghr_v0.13.0_linux_amd64.tar.gz
cd /build && tar -xzf ghr_v0.13.0_linux_amd64.tar.gz
/build/ghr_v0.13.0_linux_amd64/ghr -t ${GITHUB_TOKEN} -u ojdkbuild -r contrib_jdk11u-ci -c ${CIRRUS_CHANGE_IN_REPO} ${CIRRUS_TAG} /build/dist