Skip to content

Commit 284a778

Browse files
authored
Merge pull request #5070 from danielgindi/update-actions
update ci
2 parents b60d833 + 3d5b031 commit 284a778

File tree

1 file changed

+43
-27
lines changed

1 file changed

+43
-27
lines changed

.github/workflows/swift.yml

+43-27
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,81 @@
11
name: Swift
22

33
on:
4+
workflow_dispatch:
45
push:
56
branches:
6-
- master
7+
- "*"
78
pull_request:
89
branches:
910
- "*"
1011

12+
concurrency:
13+
group: ${{ github.ref }}
14+
cancel-in-progress: true
15+
1116
jobs:
12-
iOS:
17+
buildFramework:
18+
name: Build framework
1319
runs-on: macos-12
1420
env:
15-
DEVELOPER_DIR: /Applications/Xcode_14.0.app/Contents/Developer
21+
DEVELOPER_DIR: /Applications/Xcode_14.2.app/Contents/Developer
1622
strategy:
1723
matrix:
18-
destination: ["OS=16.0,name=iPhone 14 Pro"] #, "OS=14.4,name=iPhone 12 Pro", "OS=12.4,name=iPhone XS", "OS=11.4,name=iPhone X", "OS=10.3.1,name=iPhone SE"]
24+
target:
25+
- destination: "OS=16.2,name=iPhone 14 Pro"
26+
actions: "build test"
27+
- destination: "OS=16.1,name=Apple TV 4K (3rd generation)"
28+
actions: "build test"
29+
- destination: "platform=macOS"
30+
actions: "build"
1931
steps:
2032
- uses: actions/checkout@v3
21-
- name: iOS - ${{ matrix.destination }}
22-
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace "Charts.xcworkspace" -scheme "DGCharts" -destination "${{ matrix.destination }}" clean test | xcpretty
33+
- name: Build framework - ${{ matrix.target.destination }}
34+
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace "Charts.xcworkspace" -scheme "DGCharts" -destination "${{ matrix.target.destination }}" clean ${{ matrix.target.actions }} | xcpretty
2335

24-
tvOS:
36+
buildDemo:
37+
name: Build demo
2538
runs-on: macos-12
2639
env:
27-
DEVELOPER_DIR: /Applications/Xcode_14.0.app/Contents/Developer
40+
DEVELOPER_DIR: /Applications/Xcode_14.2.app/Contents/Developer
2841
strategy:
2942
matrix:
30-
destination: ["OS=16.0,name=Apple TV 4K (2nd generation)"]
43+
target:
44+
- scheme: "ChartsDemo-iOS"
45+
destination: "OS=16.2,name=iPhone 14 Pro"
46+
- scheme: "ChartsDemo-macOS"
47+
destination: "platform=macOS"
3148
steps:
3249
- uses: actions/checkout@v3
33-
- name: tvOS - ${{ matrix.destination }}
34-
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace "Charts.xcworkspace" -scheme "DGCharts" -destination "${{ matrix.destination }}" clean test | xcpretty
50+
- name: Build demo - ${{ matrix.target.destination }}
51+
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace "Charts.xcworkspace" -scheme "${{ matrix.target.scheme }}" -destination "${{ matrix.target.destination }}" clean build | xcpretty
3552

36-
macOS_demo:
53+
spm:
54+
name: Test with SPM
3755
runs-on: macos-12
3856
env:
39-
DEVELOPER_DIR: /Applications/Xcode_14.0.app/Contents/Developer
57+
DEVELOPER_DIR: /Applications/Xcode_14.2.app/Contents/Developer
4058
steps:
4159
- uses: actions/checkout@v3
42-
- name: macOS
43-
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace "Charts.xcworkspace" -scheme "ChartsDemo-macOS" -destination "platform=macOS" clean build | xcpretty
60+
- name: SPM Test
61+
run: swift build
4462

45-
iOS_demo:
63+
carthage:
64+
name: Test with carthage
4665
runs-on: macos-12
4766
env:
48-
DEVELOPER_DIR: /Applications/Xcode_14.0.app/Contents/Developer
49-
strategy:
50-
matrix:
51-
destination: ["OS=16.0,name=iPhone 14 Pro"] #, "OS=14.4,name=iPhone 12 Pro", "OS=12.4,name=iPhone XS", "OS=11.4,name=iPhone X", "OS=10.3.1,name=iPhone SE"]
67+
DEVELOPER_DIR: /Applications/Xcode_14.2.app/Contents/Developer
5268
steps:
5369
- uses: actions/checkout@v3
54-
- name: iOS - ${{ matrix.destination }}
55-
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace "Charts.xcworkspace" -scheme "ChartsDemo-iOS" -destination "${{ matrix.destination }}" clean build | xcpretty
70+
- name: Carthage Test
71+
run: carthage build --use-xcframeworks --no-skip-current
5672

57-
spm:
58-
name: Test with SPM
73+
cocoapods:
74+
name: Test with cocoapods
5975
runs-on: macos-12
6076
env:
61-
DEVELOPER_DIR: /Applications/Xcode_14.0.app/Contents/Developer
77+
DEVELOPER_DIR: /Applications/Xcode_14.2.app/Contents/Developer
6278
steps:
6379
- uses: actions/checkout@v3
64-
- name: SPM Test
65-
run: swift build -c debug
80+
- name: Carthage Test
81+
run: pod lib lint

0 commit comments

Comments
 (0)