Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: CI 🧐

on:
push:
branches: [ "develop", "main"]
pull_request:
branches: [ "develop" ]

env:
SECRET_XCCONFIG_PATH: PhotoGether/PhotoGether/Resource/Secrets.xcconfig
CACHED_SPM_DEPENDENCY_PATH: ~/Library/Developer/Xcode/DerivedData/PhotoGether*/SourcePackages/
DERIVED_DATA_PATH: ~/Library/Developer/Xcode/DerivedData

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
name: ✅ CI
runs-on: macos-latest

steps:
- name: 🏷️ Checkout
uses: actions/checkout@v4

- name: 🏷️ List Xcode installations
run: sudo ls -1 /Applications | grep "Xcode"

- name: 🏷️ Select XCode 16.0
run: sudo xcode-select -s /Applications/Xcode_16.0.app/Contents/Developer

- name: 🏷️ Show Xcode version
run: |
sudo xcodebuild -version

- name: 🏷️ Show swift version
run: swift --version

- name: 🏷️ Install SwiftLint
run: brew install swiftlint

- name: 🏷️ Make `Secrets.xcconfig`
run: |
touch ${{ env.SECRET_XCCONFIG_PATH }}
echo "" > ${{ env.SECRET_XCCONFIG_PATH }}

- name: 🏷️ Cache SPM
uses: actions/cache@v3
with:
path: ${{ env.CACHED_SPM_DEPENDENCY_PATH }}
key: ${{ runner.os }}-spm-${{ hashFiles('PhotoGether.xcworkspace/xcshareddata/swiftpm/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-

- name: 🏷️ Cache DerivedData
uses: actions/cache@v3
with:
path: ${{ env.DERIVED_DATA_PATH }}
key: ${{ runner.os }}-iOS_derived_data-xcode_16.0
restore-keys: |
${{ runner.os }}-iOS_derived_data-


- name: 🛠 Start xcode build iOS 18.0 on iPhone 16 Pro
env:
WORKSPACE_PATH: ./PhotoGether/PhotoGether.xcworkspace
run: >
xcodebuild
-workspace ${{ env.WORKSPACE_PATH }}
-scheme PhotoGether
-destination 'platform=iOS Simulator,OS=18.0,name=iPhone 16 Pro'
Loading