forked from mac-cain13/R.swift
-
Notifications
You must be signed in to change notification settings - Fork 0
107 lines (101 loc) · 2.79 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
name: Checks
on:
push:
branches: [ master ]
pull_request:
branches: '*'
env:
DEVELOPER_DIR: /Applications/Xcode_11.4.app/Contents/Developer
jobs:
unit-tests:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Pull cache
uses: actions/cache@v1
with:
path: .build
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-
- name: Test
run: swift test -v
test-iOS:
runs-on: macos-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Download build
uses: actions/[email protected]
with:
name: rswift-dev
- name: Put build into place
run: |
mkdir -p build/Debug
mv rswift-dev/rswift build/Debug/rswift
chmod +x build/Debug/rswift
- name: Pull cache
uses: actions/cache@v1
id: pod-cache
with:
path: Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- name: Install pods
if: steps.pod-cache.outputs.cache-hit != 'true'
run: pod install
- name: Test
run: fastlane scan --workspace "ResourceApp.xcworkspace" --scheme "ResourceApp"
test-tvOS:
runs-on: macos-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Download build
uses: actions/[email protected]
with:
name: rswift-dev
- name: Put build into place
run: |
mkdir -p build/Debug
mv rswift-dev/rswift build/Debug/rswift
chmod +x build/Debug/rswift
- name: Pull cache
uses: actions/cache@v1
id: pod-cache
with:
path: Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- name: Install pods
if: steps.pod-cache.outputs.cache-hit != 'true'
run: pod install
- name: Test
run: fastlane scan --workspace "ResourceApp.xcworkspace" --scheme "ResourceApp-tvOS"
build:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Pull cache
uses: actions/cache@v1
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/Rswift.swift
- name: Build
run: swift build -v -c release
- name: Store artifact
uses: actions/upload-artifact@v1
with:
name: rswift-dev
path: .build/release/rswift