-
Notifications
You must be signed in to change notification settings - Fork 764
139 lines (131 loc) · 4.34 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
name: Checks
on:
push:
branches: [ main ]
pull_request:
branches: '*'
env:
DEVELOPER_DIR: /Applications/Xcode-16.0.0.app/Contents/Developer
jobs:
unit-tests:
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Pull cache
uses: actions/cache@v4
with:
path: .build
key: ${{ runner.os }}spm${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}spm
- name: Test
run: swift test -v
test-iOS-ResourceApp:
runs-on: self-hosted
needs: build-rswift
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download build
uses: actions/download-artifact@v4.1.7
with:
name: rswift-dev
path: rswift-dev
- name: Put build into place
run: |
mkdir -p .build/release
mv rswift-dev/rswift .build/release/rswift
chmod +x .build/release/rswift
- name: Pull cache
uses: actions/cache@v4
id: podcache-ios
with:
path: Examples/ResourceApp/Pods
key: ${{ runner.os }}pods${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}pods
- name: Install pods
if: steps.podcache-ios.outputs.cache-hit != 'true'
run: pod install --project-directory=Examples/ResourceApp
- name: Test
#run: fastlane scan --workspace "Examples/ResourceApp/ResourceApp.xcworkspace" --scheme "ResourceApp"
run: xcodebuild -workspace Examples/ResourceApp/ResourceApp.xcworkspace -scheme ResourceApp -destination 'platform=iOS Simulator,name=iPhone 16,OS=18.0' test
test-iOS-StaticFrameworks:
runs-on: self-hosted
needs: build-rswift
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download build
uses: actions/download-artifact@v4.1.7
with:
name: rswift-dev
path: rswift-dev
- name: Put build into place
run: |
mkdir -p .build/release
mv rswift-dev/rswift .build/release/rswift
chmod +x .build/release/rswift
- name: Test
#run: fastlane scan --project "Examples/RswiftAppWithStaticFrameworks/RswiftAppWithStaticFrameworks.xcodeproj" --scheme "App"
run: xcodebuild -project Examples/RswiftAppWithStaticFrameworks/RswiftAppWithStaticFrameworks.xcodeproj -scheme App -destination 'platform=iOS Simulator,name=iPhone 16,OS=18.0' test
test-iOS-LocalizedStringApp:
runs-on: self-hosted
needs: build-rswift
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download build
uses: actions/download-artifact@v4.1.7
with:
name: rswift-dev
path: rswift-dev
- name: Put build into place
run: |
mkdir -p .build/release
mv rswift-dev/rswift .build/release/rswift
chmod +x .build/release/rswift
- name: Test
run: xcodebuild -project Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj -scheme LocalizedStringApp -destination 'platform=iOS Simulator,name=iPhone 16,OS=18.0' test
test-tvOS:
runs-on: self-hosted
needs: build-rswift
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download build
uses: actions/download-artifact@v4.1.7
with:
name: rswift-dev
path: rswift-dev
- name: Put build into place
run: |
mkdir -p .build/release
mv rswift-dev/rswift .build/release/rswift
chmod +x .build/release/rswift
- name: Test
#run: fastlane scan --project "Examples/RtvApp/RtvApp.xcodeproj" --scheme "ResourceApp-tvOS"
run: xcodebuild -project Examples/RtvApp/RtvApp.xcodeproj -scheme ResourceApp-tvOS -destination 'platform=tvOS Simulator,name=Apple TV,OS=18.0' test
build-rswift:
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Pull cache
uses: actions/cache@v4
with:
path: .build
key: ${{ runner.os }}spm${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}spm
- name: Set version
run: |
sed -i "" "s/\(static let version = \"\)Unknown\(\"\)/\1Development build: ${GITHUB_SHA}\2/" Sources/rswift/Config.swift
- name: Build
run: swift build -v -c release
- name: Store artifact
uses: actions/upload-artifact@v4
with:
name: rswift-dev
path: .build/release/rswift