From 9abcc61ddb7426fcc334a4fc50a747a7c625a82f Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Sun, 3 Jan 2021 12:39:31 -0800 Subject: [PATCH] cleanup mac build CI job old-commit-hash: 330f34bd0d3b4ff66900bbcdbc92557d28537422 --- .github/workflows/test.yaml | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index f013ce3270..bae646b29c 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -75,8 +75,8 @@ jobs: - name: Brew link restored dependencies if: steps.dependency-cache.outputs.cache-hit == 'true' run: | - while read package; do - brew link --force "$package" # `--force` for keg-only packages + while read pkg; do + brew link --force "$pkg" # `--force` for keg-only packages done < ~/github_brew_cache_entries.txt - name: Install dependencies run: ./tools/mac_setup.sh @@ -85,20 +85,14 @@ jobs: - name: Remove pre-existing Homebrew packages for caching if: steps.dependency-cache.outputs.cache-hit != 'true' run: | - new_cellar=$(ls -1 /usr/local/Cellar) - comm -12 <(echo "$EXISTING_CELLAR") <(echo "$new_cellar") | while read dir; do - if [[ $dir != "zstd" ]]; then # caching step needs zstd - echo "Removing /usr/local/Cellar/$dir" - rm -rf "/usr/local/Cellar/$dir" + cd /usr/local/Cellar + new_cellar=$(ls -1) + comm -12 <(echo "$EXISTING_CELLAR") <(echo "$new_cellar") | while read pkg; do + if [[ $pkg != "zstd" ]]; then # caching step needs zstd + rm -rf "$pkg" fi done - printf "\n\nNewly installed packages:\n" - comm -13 <(echo "$EXISTING_CELLAR") <(echo "$new_cellar") | tee ~/github_brew_cache_entries.txt - - printf "\n\nThe following will be cached:\n" - (du -shc /usr/local/Cellar/* | sort -h) || true - build_webcam: name: build webcam runs-on: ubuntu-20.04