From 8996ae23d2dc19d88c50c349801b48edcab18834 Mon Sep 17 00:00:00 2001 From: r0qs Date: Fri, 11 Aug 2023 14:40:07 +0200 Subject: [PATCH] Restore osx cache --- .circleci/config.yml | 31 ++++++++++++++++++++------- .circleci/osx_install_dependencies.sh | 17 ++++++++------- 2 files changed, 32 insertions(+), 16 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7ae05a7aa..5d0bc0602 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -365,11 +365,31 @@ commands: install_dependencies_osx: steps: - # FIXME: We used to cache dependencies on macOS but now it takes longer than just installing - # them each time. See https://github.com/ethereum/solidity/issues/12925. + - restore_cache: + keys: + - dependencies-osx-{{ arch }}-{{ checksum ".circleci/osx_install_dependencies.sh" }} + - attach_workspace: + at: . + # DO NOT EDIT between here and save_cache, but rather edit ./circleci/osx_install_dependencies.sh + # WARNING! If you do edit anything here instead, remember to invalidate the cache manually. - run: name: Install build dependencies - command: .circleci/osx_install_dependencies.sh + command: ./.circleci/osx_install_dependencies.sh + - run: + name: Cleaning outdated packages + command: brew cleanup + - save_cache: + key: dependencies-osx-{{ arch }}-{{ checksum ".circleci/osx_install_dependencies.sh" }} + paths: + - /usr/local/bin + - /usr/local/lib + - /usr/local/include + - /usr/local/Cellar/boost + - /usr/local/Cellar/cmake + - /usr/local/Cellar/wget + - /usr/local/Cellar/coreutils + - /usr/local/Cellar/diffutils + - /Users/distiller/Library/Caches/Homebrew defaults: @@ -392,7 +412,6 @@ defaults: - via-ir-optimize - via-ir-no-optimize - # -------------------------------------------------------------------------- # -------------------------------------------------------------------------- # Base Image Templates @@ -1121,8 +1140,6 @@ jobs: steps: - checkout - install_dependencies_osx - - attach_workspace: - at: . - run_soltest - store_test_results: path: test_results/ @@ -1135,8 +1152,6 @@ jobs: steps: - checkout - install_dependencies_osx - - attach_workspace: - at: . - run_cmdline_tests - store_artifacts_test_results - matrix_notify_failure_unless_pr diff --git a/.circleci/osx_install_dependencies.sh b/.circleci/osx_install_dependencies.sh index 5e779700c..be3fcdd06 100755 --- a/.circleci/osx_install_dependencies.sh +++ b/.circleci/osx_install_dependencies.sh @@ -27,11 +27,14 @@ # note that the following directories may be cached by circleci: # - /usr/local/bin -# - /usr/local/sbin # - /usr/local/lib # - /usr/local/include -# - /usr/local/Cellar -# - /usr/local/Homebrew +# - /usr/local/Cellar/boost +# - /usr/local/Cellar/cmake +# - /usr/local/Cellar/wget +# - /usr/local/Cellar/coreutils +# - /usr/local/Cellar/diffutils +# - /Users/distiller/Library/Caches/Homebrew set -eu @@ -52,11 +55,9 @@ function validate_checksum { if [ ! -f /usr/local/lib/libz3.a ] # if this file does not exists (cache was not restored), rebuild dependencies then - brew install boost - brew install cmake - brew install wget - brew install coreutils - brew install diffutils + # Install dependencies kegs + brew install boost cmake wget coreutils diffutils + ./scripts/install_obsolete_jsoncpp_1_7_4.sh # z3