Skip to content

Try irgaly/xcode-cache@v1 #100

Try irgaly/xcode-cache@v1

Try irgaly/xcode-cache@v1 #100

Workflow file for this run

---
name: Pull Request
on: [push]
jobs:
check-quality:
name: "πŸ”Ž Check quality"
runs-on: [macos-latest]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run the quality check
run: make check-quality
build-documentation:
name: "πŸ“š Build documentation"
runs-on: [macos-latest]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build the documentation
run: make doc
tests:
name: "πŸ§ͺ Tests"
runs-on: [macos-latest]
strategy:
matrix:
platform: [ios, tvos]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Cache packages
uses: actions/cache@v3
id: packages-cache
with:
path: ~/Library/Caches/org.swift.swiftpm
key: ${{ runner.os }}-packages-${{ hashFiles('**/Package.resolved') }}
restore-keys: ${{ runner.os }}-packages-
- name: Cache packages
uses: irgaly/xcode-cache@v1
with:
key: xcode-cache-deriveddata-${{ github.workflow }}-${{ github.sha }}
restore-keys: xcode-cache-deriveddata-${{ github.workflow }}-
swiftpm-cache-key: pillarbox-spm-${{ hashFiles('Package.resolved') }}
swiftpm-cache-restore-keys: pillarbox-spm-
- name: Run tests
run: |
make test-${{ matrix.platform }}
env:
HAS_PACKAGES_CACHE_HIT: |
${{ steps.packages-cache.outputs.cache-hit == 'true' }}
archive-demos:
name: "πŸ“¦ Archives"
runs-on: [macos-latest]
strategy:
matrix:
platform: [ios, tvos]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Add Apple certificate
run: |
Scripts/add-apple-certificate.sh \
$RUNNER_TEMP \
${{ secrets.KEYCHAIN_PASSWORD }} \
${{ secrets.SRGSSR_APPLE_DEV_CERTIFICATE_B64 }}
- name: Configure environment
run: |
Scripts/configure-environment.sh \
${{ secrets.APP_STORE_CONNECT_API_KEY_B64 }} \
${{ secrets.APPLE_ACCOUNT_INFO_B64 }}
- name: Cache packages
uses: irgaly/xcode-cache@v1
with:
key: xcode-cache-deriveddata-${{ github.workflow }}-${{ github.sha }}
restore-keys: xcode-cache-deriveddata-${{ github.workflow }}-
swiftpm-cache-key: pillarbox-demo-spm-${{ hashFiles('Demo/**/Package.resolved') }}
swiftpm-cache-restore-keys: pillarbox-demo-spm-
- name: Archive the demo
run: |
make archive-demo-${{ matrix.platform }}
env:
HAS_PACKAGES_CACHE_HIT: |
${{ steps.packages-demo-cache.outputs.cache-hit == 'true' }}