-
Notifications
You must be signed in to change notification settings - Fork 117
Rewrite for Swift #48
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
Open
fulldecent
wants to merge
15
commits into
ArthurGuibert:master
Choose a base branch
from
fulldecent:main
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
f230d70
Update Xcode 11
fulldecent 9b174d9
Update .gitignore
yaroslav-zhurakovskiy 37f0481
Rewrite code
yaroslav-zhurakovskiy de168d8
Add travis ci
yaroslav-zhurakovskiy 0429945
Update dummy data in the example
yaroslav-zhurakovskiy 8c9d8e2
Merge branch 'yaroslav-zhurakovskiy-swift-5-layout'
fulldecent 03c4354
Update README.md
fulldecent 7a48ace
Update readme for Swift examples
fulldecent de235dc
Merge branch 'master' of github.com:fulldecent/FSLineChart
fulldecent 8e5bbac
Add tests for the case when all data points are equal to zero
yaroslav-zhurakovskiy 3dbe062
Make data type Double instead of Float
yaroslav-zhurakovskiy cd01066
Rework LayoutManager
yaroslav-zhurakovskiy aa86dd9
Merge pull request #5 from yaroslav-zhurakovskiy/swift-5-layout
fulldecent 6e14df3
Implement new swift6-module-template and refactor
fulldecent 7e2d072
Update ci.yml
fulldecent File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,307 @@ | ||
| name: "FSLineChart CI" | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - 'Sources/**' | ||
| - 'Tests/**' | ||
| - '.github/workflows/**' | ||
| - 'Package.swift' | ||
| pull_request: | ||
| paths: | ||
| - 'Sources/**' | ||
| - 'Tests/**' | ||
| - '.github/workflows/**' | ||
| - 'Package.swift' | ||
|
|
||
| concurrency: | ||
| group: ${{ github.ref_name }} | ||
| cancel-in-progress: true | ||
|
|
||
| # Keep this up to date with https://github.com/FSLineChart/FSLineChart/blob/main/.github/workflows/ci.yml | ||
| # And also https://github.com/Alamofire/Alamofire/blob/master/.github/workflows/ci.yml | ||
| jobs: | ||
| macOS: | ||
| name: ${{ matrix.name }} | ||
| runs-on: ${{ matrix.runsOn }} | ||
| env: | ||
| DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer" | ||
| timeout-minutes: 10 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - xcode: "Xcode_15.4" | ||
| runsOn: firebreak | ||
| name: "macOS 14, Xcode 15.4, Swift 5.10" | ||
| testPlan: "macOS" | ||
| outputFilter: xcbeautify --renderer github-actions | ||
| - xcode: "Xcode_15.2" | ||
| runsOn: firebreak | ||
| name: "macOS 13, Xcode 15.2, Swift 5.9.2" | ||
| testPlan: "macOS" | ||
| outputFilter: xcbeautify --renderer github-actions | ||
| - xcode: "Xcode_15.1" | ||
| runsOn: macOS-14 | ||
| name: "macOS 14, Xcode 15.1, Swift 5.9.1" | ||
| testPlan: "macOS" | ||
| outputFilter: xcbeautify --renderer github-actions | ||
| - xcode: "Xcode_15.0.1" | ||
| runsOn: macOS-14 | ||
| name: "macOS 14, Xcode 15.0.1, Swift 5.9.0" | ||
| testPlan: "macOS" | ||
| outputFilter: xcbeautify --renderer github-actions | ||
| - xcode: "Xcode_14.3.1" | ||
| runsOn: macOS-13 | ||
| name: "macOS 13, Xcode 14.3.1, Swift 5.8.0" | ||
| testPlan: "macOS" | ||
| outputFilter: xcbeautify --renderer github-actions | ||
| - xcode: "Xcode_14.2" | ||
| runsOn: macOS-12 | ||
| name: "macOS 12, Xcode 14.2, Swift 5.7.2" | ||
| testPlan: "macOS" | ||
| outputFilter: xcpretty | ||
| - xcode: "Xcode_14.1" | ||
| runsOn: macOS-12 | ||
| name: "macOS 12, Xcode 14.1, Swift 5.7.1" | ||
| testPlan: "macOS" | ||
| outputFilter: xcpretty | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: ${{ matrix.name }} | ||
| run: |- | ||
| set -o pipefail | ||
| env NSUnbufferedIO=YES xcodebuild -project "FSLineChart.xcodeproj" -scheme "Example" -destination "platform=iOS" -testPlan "${{ matrix.testPlan }}" clean test | ${{ matrix.outputFilter }} | ||
| Catalyst: | ||
| name: ${{ matrix.name }} | ||
| runs-on: ${{ matrix.runsOn }} | ||
| env: | ||
| DEVELOPER_DIR: /Applications/${{ matrix.xcode }}.app/Contents/Developer | ||
| timeout-minutes: 10 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - xcode: "Xcode_15.4" | ||
| name: "Catalyst 15.4" | ||
| runsOn: firebreak | ||
| - xcode: "Xcode_15.2" | ||
| name: "Catalyst 15.2" | ||
| runsOn: firebreak | ||
| - xcode: "Xcode_15.1" | ||
| name: "Catalyst 15.1" | ||
| runsOn: macOS-14 | ||
| - xcode: "Xcode_15.0.1" | ||
| name: "Catalyst 15.0" | ||
| runsOn: macOS-14 | ||
| - xcode: "Xcode_14.3.1" | ||
| name: "Catalyst 14.3.1" | ||
| runsOn: macOS-13 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Catalyst | ||
| run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -project "FSLineChart.xcodeproj" -scheme "Example" -destination "platform=iOS" clean test 2>&1 | xcbeautify --renderer github-actions | ||
| iOS: | ||
| name: ${{ matrix.name }} | ||
| runs-on: ${{ matrix.runsOn }} | ||
| env: | ||
| DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer" | ||
| timeout-minutes: 10 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - destination: "OS=17.5,name=iPhone 15 Pro" | ||
| name: "iOS 17.5" | ||
| testPlan: "iOS" | ||
| xcode: "Xcode_15.4" | ||
| runsOn: firebreak | ||
| - destination: "OS=17.2,name=iPhone 15 Pro" | ||
| name: "iOS 17.2" | ||
| testPlan: "iOS" | ||
| xcode: "Xcode_15.2" | ||
| runsOn: firebreak | ||
| - destination: "OS=17.0,name=iPhone 15 Pro" | ||
| name: "iOS 17.0" | ||
| testPlan: "iOS" | ||
| xcode: "Xcode_15.0.1" | ||
| runsOn: macOS-14 | ||
| - destination: "OS=16.4,name=iPhone 14 Pro" | ||
| name: "iOS 16.4" | ||
| testPlan: "iOS" | ||
| xcode: "Xcode_14.3.1" | ||
| runsOn: macOS-13 | ||
| - destination: "OS=15.5,name=iPhone 13 Pro" | ||
| name: "iOS 15.5" | ||
| testPlan: "iOS-NoTS" | ||
| xcode: "Xcode_14.3.1" | ||
| runsOn: firebreak | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: ${{ matrix.name }} | ||
| run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -project "FSLineChart.xcodeproj" -scheme "Example" -destination "${{ matrix.destination }}" -testPlan "${{ matrix.testPlan }}" clean test 2>&1 | xcbeautify --renderer github-actions | ||
| tvOS: | ||
| name: ${{ matrix.name }} | ||
| runs-on: ${{ matrix.runsOn }} | ||
| env: | ||
| DEVELOPER_DIR: /Applications/${{ matrix.xcode }}.app/Contents/Developer | ||
| timeout-minutes: 10 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - destination: "OS=17.5,name=Apple TV" | ||
| name: "tvOS 17.5" | ||
| testPlan: "tvOS" | ||
| xcode: "Xcode_15.4" | ||
| runsOn: firebreak | ||
| - destination: "OS=17.2,name=Apple TV" | ||
| name: "tvOS 17.2" | ||
| testPlan: "tvOS" | ||
| xcode: "Xcode_15.2" | ||
| runsOn: firebreak | ||
| - destination: "OS=17.0,name=Apple TV" | ||
| name: "tvOS 17.0" | ||
| testPlan: "tvOS" | ||
| xcode: "Xcode_15.0.1" | ||
| runsOn: macOS-14 | ||
| - destination: "OS=16.4,name=Apple TV" | ||
| name: "tvOS 16.4" | ||
| testPlan: "tvOS" | ||
| xcode: "Xcode_14.3.1" | ||
| runsOn: macOS-13 | ||
| - destination: "OS=15.4,name=Apple TV" | ||
| name: "tvOS 15.4" | ||
| testPlan: "tvOS-NoTS" | ||
| xcode: "Xcode_14.3.1" | ||
| runsOn: firebreak | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: ${{ matrix.name }} | ||
| run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -project "FSLineChart.xcodeproj" -scheme "Example" -destination "${{ matrix.destination }}" -testPlan "${{ matrix.testPlan }}" clean test 2>&1 | xcbeautify --renderer github-actions | ||
| SPM: | ||
| name: ${{ matrix.name }} | ||
| runs-on: ${{ matrix.runsOn }} | ||
| env: | ||
| DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer" | ||
| timeout-minutes: 10 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - xcode: "Xcode_15.4" | ||
| runsOn: firebreak | ||
| name: "macOS 14, SPM 5.10 Test" | ||
| outputFilter: xcbeautify --renderer github-actions | ||
| - xcode: "Xcode_15.2" | ||
| runsOn: firebreak | ||
| name: "macOS 13, SPM 5.9.2 Test" | ||
| outputFilter: xcbeautify --renderer github-actions | ||
| - xcode: "Xcode_15.1" | ||
| runsOn: macOS-14 | ||
| name: "macOS 14, SPM 5.9.1 Test" | ||
| outputFilter: xcbeautify --renderer github-actions | ||
| - xcode: "Xcode_15.0.1" | ||
| runsOn: macOS-14 | ||
| name: "macOS 14, SPM 5.9.0 Test" | ||
| outputFilter: xcbeautify --renderer github-actions | ||
| - xcode: "Xcode_14.3.1" | ||
| runsOn: macOS-13 | ||
| name: "macOS 13, SPM 5.8.0 Test" | ||
| outputFilter: xcbeautify --renderer github-actions | ||
| - xcode: "Xcode_14.2" | ||
| runsOn: macOS-12 | ||
| name: "macOS 12, SPM 5.7.2 Test" | ||
| outputFilter: xcpretty | ||
| - xcode: "Xcode_14.1" | ||
| runsOn: macOS-12 | ||
| name: "macOS 12, SPM 5.7.1 Test" | ||
| outputFilter: xcpretty | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Test SPM | ||
| run: swift test -c debug | ${{ matrix.outputFilter }} | ||
| Linux: | ||
| name: Linux | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - image: swift:5.8-focal | ||
| - image: swift:5.8-jammy | ||
| - image: swift:5.8-centos7 | ||
| - image: swift:5.8-amazonlinux2 | ||
| - image: swift:5.8-rhel-ubi9 | ||
| - image: swift:5.9-focal | ||
| - image: swift:5.9-jammy | ||
| - image: swift:5.9-centos7 | ||
| - image: swift:5.9-amazonlinux2 | ||
| - image: swift:5.9-rhel-ubi9 | ||
| - image: swiftlang/swift:nightly-focal | ||
| - image: swiftlang/swift:nightly-jammy | ||
| - image: swiftlang/swift:nightly-amazonlinux2 | ||
| container: | ||
| image: ${{ matrix.image }} | ||
| timeout-minutes: 10 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: ${{ matrix.image }} | ||
| run: swift build --build-tests -c debug | ||
| Android: | ||
| name: Android | ||
| uses: hggz/swift-android-sdk/.github/workflows/sdks.yml@ci | ||
| strategy: | ||
| fail-fast: false | ||
| with: | ||
| target-repo: ${{ github.repository }} | ||
| checkout-hash: ${{ github.sha }} | ||
| Windows: | ||
| name: ${{ matrix.name }} | ||
| runs-on: windows-latest | ||
| timeout-minutes: 10 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - branch: swift-5.8-release | ||
| tag: 5.8-RELEASE | ||
| name: Windows Swift 5.8 | ||
| - branch: swift-5.9-release | ||
| tag: 5.9-RELEASE | ||
| name: Windows Swift 5.9 | ||
| - branch: swift-5.10-release | ||
| tag: 5.10-RELEASE | ||
| name: Windows Swift 5.10 | ||
| steps: | ||
| - name: Setup | ||
| uses: compnerd/gha-setup-swift@main | ||
| with: | ||
| branch: ${{ matrix.branch }} | ||
| tag: ${{ matrix.tag }} | ||
| - name: Clone | ||
| uses: actions/checkout@v4 | ||
| - name: SPM ${{ matrix.name }} | ||
| run: | | ||
| swift build --build-tests -c debug -Xlinker /INCREMENTAL:NO -v | ||
| CodeQL: | ||
| name: Analyze with CodeQL | ||
| runs-on: macOS-13 | ||
| env: | ||
| DEVELOPER_DIR: "/Applications/Xcode_14.3.1.app/Contents/Developer" | ||
| timeout-minutes: 10 | ||
| steps: | ||
| - name: Clone | ||
| uses: actions/checkout@v4 | ||
| - name: Initialize CodeQL | ||
| uses: github/codeql-action/init@v2 | ||
| with: | ||
| languages: swift | ||
| - name: Build macOS | ||
| run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -project "FSLineChart.xcodeproj" -scheme "Example" -destination "platform=macOS" clean build | xcpretty | ||
| - name: Perform CodeQL Analysis | ||
| uses: github/codeql-action/analyze@v2 | ||
| with: | ||
| category: "/language:swift" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,26 +1,62 @@ | ||
| # Xcode | ||
| # | ||
| build/ | ||
| *.pbxuser | ||
| !default.pbxuser | ||
| *.mode1v3 | ||
| !default.mode1v3 | ||
| *.mode2v3 | ||
| !default.mode2v3 | ||
| *.perspectivev3 | ||
| !default.perspectivev3 | ||
| xcuserdata | ||
| *.xccheckout | ||
| *.moved-aside | ||
| DerivedData | ||
| # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore | ||
|
|
||
| ## User settings | ||
| xcuserdata/ | ||
|
|
||
| ## Obj-C/Swift specific | ||
| *.hmap | ||
|
|
||
| ## App packaging | ||
| *.ipa | ||
| *.xcuserstate | ||
| *.dSYM.zip | ||
| *.dSYM | ||
|
|
||
| ## Playgrounds | ||
| timeline.xctimeline | ||
| playground.xcworkspace | ||
|
|
||
| # Swift Package Manager | ||
| # | ||
| # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. | ||
| # Packages/ | ||
| # Package.pins | ||
| # Package.resolved | ||
| # *.xcodeproj | ||
| # | ||
| # Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata | ||
| # hence it is not needed unless you have added a package configuration file to your project | ||
| # .swiftpm | ||
|
|
||
| .build/ | ||
|
|
||
| # CocoaPods | ||
| # | ||
| # We recommend against adding the Pods directory to your .gitignore. However | ||
| # you should judge for yourself, the pros and cons are mentioned at: | ||
| # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control | ||
| # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control | ||
| # | ||
| # Pods/ | ||
| # | ||
| # Add this line if you want to avoid checking in source code from the Xcode workspace | ||
| # *.xcworkspace | ||
|
|
||
| # Carthage | ||
| # | ||
| # Add this line if you want to avoid checking in source code from Carthage dependencies. | ||
| # Carthage/Checkouts | ||
|
|
||
| Carthage/Build/ | ||
|
|
||
| # fastlane | ||
| # | ||
| # It is recommended to not store the screenshots in the git repo. | ||
| # Instead, use fastlane to re-generate the screenshots whenever they are needed. | ||
| # For more information about the recommended setup visit: | ||
| # https://docs.fastlane.tools/best-practices/source-control/#source-control | ||
|
|
||
| fastlane/report.xml | ||
| fastlane/Preview.html | ||
| fastlane/screenshots/**/*.png | ||
| fastlane/test_output |
2 changes: 1 addition & 1 deletion
2
...ject.xcworkspace/contents.xcworkspacedata → ...kage.xcworkspace/contents.xcworkspacedata
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is Alamofire mentioned? This shouldn't be a dependency or related at all