Skip to content

Merge branch 'rivos/main' into rivos/merge-jdk-22+13 #1

Merge branch 'rivos/main' into rivos/merge-jdk-22+13

Merge branch 'rivos/main' into rivos/merge-jdk-22+13 #1

#
# Copyright (c) 2022, Oracle and/or its affiliates. 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. Oracle 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>>>>>>> rivos/main
125

Check failure on line 12 in .github/workflows/build-cross-compile.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build-cross-compile.yml

Invalid workflow file

You have an error in your yaml syntax on line 12
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.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
name: 'Build (cross-compile)'
on:
workflow_call:
inputs:
platform:
required: true
type: string
gcc-major-version:
required: true
type: string
extra-conf-options:
required: false
type: string
configure-arguments:
required: false
type: string
make-arguments:
required: false
type: string
make-target:
required: false
type: string
default: 'product-bundles test-bundles'
debug-levels:
required: false
type: string
default: '[ "debug", "release" ]'
jobs:
build-cross-compile:
name: build
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
debug-level: ${{ fromJSON(inputs.debug-levels) }}
include:
- debug-level: debug
flags: --with-debug-level=fastdebug
suffix: -debug
steps:
- name: 'Checkout the JDK source'
uses: actions/checkout@v3
- name: 'Get the BootJDK'
id: bootjdk
uses: ./.github/actions/get-bootjdk
with:
platform: linux-x64
- name: 'Get JTReg'
id: jtreg
uses: ./.github/actions/get-jtreg
- name: 'Get GTest'
id: gtest
uses: ./.github/actions/get-gtest
# Use linux-x64 JDK bundle as build JDK
- name: 'Get build JDK'
id: buildjdk
uses: ./.github/actions/get-bundles
with:
platform: linux-x64
path: buildjdk
- name: 'Initialize platform variables'
id: platform-variables
uses: ./.github/actions/init-platform-variables
with:
platform: ${{ inputs.platform }}
# Upgrading apt to solve libc6 installation bugs, see JDK-8260460.
- name: 'Install toolchain and dependencies'
run: |
# Install dependencies using apt-get
sudo apt-get update
sudo apt-get install --only-upgrade apt
sudo apt-get install \
gcc-${{ inputs.gcc-major-version }} \
g++-${{ inputs.gcc-major-version }} \
gcc-${{ inputs.gcc-major-version }}-${{ steps.platform-variables.outputs.gnu-arch }}-linux-gnu${{ steps.platform-variables.outputs.gnu-abi }} \
g++-${{ inputs.gcc-major-version }}-${{ steps.platform-variables.outputs.gnu-arch }}-linux-gnu${{ steps.platform-variables.outputs.gnu-abi }} \
libxrandr-dev libxtst-dev libcups2-dev libasound2-dev \
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ inputs.gcc-major-version }} 100 --slave /usr/bin/g++ g++ /usr/bin/g++-${{ inputs.gcc-major-version }}
- name: 'Create sysroot'
uses: ./.github/actions/create-sysroot
with:
target-cpu: ${{ steps.platform-variables.outputs.target-cpu }}
gnu-arch: ${{ steps.platform-variables.outputs.gnu-arch }}
debian-arch: ${{ steps.platform-variables.outputs.debian-arch }}
debian-repository: ${{ steps.platform-variables.outputs.debian-repository }}
debian-version: ${{ steps.platform-variables.outputs.debian-version }}
debian-keyring: ${{ steps.platform-variables.outputs.debian-keyring }}
- name: 'Configure'
run: >
bash configure
--with-conf-name=linux-${{ steps.platform-variables.outputs.target-cpu }}
${{ matrix.flags }}
--with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
--with-boot-jdk=${{ steps.bootjdk.outputs.path }}
--with-jtreg=${{ steps.jtreg.outputs.path }}
--with-gtest=${{ steps.gtest.outputs.path }}
--enable-jtreg-failure-handler
--with-zlib=system
--disable-precompiled-headers
--openjdk-target=${{ steps.platform-variables.outputs.gnu-arch }}-linux-gnu${{ steps.platform-variables.outputs.gnu-abi }}
--with-sysroot=sysroot
--with-build-jdk=${{ steps.buildjdk.outputs.jdk-path }}
--with-jmod-compress=zip-1
CC=${{ steps.platform-variables.outputs.gnu-arch }}-linux-gnu${{ steps.platform-variables.outputs.gnu-abi }}-gcc-${{ inputs.gcc-major-version }}
CXX=${{ steps.platform-variables.outputs.gnu-arch }}-linux-gnu${{ steps.platform-variables.outputs.gnu-abi }}-g++-${{ inputs.gcc-major-version }}
${{ inputs.extra-conf-options }} ${{ inputs.configure-arguments }} || (
echo "Dumping config.log:" &&
cat config.log &&
exit 1)
- name: 'Build'
id: build
uses: ./.github/actions/do-build
with:
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
platform: '${{ inputs.platform }}'
debug-suffix: '${{ matrix.suffix }}'
- name: 'Upload bundles'
uses: ./.github/actions/upload-bundles
with:
platform: '${{ inputs.platform }}'
debug-suffix: '${{ matrix.suffix }}'