From 658f1a89a0bedd34155b9577ddec47355bb5d9b6 Mon Sep 17 00:00:00 2001 From: George Adams Date: Tue, 23 Jul 2024 21:46:04 +0100 Subject: [PATCH] initial changes to build macOS --- eng/pipeline/stages/go-builder-matrix-stages.yml | 2 ++ eng/utilities.ps1 | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/eng/pipeline/stages/go-builder-matrix-stages.yml b/eng/pipeline/stages/go-builder-matrix-stages.yml index 0c4cc12d153..bb80ca4a68c 100644 --- a/eng/pipeline/stages/go-builder-matrix-stages.yml +++ b/eng/pipeline/stages/go-builder-matrix-stages.yml @@ -88,6 +88,8 @@ stages: - { experiment: cngcrypto, os: windows, arch: amd64, config: test, fips: true } # Test that buildandpack works on Windows x86-32, but don't release it. - { os: windows, hostArch: amd64, arch: 386, config: buildandpack } + - { os: macos, arch: amd64, config: devscript } + - { os: macos, arch: amd64, config: test } - ${{ if parameters.outerloop }}: # Upstream builders. # - { os: linux, arch: amd64, config: clang } https://github.com/microsoft/go/issues/342 diff --git a/eng/utilities.ps1 b/eng/utilities.ps1 index b8bfc5ca3cc..a1e91c55596 100644 --- a/eng/utilities.ps1 +++ b/eng/utilities.ps1 @@ -51,6 +51,18 @@ function Get-Stage0GoRoot() { } Default { throw "Unable to match Linux '$proc_arch' to an architecture supported by the Microsoft scripts to build Go." } } + } elseif ($IsMacOS) { + switch ($proc_arch) { + 'x64' { + $stage0_go_sha256 = '98a09c085b4c385abae7d35b9155195d5e584d14988347ac7f18e4cbe3b5ef3d' + $stage0_go_suffix = 'darwin-amd64.tar.gz' + } + 'arm64' { + $stage0_go_sha256 = '1163be1998835a13f00dfc869a8e3cdebf86984ad41ff2fff43e35ac2a0d8344' + $stage0_go_suffix = 'darwin-arm64.tar.gz' + } + Default { throw "Unable to match macOS '$proc_arch' to an architecture supported by the Microsoft scripts to build Go." } + } } else { throw "Current OS/Platform is not supported by the Microsoft scripts to build Go." }