Skip to content

Commit

Permalink
unixPB: Install gcc 10.3 into /usr/local/gcc10
Browse files Browse the repository at this point in the history
Signed-off-by: Stewart X Addison <[email protected]>
  • Loading branch information
sxa committed Jan 7, 2022
1 parent 2339d41 commit e54bbec
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 2 deletions.
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,42 @@
---
##########
# gcc_10 #
##########

- name: Check if gcc 10.3 is installed on RHEL/CentOS/Ubuntu16
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"))
tags: gcc_10

# Unable to check the checksum of the binary as it'll be different for each architecture's tar.xz file
- 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{{ gccsuffix }}
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{{ gccsuffix }}'
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

0 comments on commit e54bbec

Please sign in to comment.