|  |  | @ -75,8 +75,8 @@ jobs: | 
			
		
	
		
		
			
				
					
					|  |  |  |     - name: Brew link restored dependencies |  |  |  |     - name: Brew link restored dependencies | 
			
		
	
		
		
			
				
					
					|  |  |  |       if: steps.dependency-cache.outputs.cache-hit == 'true' |  |  |  |       if: steps.dependency-cache.outputs.cache-hit == 'true' | 
			
		
	
		
		
			
				
					
					|  |  |  |       run: | |  |  |  |       run: | | 
			
		
	
		
		
			
				
					
					|  |  |  |         while read package; do |  |  |  |         while read pkg; do | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |           brew link --force "$package" # `--force` for keg-only packages |  |  |  |           brew link --force "$pkg" # `--force` for keg-only packages | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         done < ~/github_brew_cache_entries.txt |  |  |  |         done < ~/github_brew_cache_entries.txt | 
			
		
	
		
		
			
				
					
					|  |  |  |     - name: Install dependencies |  |  |  |     - name: Install dependencies | 
			
		
	
		
		
			
				
					
					|  |  |  |       run: ./tools/mac_setup.sh |  |  |  |       run: ./tools/mac_setup.sh | 
			
		
	
	
		
		
			
				
					|  |  | @ -85,20 +85,14 @@ jobs: | 
			
		
	
		
		
			
				
					
					|  |  |  |     - name: Remove pre-existing Homebrew packages for caching |  |  |  |     - name: Remove pre-existing Homebrew packages for caching | 
			
		
	
		
		
			
				
					
					|  |  |  |       if: steps.dependency-cache.outputs.cache-hit != 'true' |  |  |  |       if: steps.dependency-cache.outputs.cache-hit != 'true' | 
			
		
	
		
		
			
				
					
					|  |  |  |       run: | |  |  |  |       run: | | 
			
		
	
		
		
			
				
					
					|  |  |  |         new_cellar=$(ls -1 /usr/local/Cellar) |  |  |  |         cd /usr/local/Cellar | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         comm -12 <(echo "$EXISTING_CELLAR") <(echo "$new_cellar") | while read dir; do |  |  |  |         new_cellar=$(ls -1) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |           if [[ $dir != "zstd" ]]; then # caching step needs zstd |  |  |  |         comm -12 <(echo "$EXISTING_CELLAR") <(echo "$new_cellar") | while read pkg; do | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             echo "Removing /usr/local/Cellar/$dir" |  |  |  |           if [[ $pkg != "zstd" ]]; then # caching step needs zstd | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             rm -rf "/usr/local/Cellar/$dir" |  |  |  |             rm -rf "$pkg" | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |           fi |  |  |  |           fi | 
			
		
	
		
		
			
				
					
					|  |  |  |         done |  |  |  |         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: |  |  |  |   build_webcam: | 
			
		
	
		
		
			
				
					
					|  |  |  |     name: build webcam |  |  |  |     name: build webcam | 
			
		
	
		
		
			
				
					
					|  |  |  |     runs-on: ubuntu-20.04 |  |  |  |     runs-on: ubuntu-20.04 | 
			
		
	
	
		
		
			
				
					|  |  | 
 |