From 12c1c919378e4f699ebcf87bfb864027647ca543 Mon Sep 17 00:00:00 2001 From: Douglas Camata <159076+douglascamata@users.noreply.github.com> Date: Thu, 1 Feb 2024 21:33:05 +0100 Subject: [PATCH] Quick failure on M-series (arm64) macOS runners (#28) * Check wether M1 detection works Signed-off-by: Douglas Camata <159076+douglascamata@users.noreply.github.com> * Test action on macOS 13 only Signed-off-by: Douglas Camata <159076+douglascamata@users.noreply.github.com> * Update README Signed-off-by: Douglas Camata <159076+douglascamata@users.noreply.github.com> * Keep macOS 12 in the test matrix Signed-off-by: Douglas Camata <159076+douglascamata@users.noreply.github.com> * Change safety check to be futureproof Signed-off-by: Douglas Camata <159076+douglascamata@users.noreply.github.com> * Readd macos-14 for another quick test Signed-off-by: Douglas Camata <159076+douglascamata@users.noreply.github.com> * Fix bash-fu Signed-off-by: Douglas Camata <159076+douglascamata@users.noreply.github.com> * Another README update Signed-off-by: Douglas Camata <159076+douglascamata@users.noreply.github.com> * Remove macos-14 from matrix list after test Signed-off-by: Douglas Camata <159076+douglascamata@users.noreply.github.com> * Add changelog entry Signed-off-by: Douglas Camata <159076+douglascamata@users.noreply.github.com> --------- Signed-off-by: Douglas Camata <159076+douglascamata@users.noreply.github.com> --- .github/workflows/test.yml | 6 +++++- CHANGELOG.md | 5 +++++ README.md | 19 +++++++++++++++++++ action.yml | 13 ++++++++++++- 4 files changed, 41 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5a9602d..c9f87fd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,7 +6,11 @@ on: jobs: setup-docker: - runs-on: macos-latest + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [macos-12, macos-13] name: A job to perform a self-test on this Github Action steps: # To use this repository's private action, diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c4972e..fef04f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning]. ## [Unreleased] +### Added + +- Fail fast when running on arm64 macOS runners (`macos-14` public runners) ([#28](https://github.com/douglascamata/setup-docker-macos-action/pull/28)). + - None of the arm64 processors on Apple computers support nested virtualization as of today (Feb 1st 2024). + ## [v1-alpha.11] - 2024-01-05 ### Added diff --git a/README.md b/README.md index 9766b5e..febf82f 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,25 @@ I intend this action to be kept as simple as possible: - No other OS will be supported. - Binaries will be downloaded directly from the source when possible. +# Currently supported public runner images + +- `macos-12` +- `macos-13` + +# ARM64 processors (M1, M2, M3 series) used on `macos-14` images are unsupported! + +Yes, exactly what you just read. These processors do not support nested +virtualization. This means Colima can't start the VM to run Docker. + +For the M1 processor there is no hope. It lacks the hardware support for this. + +The M2 and M3 processors have such hardware support, but no software support +from Apple's Hypervisor framework (so no hopes for QEMU) or Virtualization +framework (alternative to QEMU). + +I'm sorry, but there's nothing I can do about it. All we can do is wait. If I +miss the announcement of nested virtualization support, please open an issue. + ## Features - Safety check to ensure the action is running in macOS. diff --git a/action.yml b/action.yml index 58f98e3..2169d83 100644 --- a/action.yml +++ b/action.yml @@ -30,12 +30,23 @@ outputs: runs: using: "composite" steps: - - name: Safety check + - name: OS safety check if: runner.os != 'macOS' run: | echo "Not a macOS runner, exiting." exit 1 shell: bash + - name: ARM64 safety check + run: | + arch_name=$(uname -m) + if [ "$arch_name" = "arm64" ] + then + echo "Detected M-series processor runner without nested virtualization support, exiting." + exit 1 + else + echo "Running on supported architecture: ${arch_name}" + fi + shell: bash - name: Update Homebrew run: | echo "::group::Updating Homebrew"