From ddce858c34f3db40bad3bf4caca0151109a78571 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Fri, 27 Oct 2023 18:38:13 +0200 Subject: [PATCH] Speed up macOS CI - skip nonsense during package installation - use actual number of available cores --- .github/workflows/macos.yml | 2 +- util/ci/common.sh | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index db6c8d2a1..bd66e6ca9 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -48,7 +48,7 @@ jobs: -DCMAKE_INSTALL_PREFIX=../build/macos/ \ -DRUN_IN_PLACE=FALSE -DENABLE_GETTEXT=TRUE \ -DINSTALL_DEVTEST=TRUE - make -j2 + cmake --build . -j$(sysctl -n hw.logicalcpu) make install - name: Test diff --git a/util/ci/common.sh b/util/ci/common.sh index cfac8538b..b807e4e3b 100644 --- a/util/ci/common.sh +++ b/util/ci/common.sh @@ -33,8 +33,11 @@ install_macos_deps() { cmake gettext freetype gmp jpeg-turbo jsoncpp leveldb libogg libpng libvorbis luajit zstd ) - brew update - brew install "${pkgs[@]}" + export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 + export HOMEBREW_NO_INSTALL_CLEANUP=1 + # contrary to how it may look --auto-update makes brew do *less* + brew update --auto-update + brew install --display-times "${pkgs[@]}" brew unlink $(brew ls --formula) brew link "${pkgs[@]}" }