-
Notifications
You must be signed in to change notification settings - Fork 2
60 lines (55 loc) · 1.6 KB
/
checks.yml
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
name: Checks
on: [workflow_dispatch, pull_request]
jobs:
swiftformat:
name: SwiftFormat
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- run: swiftformat . --lint --quiet --reporter github-actions-log
swiftlint:
name: SwiftLint
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- name: Install SwiftLint
run: brew install swiftlint
- run: swiftlint --strict --quiet --reporter github-actions-logging
cli:
name: Build Binary
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: .build
key: ${{ runner.os }}-spm-${{ hashFiles('Package.resolved') }}
restore-keys: ${{ runner.os }}-spm-
- name: Select Xcode 15.1
run: sudo xcode-select -s '/Applications/Xcode_15.1.app'
- name: Build
run: swift build -c release
app:
name: Build App
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- name: Select Xcode 15.1
run: sudo xcode-select -s '/Applications/Xcode_15.1.app'
- run: brew install xcbeautify
- name: Build
run: |
xcodebuild \
-workspace XTree.xcworkspace \
-scheme XTree \
-configuration Release \
-destination 'generic/platform=macOS' \
-derivedDataPath build \
-clonedSourcePackagesDirPath "$HOME/Library/Developer/Xcode/DerivedData/XTree" \
| xcbeautify
- uses: actions/upload-artifact@v3
with:
name: XTree
path: build/Build/Products/Release/XTree.app
if-no-files-found: error
retention-days: 1