mirror of
				https://github.com/pion/mediadevices.git
				synced 2025-10-31 11:56:28 +08:00 
			
		
		
		
	Unuse self-hosted macOS runner (#588)
GitHub-hosted macos runner is M1 by default now.
This commit is contained in:
		
							
								
								
									
										51
									
								
								.github/workflows/ci.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										51
									
								
								.github/workflows/ci.yaml
									
									
									
									
										vendored
									
									
								
							| @@ -42,16 +42,11 @@ jobs: | ||||
|     strategy: | ||||
|       fail-fast: false | ||||
|       matrix: | ||||
|         runs-on: | ||||
|           - macos-latest | ||||
|           - ['self-hosted', 'macOS', 'ARM64'] | ||||
|         go: | ||||
|           - '1.20' | ||||
|           - '1.21' | ||||
|     runs-on: ${{ matrix.runs-on }} | ||||
|     name: Darwin Go ${{ matrix.go }} ${{ join(matrix.runs-on, ' ') }} | ||||
|     env: | ||||
|       HOMEBREW_CACHE: ${{ github.workspace }}/brew-cache | ||||
|     runs-on: macos-latest | ||||
|     name: Darwin Go ${{ matrix.go }} | ||||
|     steps: | ||||
|       - name: Checkout | ||||
|         uses: actions/checkout@v4 | ||||
| @@ -59,48 +54,6 @@ jobs: | ||||
|         uses: actions/setup-go@v5 | ||||
|         with: | ||||
|           go-version: ${{ matrix.go }} | ||||
|  | ||||
|       # Set up local brew only on self-hosted darwin | ||||
|       - name: Checkout Homebrew | ||||
|         if: matrix.runs-on != 'macos-latest' | ||||
|         uses: actions/checkout@v4 | ||||
|         with: | ||||
|           repository: Homebrew/brew | ||||
|           path: homebrew | ||||
|       - name: Local brew cache key | ||||
|         if: matrix.runs-on != 'macos-latest' | ||||
|         id: brew-cache-key | ||||
|         run: echo "key=$(date +'%Y-%U')" | tee ${GITHUB_OUTPUT} # weekly refresh the cache | ||||
|       - name: Cache brew | ||||
|         if: matrix.runs-on != 'macos-latest' | ||||
|         uses: actions/cache@v4 | ||||
|         with: | ||||
|           path: ${{ env.HOMEBREW_CACHE }} | ||||
|           key: ${{ runner.os }}-brew-cache-${{ steps.brew-cache-key.outputs.key }} | ||||
|       - name: Cache local brew taps | ||||
|         if: matrix.runs-on != 'macos-latest' | ||||
|         uses: actions/cache@v4 | ||||
|         with: | ||||
|           path: homebrew/Library/Taps | ||||
|           key: ${{ runner.os }}-brew-taps-${{ steps.brew-cache-key.outputs.key }} | ||||
|       - name: Set up brew to install deps under temporary dir | ||||
|         if: matrix.runs-on != 'macos-latest' | ||||
|         run: | | ||||
|           dir="${GITHUB_WORKSPACE}/homebrew" | ||||
|           cd "${dir}" | ||||
|  | ||||
|           echo "Set up shellenv" >&2 | ||||
|           env="$(./bin/brew shellenv)" | ||||
|           echo "${env}" | tee -a ${GITHUB_ENV} | ||||
|           eval "${env}" | ||||
|  | ||||
|           echo "Set up paths" >&2 | ||||
|           echo "${dir}/bin" | tee -a ${GITHUB_PATH} | ||||
|  | ||||
|           echo "Brew update" >&2 | ||||
|           brew update --force --quiet | ||||
|           chmod -R go-w "$(brew --prefix)/share/zsh" | ||||
|  | ||||
|       - name: Install dependencies | ||||
|         run: | | ||||
|           which brew | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Atsushi Watanabe
					Atsushi Watanabe