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