-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (65 loc) · 2.09 KB
/
Copy pathci.yml
File metadata and controls
79 lines (65 loc) · 2.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: CI
on:
push:
branches: [dev]
pull_request:
branches: [dev]
# ─────────────────────────────────────────
# 프로젝트에 맞게 수정하세요
env:
SCHEME: ARENA # Xcode Scheme 이름
PROJECT: ARENA.xcodeproj # .xcodeproj 파일명
DESTINATION: "platform=iOS Simulator,name=iPhone 16 Pro"
XCODE_VERSION: "16.3" # 사용할 Xcode 버전
# ─────────────────────────────────────────
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
swiftlint:
name: SwiftLint
runs-on: macos-15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache SwiftLint
uses: actions/cache@v4
with:
path: ~/.brew/opt/swiftlint
key: swiftlint-${{ runner.os }}
- name: Install SwiftLint
run: brew install swiftlint
- name: Run SwiftLint
run: swiftlint lint --reporter github-actions-logging
build:
name: Build & Test
runs-on: macos-15
needs: swiftlint
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Select Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ env.XCODE_VERSION }}
- name: Cache SPM packages
uses: actions/cache@v4
with:
path: .build
key: spm-${{ runner.os }}-${{ hashFiles('**/Package.resolved') }}
restore-keys: spm-${{ runner.os }}-
- name: Resolve Swift Package dependencies
run: |
xcodebuild -resolvePackageDependencies \
-project "$PROJECT" \
-scheme "$SCHEME"
- name: Build
run: |
set -o pipefail
xcodebuild build \
-project "$PROJECT" \
-scheme "$SCHEME" \
-destination "$DESTINATION" \
-configuration Debug \
CODE_SIGNING_ALLOWED=NO \
| xcpretty --color