diff options
author | Patrick Lewis <pat@lo5t.com> | 2020-12-22 09:55:58 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-22 17:55:58 +0000 |
commit | 0067d45ba45f7697df6b43acdb00b69600dd7925 (patch) | |
tree | 6b53f9afc4debdcc6c5586c8bfb72f4cc56b4dfb | |
parent | 46d6a4690b7bbf02373a056798435e774ad0b242 (diff) |
feat(CI/MacOS): use acore.sh to install deps (#4003)
-rw-r--r-- | .github/workflows/core_build.yml | 4 | ||||
-rw-r--r-- | apps/bash_shared/defines.sh | 10 | ||||
-rwxr-xr-x | apps/ci/mac/ci-compile.sh | 2 | ||||
-rwxr-xr-x | apps/ci/mac/ci-install.sh | 10 | ||||
-rw-r--r-- | apps/installer/includes/os_configs/osx.sh | 13 |
5 files changed, 24 insertions, 15 deletions
diff --git a/.github/workflows/core_build.yml b/.github/workflows/core_build.yml index 983069a89f..6f43763301 100644 --- a/.github/workflows/core_build.yml +++ b/.github/workflows/core_build.yml @@ -85,8 +85,10 @@ jobs: restore-keys: | ccache:${{ matrix.os }}:${{ github.ref }} ccache:${{ matrix.os }} + - name: Install latest bash + run: brew install bash - name: Configure OS - run: source ./apps/ci/mac/ci-install.sh + run: source ./acore.sh install-deps - name: Build run: source ./apps/ci/mac/ci-compile.sh - name: Run unit tests diff --git a/apps/bash_shared/defines.sh b/apps/bash_shared/defines.sh index 605d3c30f8..ed70cac1d5 100644 --- a/apps/bash_shared/defines.sh +++ b/apps/bash_shared/defines.sh @@ -1,5 +1,14 @@ unamestr=$(uname) if [[ "$unamestr" == 'Darwin' ]]; then + if ! command -v brew &>/dev/null ; then + ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + fi + if ! [ "${BASH_VERSINFO}" -ge 4 ]; then + brew install bash + fi + if ! command -v greadlink &>/dev/null ; then + brew install coreutils + fi AC_PATH_ROOT=$(greadlink -f "$AC_PATH_APPS/../") else AC_PATH_ROOT=$(readlink -f "$AC_PATH_APPS/../") @@ -10,4 +19,3 @@ AC_PATH_CONF="$AC_PATH_ROOT/conf" AC_PATH_MODULES="$AC_PATH_ROOT/modules" AC_PATH_DEPS="$AC_PATH_ROOT/deps" - diff --git a/apps/ci/mac/ci-compile.sh b/apps/ci/mac/ci-compile.sh index 7f10ae8b52..0bce1ca6fe 100755 --- a/apps/ci/mac/ci-compile.sh +++ b/apps/ci/mac/ci-compile.sh @@ -5,7 +5,7 @@ export CCACHE_MAXSIZE='2G' export CCACHE_COMPRESS=9 ccache -s -mkdir var/build/obj && cd var/build/obj; +cd var/build/obj time cmake ../../../ \ -DTOOLS=1 \ diff --git a/apps/ci/mac/ci-install.sh b/apps/ci/mac/ci-install.sh deleted file mode 100755 index bd6f84263c..0000000000 --- a/apps/ci/mac/ci-install.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -########################################## -## workaround to fix macos-10.15 configure os from failing -time brew reinstall openssl@1.1 -########################################## - -time brew update -time brew install openssl readline ace coreutils bash bash-completion mysql ccache - diff --git a/apps/installer/includes/os_configs/osx.sh b/apps/installer/includes/os_configs/osx.sh index a29f1846db..28f5c9bb23 100644 --- a/apps/installer/includes/os_configs/osx.sh +++ b/apps/installer/includes/os_configs/osx.sh @@ -1,6 +1,15 @@ -ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" +########################################## +## workaround to fix macos-10.15 configure os from failing +brew reinstall openssl@1.1 +########################################## brew update -brew install openssl readline cmake ace coreutils bash bash-completion md5sha1sum curl unzip +########################################## +## workaround for cmake already being installed in the github runners +if ! command -v cmake &>/dev/null ; then + brew install cmake +fi +########################################## +brew install openssl readline ace bash-completion curl unzip mysql ccache |