Restore osx cache

This commit is contained in:
r0qs 2023-08-11 14:40:07 +02:00
parent 16ae76cad7
commit 8996ae23d2
No known key found for this signature in database
GPG Key ID: 61503DBA6667276C
2 changed files with 32 additions and 16 deletions

View File

@ -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

View File

@ -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