[WIP DNR] Measurement Sharing Cache #1007
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/actions/virtual-environments/blob/main/images/macos/macos-11-Readme.md | |
# https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md | |
# https://github.com/actions/cache/blob/ff937cc95032836a535d249de4ce2fc52aeae834/examples.md | |
name: Tests | |
on: | |
pull_request: | |
jobs: | |
spm: | |
name: Swift Package Manager | |
runs-on: macos-15-xlarge | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v1 | |
- name: Read env | |
run: cat .github/workflows/env.properties >> $GITHUB_ENV | |
- name: Switch to Xcode ${{ env.xcode_version }} | |
run: sudo xcode-select -s /Applications/Xcode_${{ env.xcode_version }}.app | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
# Uses version specified in .ruby_version | |
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
- name: Install xcodes | |
run: brew install aria2 xcodesorg/made/xcodes | |
- name: Install iOS 17.2 | |
run: sudo xcodes runtimes install "iOS 17.2" | |
# Build | |
- name: Build | |
run: xcodebuild -scheme "Listable-Package" -destination "platform=iOS Simulator,OS=17.2,name=iPhone SE (3rd generation)" -sdk iphonesimulator build | |
test: | |
name: "iOS ${{ matrix.sdk }}" | |
runs-on: macos-15-xlarge | |
strategy: | |
matrix: | |
include: | |
- sdk: "15.4" | |
simulator_name: iPhone SE (3rd generation) | |
installation_required: true | |
- sdk: "16.2" | |
simulator_name: iPhone SE (3rd generation) | |
installation_required: true | |
- sdk: "17.2" | |
simulator_name: iPhone SE (3rd generation) | |
installation_required: true | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v1 | |
- name: Read env | |
run: cat .github/workflows/env.properties >> $GITHUB_ENV | |
- name: Switch to Xcode ${{ env.xcode_version }} | |
run: sudo xcode-select -s /Applications/Xcode_${{ env.xcode_version }}.app | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
# Uses version specified in .ruby_version | |
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
- name: Install xcodes | |
if: ${{ matrix.installation_required }} | |
run: brew install aria2 xcodesorg/made/xcodes | |
- name: Install iOS ${{ matrix.sdk }} | |
if: ${{ matrix.installation_required }} | |
run: sudo xcodes runtimes install "iOS ${{ matrix.sdk }}" | |
# Build Caching | |
- name: Cache Cocoapods | |
uses: actions/cache@v4 | |
with: | |
path: Pods | |
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} | |
restore-keys: | | |
${{ runner.os }}-pods- | |
# Install & Build | |
- name: Pod Install | |
run: bundle exec pod install --repo-update | |
- name: Build & Test | |
run: | | |
xcodebuild -workspace Demo/Demo.xcworkspace -scheme "Demo" -destination "platform=iOS Simulator,OS=${{ matrix.sdk }},name=${{ matrix.simulator_name }}" build test |