adoptium / infrastructure

This repo contains all information about machine maintenance.
Apache License 2.0
84 stars 100 forks source link

UnixPB: Only Install CMake on mac where not already present. #3544

Closed steelhead31 closed 2 months ago

steelhead31 commented 2 months ago

This should fix the failing GHA, as the MacOS 14 runner, already has cmake installed.

Fixes #3549

Checklist
steelhead31 commented 2 months ago

Raised upstream bug for the MacOS14 runner: https://github.com/actions/runner-images/issues/9777

steelhead31 commented 2 months ago

I think the location is different for x64 and aarch64, although given that we're only seeing the problem on one of them (AFAIK) I'm ok with this for now.

I'm curious though - do we know why this causes the problem? I'd have hoped that state: present would make it do the right thing and only install if it's not there - almost feels like cmake has been installed on the runners in a manner which isn't compatible with brew. We should also consider that if it's an "unofficial" install we've no idea where it came from or what version it is.

@sxa Im not sure how the github runners are constructed, Im assuming without ansible, but I can ask the question upstream, on my bug... an alternate solution for the github action is to remove it from the runner, so the playbook can install the correct version, as this only occurs on the github runner, it works as expected everywhere else.

steelhead31 commented 2 months ago

Going to quickly test the removal from the runner, and allowing the playbook to run normally :)

steelhead31 commented 2 months ago

Removing cmake from the runner is not straightforward, so the ansible check is currently a tidier solution, I'll ask some questions upstream.

karianna commented 2 months ago

Ran the Mac OS X 11 action twice but I can't see the clear reason for failure.

steelhead31 commented 2 months ago

Ran the Mac OS X 11 action twice but I can't see the clear reason for failure.

@karianna it appears to be running , but the performance is pretty poor compared to the 14 runner. Macos 11 was end of life, in November 2023, so if this action keeps being problematic, it might be worth considering replacing macos 11 with 13, or dropping it entirely.

steelhead31 commented 2 months ago

Also a quick note that the macos-11 runner will be deprecated from 28th June see https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners

The macos-11 label has been deprecated and will no longer be available after 6/28/2024.
gdams commented 2 months ago

Also a quick note that the macos-11 runner will be deprecated from 28th June see https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners

The macos-11 label has been deprecated and will no longer be available after 6/28/2024.

I'd just kill it, maybe switch it out with macos-13?

sxa commented 2 months ago

Also a quick note that the macos-11 runner will be deprecated from 28th June see https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners

The macos-11 label has been deprecated and will no longer be available after 6/28/2024.

I'd just kill it, maybe switch it out with macos-13?

Yeah if it's being deprecated that seems like a reasonable course of action