Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unixPB: Install gcc 10.3 into /usr/local/gcc10 #2420

Merged
merged 5 commits into from
Jan 11, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions ansible/pbTestScripts/testJDK.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ if [[ "$(uname)" == "FreeBSD" ]]; then
cp -r $HOME/openjdk-build/workspace/build/src/build/*/jdk* $HOME
export TEST_JDK_HOME=$HOME/jdk
else
export TEST_JDK_HOME=$(ls -1d $HOME/openjdk-build/workspace/build/src/build/*/images/jdk* |grep -v ".*jre.*"|grep -v ".*-image")
echo SXA: TEST_JDK_HOME = "$TEST_JDK_HOME"
ls -ld $HOME/openjdk-build/workspace/build/src/build/*/images/*
ls -ld $HOME/openjdk-build/workspace/build/src/build/*/images/jdk*
export TEST_JDK_HOME=$(ls -1d $HOME/openjdk-build/workspace/build/src/build/*/images/jdk* |egrep -v 'jre|-image|static-libs'
fi

echo DEBUG: TEST_JDK_HOME = $TEST_JDK_HOME

# Special case for Solaris. See: https://github.com/adoptium/infrastructure/pull/2405#issuecomment-999498345
if [[ "$(uname)" == "SunOS" ]]; then
export PATH="/opt/csw/bin:/usr/local/bin:${PATH}"
fi


mkdir -p $HOME/testLocation
[ ! -d $HOME/testLocation/aqa-tests ] && git clone https://github.com/adoptium/aqa-tests.git $HOME/testLocation/aqa-tests
# cd to aqa-tests as required by https://github.com/adoptium/aqa-tests/issues/2691#issue-932959102
Expand Down
6 changes: 4 additions & 2 deletions ansible/playbooks/AdoptOpenJDK_Unix_Playbook/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@
- gcc_48
- role: gcc_7 # OpenJ9
tags: [build_tools, build_tools_openj9]
- role: gcc_9
- role: gcc_9 # Dragonwell
tags: [build_tools]
- role: gcc_10 # JDK17+
tags: [build_tools]
- role: Xcode
when: ansible_distribution == "MacOSX"
Expand Down Expand Up @@ -109,7 +111,7 @@
- ansible_distribution != "Solaris"
- ansible_architecture != "riscv64"
tags: build_tools
- role: adoptopenjdk_install # JDK18 Build Bootstrap
- role: adoptopenjdk_install # JDK18 Build Bootstrap
jdk_version: 17
when:
- ansible_distribution != "Alpine"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
##########
# gcc_10 #
##########

- name: Check if gcc 10.3 is installed on RHEL/CentOS/Ubuntu16
Willsparker marked this conversation as resolved.
Show resolved Hide resolved
shell: /usr/local/gcc10/bin/gcc-10.3 --version 2>&1 > /dev/null
ignore_errors: yes
register: gcc10_installed
when: ansible_distribution == "RedHat" or ansible_distribution == "CentOS" or ansible_distribution == "openSUSE" or (ansible_architecture == "armv7l" and ((ansible_distribution == "Ubuntu" and ansible_distribution_major_version == "16") or ansible_distribution == "Debian"))
changed_when: False
tags: gcc_10

# Unable to check the checksum of the binary as it'll be different for each architecture's tar.xz file
Willsparker marked this conversation as resolved.
Show resolved Hide resolved
- name: Download AdoptOpenJDK gcc-10.3 binary
get_url:
url: https://ci.adoptopenjdk.net/userContent/gcc/gcc103.{{ ansible_architecture }}.tar.xz
dest: '/tmp/ansible-adoptopenjdk-gcc-10.tar.xz'
force: no
mode: 0644
when:
- ansible_distribution == "RedHat" or ansible_distribution == "CentOS" or ansible_distribution == "openSUSE" or (ansible_architecture == "armv7l" and ((ansible_distribution == "Ubuntu" and ansible_distribution_major_version == "16") or ansible_distribution == "Debian"))
- gcc10_installed.rc != 0
tags: gcc_10

- name: Extract AdoptOpenJDK gcc-10 binary to /usr/local/gcc10
unarchive:
src: /tmp/ansible-adoptopenjdk-gcc-10.tar.xz
dest: /usr/local/
copy: False
when:
- ansible_distribution == "RedHat" or ansible_distribution == "CentOS" or ansible_distribution == "openSUSE" or (ansible_architecture == "armv7l" and ((ansible_distribution == "Ubuntu" and ansible_distribution_major_version == "16") or ansible_distribution == "Debian"))
- gcc10_installed.rc != 0
tags: gcc_10

- name: Remove downloaded gcc 10 binary tarball
file:
path: '/tmp/ansible-adoptopenjdk-gcc-10.tar.xz'
state: absent
when:
- ansible_distribution == "RedHat" or ansible_distribution == "CentOS" or ansible_distribution == "openSUSE" or (ansible_architecture == "armv7l" and ((ansible_distribution == "Ubuntu" and ansible_distribution_major_version == "16") or ansible_distribution == "Debian"))
- gcc10_installed.rc != 0
tags: gcc_10