diff --git a/.github/workflows/build_mac.yml b/.github/workflows/build_mac.yml index 9448e9f08b..3fecc74835 100644 --- a/.github/workflows/build_mac.yml +++ b/.github/workflows/build_mac.yml @@ -5,7 +5,7 @@ on: paths: - .github/workflows/build_mac.yml - ansible/playbooks/AdoptOpenJDK_Unix_Playbook/** - branches: + branches: - master permissions: @@ -18,7 +18,7 @@ jobs: strategy: matrix: include: - - os: [macos-11] + - os: [macos-13] - os: [macos-14] steps: @@ -27,6 +27,13 @@ jobs: - name: Install dependencies run: brew install ansible + # This is to fix an issue with the github macos14 runner, that cant resolve keyserver.ubuntu.com + # but this does work when replaced with the IP address. Spotted during the GPG verification of ANT step + # Upstream Bug : https://github.com/actions/runner-images/issues/9777 + - name: Replace keyserver address with IP address + run: | + sed -i '' 's/keyserver\.ubuntu\.com/185.125.188.27/g' ansible/playbooks/Supporting_Scripts/package_signature_verification.sh + - name: Run Ansible Playbook run: | echo "localhost ansible_user=runner ansible_connection=local" > ansible/hosts diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/MacOSX.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/MacOSX.yml index 4b4dbb0773..ef2aa43b5e 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/MacOSX.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/MacOSX.yml @@ -125,6 +125,26 @@ with_items: "{{ Build_Tool_Packages }}" tags: build_tools +# Install CMAKE Where It Doesn't exist +- name: Check if cmake is installed in /opt/homebrew/bin + stat: + path: /opt/homebrew/bin/cmake + register: cmake_homebrew + +- name: Check if cmake is installed in /usr/local/bin + stat: + path: /usr/local/bin/cmake + register: cmake_local + +- name: Install Cmake + become: yes + become_user: "{{ ansible_user }}" + homebrew: + name: "cmake" + state: present + tags: build_tools + when: not (cmake_homebrew.stat.exists or cmake_local.stat.exists) + - name: Install Build Tool Packages NOT macOS 10.12 become: yes become_user: "{{ ansible_user }}" diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/vars/MacOSX.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/vars/MacOSX.yml index 1b5f24865c..be418e5063 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/vars/MacOSX.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/vars/MacOSX.yml @@ -8,7 +8,6 @@ Build_Tool_Packages: - autoconf - automake # for compiling freetype on JDK8u - - cmake # OpenJ9 - coreutils - gnupg - gnu-sed diff --git a/ansible/playbooks/Supporting_Scripts/package_signature_verification.sh b/ansible/playbooks/Supporting_Scripts/package_signature_verification.sh index 141faf32f6..6bd1c0d5d3 100755 --- a/ansible/playbooks/Supporting_Scripts/package_signature_verification.sh +++ b/ansible/playbooks/Supporting_Scripts/package_signature_verification.sh @@ -37,7 +37,7 @@ while [[ $# -gt 0 ]]; do ;; -k) KEY="$2" - shift 2 + shift 2 ;; -*|--*) echo "Unknown option $1"