Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update ci #5070

Merged
merged 1 commit into from
Jun 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 43 additions & 27 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
@@ -1,65 +1,81 @@
name: Swift

on:
workflow_dispatch:
push:
branches:
- master
- "*"
pull_request:
branches:
- "*"

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
iOS:
buildFramework:
name: Build framework
runs-on: macos-12
env:
DEVELOPER_DIR: /Applications/Xcode_14.0.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_14.2.app/Contents/Developer
strategy:
matrix:
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"]
target:
- destination: "OS=16.2,name=iPhone 14 Pro"
actions: "build test"
- destination: "OS=16.1,name=Apple TV 4K (3rd generation)"
actions: "build test"
- destination: "platform=macOS"
actions: "build"
steps:
- uses: actions/checkout@v3
- name: iOS - ${{ matrix.destination }}
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace "Charts.xcworkspace" -scheme "DGCharts" -destination "${{ matrix.destination }}" clean test | xcpretty
- name: Build framework - ${{ matrix.target.destination }}
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace "Charts.xcworkspace" -scheme "DGCharts" -destination "${{ matrix.target.destination }}" clean ${{ matrix.target.actions }} | xcpretty

tvOS:
buildDemo:
name: Build demo
runs-on: macos-12
env:
DEVELOPER_DIR: /Applications/Xcode_14.0.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_14.2.app/Contents/Developer
strategy:
matrix:
destination: ["OS=16.0,name=Apple TV 4K (2nd generation)"]
target:
- scheme: "ChartsDemo-iOS"
destination: "OS=16.2,name=iPhone 14 Pro"
- scheme: "ChartsDemo-macOS"
destination: "platform=macOS"
steps:
- uses: actions/checkout@v3
- name: tvOS - ${{ matrix.destination }}
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace "Charts.xcworkspace" -scheme "DGCharts" -destination "${{ matrix.destination }}" clean test | xcpretty
- name: Build demo - ${{ matrix.target.destination }}
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace "Charts.xcworkspace" -scheme "${{ matrix.target.scheme }}" -destination "${{ matrix.target.destination }}" clean build | xcpretty

macOS_demo:
spm:
name: Test with SPM
runs-on: macos-12
env:
DEVELOPER_DIR: /Applications/Xcode_14.0.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_14.2.app/Contents/Developer
steps:
- uses: actions/checkout@v3
- name: macOS
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace "Charts.xcworkspace" -scheme "ChartsDemo-macOS" -destination "platform=macOS" clean build | xcpretty
- name: SPM Test
run: swift build

iOS_demo:
carthage:
name: Test with carthage
runs-on: macos-12
env:
DEVELOPER_DIR: /Applications/Xcode_14.0.app/Contents/Developer
strategy:
matrix:
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"]
DEVELOPER_DIR: /Applications/Xcode_14.2.app/Contents/Developer
steps:
- uses: actions/checkout@v3
- name: iOS - ${{ matrix.destination }}
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace "Charts.xcworkspace" -scheme "ChartsDemo-iOS" -destination "${{ matrix.destination }}" clean build | xcpretty
- name: Carthage Test
run: carthage build --use-xcframeworks --no-skip-current

spm:
name: Test with SPM
cocoapods:
name: Test with cocoapods
runs-on: macos-12
env:
DEVELOPER_DIR: /Applications/Xcode_14.0.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_14.2.app/Contents/Developer
steps:
- uses: actions/checkout@v3
- name: SPM Test
run: swift build -c debug
- name: Carthage Test
run: pod lib lint