|
1 | 1 | name: Swift
|
2 | 2 |
|
3 | 3 | on:
|
| 4 | + workflow_dispatch: |
4 | 5 | push:
|
5 | 6 | branches:
|
6 |
| - - master |
| 7 | + - "*" |
7 | 8 | pull_request:
|
8 | 9 | branches:
|
9 | 10 | - "*"
|
10 | 11 |
|
| 12 | +concurrency: |
| 13 | + group: ${{ github.ref }} |
| 14 | + cancel-in-progress: true |
| 15 | + |
11 | 16 | jobs:
|
12 |
| - iOS: |
| 17 | + buildFramework: |
| 18 | + name: Build framework |
13 | 19 | runs-on: macos-12
|
14 | 20 | env:
|
15 |
| - DEVELOPER_DIR: /Applications/Xcode_14.0.app/Contents/Developer |
| 21 | + DEVELOPER_DIR: /Applications/Xcode_14.2.app/Contents/Developer |
16 | 22 | strategy:
|
17 | 23 | 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" |
19 | 31 | steps:
|
20 | 32 | - uses: actions/checkout@v3
|
21 |
| - - name: iOS - ${{ matrix.destination }} |
22 |
| - run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace "Charts.xcworkspace" -scheme "Charts" -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 |
23 | 35 |
|
24 |
| - tvOS: |
| 36 | + buildDemo: |
| 37 | + name: Build demo |
25 | 38 | runs-on: macos-12
|
26 | 39 | env:
|
27 |
| - DEVELOPER_DIR: /Applications/Xcode_14.0.app/Contents/Developer |
| 40 | + DEVELOPER_DIR: /Applications/Xcode_14.2.app/Contents/Developer |
28 | 41 | strategy:
|
29 | 42 | 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" |
31 | 48 | steps:
|
32 | 49 | - uses: actions/checkout@v3
|
33 |
| - - name: tvOS - ${{ matrix.destination }} |
34 |
| - run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace "Charts.xcworkspace" -scheme "Charts" -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 |
35 | 52 |
|
36 |
| - macOS_demo: |
| 53 | + spm: |
| 54 | + name: Test with SPM |
37 | 55 | runs-on: macos-12
|
38 | 56 | env:
|
39 |
| - DEVELOPER_DIR: /Applications/Xcode_14.0.app/Contents/Developer |
| 57 | + DEVELOPER_DIR: /Applications/Xcode_14.2.app/Contents/Developer |
40 | 58 | steps:
|
41 | 59 | - 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 |
44 | 62 |
|
45 |
| - iOS_demo: |
| 63 | + carthage: |
| 64 | + name: Test with carthage |
46 | 65 | runs-on: macos-12
|
47 | 66 | 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 |
52 | 68 | steps:
|
53 | 69 | - 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 |
56 | 72 |
|
57 |
| - spm: |
58 |
| - name: Test with SPM |
| 73 | + cocoapods: |
| 74 | + name: Test with cocoapods |
59 | 75 | runs-on: macos-12
|
60 | 76 | env:
|
61 |
| - DEVELOPER_DIR: /Applications/Xcode_14.0.app/Contents/Developer |
| 77 | + DEVELOPER_DIR: /Applications/Xcode_14.2.app/Contents/Developer |
62 | 78 | steps:
|
63 | 79 | - 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