Skip to content

Commit

Permalink
Merge pull request #4 from ctreffs/master
Browse files Browse the repository at this point in the history
Add Swift 5+ support + CI integrations
  • Loading branch information
jkolb authored Aug 24, 2019
2 parents 4712dff + 6c27415 commit 8bdd2e5
Show file tree
Hide file tree
Showing 46 changed files with 2,368 additions and 3,149 deletions.
56 changes: 52 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,53 @@
!*.xcodeproj/project.pbxproj
!*.xcodeproj/xcshareddata/
!*.xcworkspace/contents.xcworkspacedata
!default.mode1v3
!default.mode2v3
!default.pbxuser
!default.perspectivev3
**/xcshareddata/WorkspaceSettings.xcsettings
*.dSYM
*.dSYM.zip
*.hmap
*.ipa
*.mode1v3
*.mode2v3
*.moved-aside
*.pbxuser
*.perspectivev3
*.xccheckout
*.xcodeproj/*
*.xcscmblueprint
._*
.accio/
.apdisk
.AppleDB
.AppleDesktop
.AppleDouble
.build/
.com.apple.timemachine.donotpresent
.DocumentRevisions-V100
.DS_Store
.build
Packages
xcuserdata
*.xcworkspace
.fseventsd
.LSOverride
.Spotlight-V100
.swiftpm/xcode/
.TemporaryItems
.Trashes
.VolumeIcon.icns
/*.gcno
build/
Carthage/Build
Dependencies/
DerivedData/
fastlane/Preview.html
fastlane/report.xml
fastlane/screenshots/**/*.png
fastlane/test_output
Icon
iOSInjectionProject/
Network Trash Folder
playground.xcworkspace
Temporary Items
timeline.xctimeline
xcuserdata/
29 changes: 29 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
image: swift:5.0

before_script:
# use the Gitlab CI Job token to login for all git clones on the machine.
- echo -e "machine gitlab.com\nlogin gitlab-ci-token\npassword ${CI_JOB_TOKEN}" > ~/.netrc

stages:
- test
- build_release

build_project:
stage: build_release
script:
- swift package reset
- swift build -c release
tags:
- docker
only:
- master

test_project:
stage: test
variables:
GIT_DEPTH: "50"
script:
- swift package reset
- swift test
tags:
- docker
2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.0
5.0.1
95 changes: 95 additions & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
included:
- Sources
excluded:
- Tests
identifier_name:
excluded:
- id
line_length: 220
number_separator:
minimum_length: 5
opt_in_rules:
#- anyobject_protocol
#- explicit_acl
#- explicit_enum_raw_value
#- explicit_type_interface
#- file_header
#- file_name
#- missing_docs
#- no_extension_access_modifier
#- no_grouping_extension
- array_init
- attributes
- closure_body_length
- closure_end_indentation
- closure_spacing
- collection_alignment
- conditional_returns_on_newline
- contains_over_first_not_nil
- convenience_type
- custom_rules
- discouraged_object_literal
- discouraged_optional_boolean
- discouraged_optional_collection
- empty_count
- empty_string
- empty_xctest_method
- explicit_init
- explicit_self
- explicit_top_level_acl
- extension_access_modifier
- fallthrough
- fatal_error_message
- first_where
- force_unwrapping
- function_default_parameter_at_end
- identical_operands
- implicit_return
- implicitly_unwrapped_optional
- joined_default_parameter
- legacy_random
- let_var_whitespace
- literal_expression_end_indentation
- lower_acl_than_parent
- modifier_order
- multiline_arguments
- multiline_arguments_brackets
- multiline_function_chains
- multiline_literal_brackets
- multiline_parameters
- multiline_parameters_brackets
- nimble_operator
- number_separator
- object_literal
- operator_usage_whitespace
- overridden_super_call
- override_in_extension
- pattern_matching_keywords
- prefixed_toplevel_constant
- private_action
- private_outlet
- prohibited_interface_builder
- prohibited_super_call
- quick_discouraged_call
- quick_discouraged_focused_test
- quick_discouraged_pending_test
- redundant_nil_coalescing
- redundant_type_annotation
- required_enum_case
- single_test_class
- sorted_first_last
- sorted_imports
- static_operator
- strict_fileprivate
- switch_case_on_newline
- toggle_bool
- trailing_closure
- unavailable_function
- unneeded_parentheses_in_closure_argument
- untyped_error_in_catch
- unused_import
- vertical_parameter_alignment_on_call
- vertical_whitespace_between_cases
- vertical_whitespace_closing_braces
- vertical_whitespace_opening_braces
- yoda_condition
13 changes: 13 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
os:
- linux
- osx
language: generic
sudo: required
dist: trusty
osx_image: xcode11
install:
- eval "$(curl -sL https://swiftenv.fuller.li/install.sh)"
script:
- swift package reset
- swift build
- swift test
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ let package = Package(
name: "SGLMath",
products: [
.library(name: "SGLMath", targets: ["SGLMath"]),
.executable(name: "swizgen", targets: ["Tools"]),
.executable(name: "swizgen", targets: ["Tools"])
],
dependencies: [
],
targets: [
.target(name: "SGLMath", dependencies: []),
.target(name: "Tools", dependencies: []),
.testTarget(name: "SGLMathTests", dependencies: ["SGLMath"]),
.testTarget(name: "SGLMathTests", dependencies: ["SGLMath"])
]
)
25 changes: 0 additions & 25 deletions SGLMath.xcodeproj/SGLMathTests_Info.plist

This file was deleted.

25 changes: 0 additions & 25 deletions SGLMath.xcodeproj/SGLMath_Info.plist

This file was deleted.

Loading

0 comments on commit 8bdd2e5

Please sign in to comment.