From 447f4b5ac6a4e757db41c7e0d3d9252c8153ac7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Wawrzyniec=20Urba=C5=84czyk?= Date: Mon, 29 Apr 2024 02:09:09 +0200 Subject: [PATCH] Use `macos-12` runner for x64 macOS jobs (#9801) GitHub made arm64 runners generally available and changed macos-latest label to point to them. The runner architecture is coupled with GH-hosted runners OS version: macos-13 is the last one to run on x64. This PR essentially brings back the previous behavior, by explicitly requesting that all our x64 macOS jobs are run on macos-12 (as was before). We should eventually migrate to macos-13 for x64 macOS and macos-14/macos-latest for arm64 macOS. However, this leads to issues with `npm install` getting stuck, so it should be probably reattempted after the CI rework. --- .github/workflows/engine-nightly.yml | 6 +++--- .github/workflows/gui.yml | 6 +++--- .github/workflows/release.yml | 4 ++-- .github/workflows/scala-new.yml | 6 +++--- build/build/src/ci_gen/job.rs | 4 +++- build/ci_utils/src/actions/workflow/definition.rs | 5 +++++ 6 files changed, 19 insertions(+), 12 deletions(-) diff --git a/.github/workflows/engine-nightly.yml b/.github/workflows/engine-nightly.yml index 4ce87908c3..492c7e144c 100644 --- a/.github/workflows/engine-nightly.yml +++ b/.github/workflows/engine-nightly.yml @@ -107,7 +107,7 @@ jobs: enso-build-ci-gen-job-ci-check-backend-graal-vm-ce-macos-x86_64: name: Engine (GraalVM CE) (macos, x86_64) runs-on: - - macos-latest + - macos-12 steps: - if: startsWith(runner.name, 'GitHub Actions') || startsWith(runner.name, 'Hosted Agent') name: Installing wasm-pack @@ -354,7 +354,7 @@ jobs: enso-build-ci-gen-job-jvm-tests-graal-vm-ce-macos-x86_64: name: JVM Tests (GraalVM CE) (macos, x86_64) runs-on: - - macos-latest + - macos-12 steps: - if: startsWith(runner.name, 'GitHub Actions') || startsWith(runner.name, 'Hosted Agent') name: Installing wasm-pack @@ -640,7 +640,7 @@ jobs: enso-build-ci-gen-job-standard-library-tests-graal-vm-ce-macos-x86_64: name: Standard Library Tests (GraalVM CE) (macos, x86_64) runs-on: - - macos-latest + - macos-12 steps: - if: startsWith(runner.name, 'GitHub Actions') || startsWith(runner.name, 'Hosted Agent') name: Installing wasm-pack diff --git a/.github/workflows/gui.yml b/.github/workflows/gui.yml index a864ca7754..ce8c2f1cf0 100644 --- a/.github/workflows/gui.yml +++ b/.github/workflows/gui.yml @@ -61,7 +61,7 @@ jobs: enso-build-ci-gen-job-build-backend-macos-x86_64: name: Build Backend (macos, x86_64) runs-on: - - macos-latest + - macos-12 steps: - if: startsWith(runner.name, 'GitHub Actions') || startsWith(runner.name, 'Hosted Agent') name: Installing wasm-pack @@ -214,7 +214,7 @@ jobs: enso-build-ci-gen-job-new-gui-build-macos-x86_64: name: GUI build (macos, x86_64) runs-on: - - macos-latest + - macos-12 steps: - if: startsWith(runner.name, 'GitHub Actions') || startsWith(runner.name, 'Hosted Agent') name: Installing wasm-pack @@ -385,7 +385,7 @@ jobs: needs: - enso-build-ci-gen-job-build-backend-macos-x86_64 runs-on: - - macos-latest + - macos-12 steps: - if: startsWith(runner.name, 'GitHub Actions') || startsWith(runner.name, 'Hosted Agent') name: Installing wasm-pack diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 96ce2ccec5..090e22fcf7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -202,7 +202,7 @@ jobs: needs: - enso-build-ci-gen-draft-release-linux-x86_64 runs-on: - - macos-latest + - macos-12 steps: - if: startsWith(runner.name, 'GitHub Actions') || startsWith(runner.name, 'Hosted Agent') name: Installing wasm-pack @@ -492,7 +492,7 @@ jobs: - enso-build-ci-gen-draft-release-linux-x86_64 - enso-build-ci-gen-job-upload-backend-macos-x86_64 runs-on: - - macos-latest + - macos-12 steps: - if: startsWith(runner.name, 'GitHub Actions') || startsWith(runner.name, 'Hosted Agent') name: Installing wasm-pack diff --git a/.github/workflows/scala-new.yml b/.github/workflows/scala-new.yml index d0430b29c2..d60342bbd1 100644 --- a/.github/workflows/scala-new.yml +++ b/.github/workflows/scala-new.yml @@ -75,7 +75,7 @@ jobs: enso-build-ci-gen-job-ci-check-backend-graal-vm-ce-macos-x86_64: name: Engine (GraalVM CE) (macos, x86_64) runs-on: - - macos-latest + - macos-12 steps: - if: startsWith(runner.name, 'GitHub Actions') || startsWith(runner.name, 'Hosted Agent') name: Installing wasm-pack @@ -220,7 +220,7 @@ jobs: enso-build-ci-gen-job-jvm-tests-graal-vm-ce-macos-x86_64: name: JVM Tests (GraalVM CE) (macos, x86_64) runs-on: - - macos-latest + - macos-12 steps: - if: startsWith(runner.name, 'GitHub Actions') || startsWith(runner.name, 'Hosted Agent') name: Installing wasm-pack @@ -390,7 +390,7 @@ jobs: enso-build-ci-gen-job-standard-library-tests-graal-vm-ce-macos-x86_64: name: Standard Library Tests (GraalVM CE) (macos, x86_64) runs-on: - - macos-latest + - macos-12 steps: - if: startsWith(runner.name, 'GitHub Actions') || startsWith(runner.name, 'Hosted Agent') name: Installing wasm-pack diff --git a/build/build/src/ci_gen/job.rs b/build/build/src/ci_gen/job.rs index f570d33f2a..bf3df61f8c 100644 --- a/build/build/src/ci_gen/job.rs +++ b/build/build/src/ci_gen/job.rs @@ -66,6 +66,8 @@ impl RunsOn for RunnerLabel { RunnerLabel::MacOS => Some("MacOS".to_string()), RunnerLabel::Linux => Some("Linux".to_string()), RunnerLabel::Windows => Some("Windows".to_string()), + RunnerLabel::MacOS12 => Some("MacOS12".to_string()), + RunnerLabel::MacOS13 => Some("MacOS13".to_string()), RunnerLabel::MacOSLatest => Some("MacOSLatest".to_string()), RunnerLabel::LinuxLatest => Some("LinuxLatest".to_string()), RunnerLabel::WindowsLatest => Some("WindowsLatest".to_string()), @@ -93,7 +95,7 @@ impl RunsOn for OS { impl RunsOn for (OS, Arch) { fn runs_on(&self) -> Vec { match self { - (OS::MacOS, Arch::X86_64) => runs_on(OS::MacOS, RunnerType::GitHubHosted), + (OS::MacOS, Arch::X86_64) => vec![RunnerLabel::MacOS12], (os, Arch::X86_64) => runs_on(*os, RunnerType::SelfHosted), (OS::MacOS, Arch::AArch64) => { let mut ret = runs_on(OS::MacOS, RunnerType::SelfHosted); diff --git a/build/ci_utils/src/actions/workflow/definition.rs b/build/ci_utils/src/actions/workflow/definition.rs index d30daaa364..7e0028a1e0 100644 --- a/build/ci_utils/src/actions/workflow/definition.rs +++ b/build/ci_utils/src/actions/workflow/definition.rs @@ -1014,6 +1014,11 @@ pub enum RunnerLabel { Windows, #[serde(rename = "engine")] Engine, + #[serde(rename = "macos-12")] + MacOS12, + /// macos-13 is the last x64 version of the GitHub-hosted macOS runner. + #[serde(rename = "macos-13")] + MacOS13, #[serde(rename = "macos-latest")] MacOSLatest, #[serde(rename = "ubuntu-latest")]