From 8192b11d9db6265e9931bfedc1d32452de9b830a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Micha=C3=ABl=20Celerier?= Date: Sat, 23 Dec 2023 11:09:37 -0500 Subject: [PATCH] =?UTF-8?q?[ci]=C2=A0macOS=20build=20scripts=20improvement?= =?UTF-8?q?,=20revert=20to=2010.15=20min=20for=20MacIntel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/mac-builds.yaml | 4 ++++ ci/osx-package.build.sh | 12 +++++++++++- ci/osx-package.deps.sh | 20 ++++++++++---------- 3 files changed, 25 insertions(+), 11 deletions(-) diff --git a/.github/workflows/mac-builds.yaml b/.github/workflows/mac-builds.yaml index f44c6b38b3..a012d6e261 100644 --- a/.github/workflows/mac-builds.yaml +++ b/.github/workflows/mac-builds.yaml @@ -26,6 +26,8 @@ jobs: ./ci/osx-brew.build.sh brew-m1: + # Disabled until we manage to set-up proper macOS VMs to not pollute host with homebrew + if: false name: macOS (Release, Brew, AppleSilicon) runs-on: macmini-arm64 @@ -44,6 +46,8 @@ jobs: ./ci/osx-brew.build.sh brew-m1-dev: + # Disabled until we manage to set-up proper macOS VMs to not pollute host with homebrew + if: false name: macOS (Dev, Brew, AppleSilicon) runs-on: macmini-arm64 diff --git a/ci/osx-package.build.sh b/ci/osx-package.build.sh index d26a9edcea..a5145469da 100755 --- a/ci/osx-package.build.sh +++ b/ci/osx-package.build.sh @@ -4,13 +4,23 @@ export OSSIA_SDK=/opt/ossia-sdk-$MACOS_ARCH export SCORE_DIR="$PWD" export SDK_DIR="$PWD/SDK" export PATH=/usr/local/bin:/opt/homebrew/bin:$PATH -if [[ -d /Applications/Xcode_15.0.app ]]; then + +if [[ -d /Applications/Xcode_15.1.app ]]; then + export XCODE_ROOT=/Applications/Xcode_15.1.app + sudo xcode-select -s "$XCODE_ROOT" +elif [[ -d /Applications/Xcode_15.0.app ]]; then export XCODE_ROOT=/Applications/Xcode_15.0.app sudo xcode-select -s "$XCODE_ROOT" else export XCODE_ROOT=/Applications/Xcode.app fi +if [[ "$MACOS_ARCH" = "x86_64" ]]; then + export CNINJA_TOOLCHAIN=macos-release-10.15 +else + export CNINJA_TOOLCHAIN=macos-release-11.0 +fi + xcrun /usr/local/bin/cninja -S "$PWD" -B build macos-release -- \ -DOSSIA_SDK="$OSSIA_SDK" \ -DCMAKE_INSTALL_PREFIX="$PWD/install" diff --git a/ci/osx-package.deps.sh b/ci/osx-package.deps.sh index 34ec6c3d80..b3a9c537cd 100755 --- a/ci/osx-package.deps.sh +++ b/ci/osx-package.deps.sh @@ -6,14 +6,14 @@ set +x KEY_CHAIN=build.keychain - security create-keychain -p travis $KEY_CHAIN - security default-keychain -s $KEY_CHAIN - security unlock-keychain -p travis $KEY_CHAIN + security create-keychain -p travis "$KEY_CHAIN" + security default-keychain -s "$KEY_CHAIN" + security unlock-keychain -p travis "$KEY_CHAIN" - security import $CODESIGN_SECUREFILEPATH -k $KEY_CHAIN -P $MAC_CODESIGN_PASSWORD -T /usr/bin/codesign > /dev/null 2>&1 - security set-key-partition-list -S apple-tool:,apple: -s -k travis $KEY_CHAIN > /dev/null 2>&1 + security import "$CODESIGN_SECUREFILEPATH" -k "$KEY_CHAIN" -P "$MAC_CODESIGN_PASSWORD" -T /usr/bin/codesign > /dev/null 2>&1 + security set-key-partition-list -S apple-tool:,apple: -s -k travis "$KEY_CHAIN" > /dev/null 2>&1 - rm -rf $CODESIGN_SECUREFILEPATH + rm -rf "$CODESIGN_SECUREFILEPATH" ) set +e @@ -25,12 +25,12 @@ brew install gnu-tar ninja wget -nv https://github.com/jcelerier/cninja/releases/download/v3.7.9/cninja-v3.7.9-macOS.tar.gz -O cninja.tgz & SDK_ARCHIVE=sdk-macOS-$MACOS_ARCH.tar.gz -wget -nv https://github.com/ossia/score-sdk/releases/download/sdk30/$SDK_ARCHIVE -O $SDK_ARCHIVE -sudo mkdir -p /opt/ossia-sdk-$MACOS_ARCH/ +wget -nv https://github.com/ossia/score-sdk/releases/download/sdk30/$SDK_ARCHIVE -O "$SDK_ARCHIVE" +sudo mkdir -p "/opt/ossia-sdk-$MACOS_ARCH/" sudo chown -R $(whoami) /opt sudo chmod -R a+rwx /opt -gtar xhaf $SDK_ARCHIVE --strip-components=2 --directory /opt/ossia-sdk-$MACOS_ARCH/ -ls /opt/ossia-sdk-$MACOS_ARCH/ +gtar xhaf "$SDK_ARCHIVE" --strip-components=2 --directory "/opt/ossia-sdk-$MACOS_ARCH/" +ls "/opt/ossia-sdk-$MACOS_ARCH/" sudo rm -rf /Library/Developer/CommandLineTools sudo rm -rf /usr/local/include/c++