-
Notifications
You must be signed in to change notification settings - Fork 234
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #60 from AliSoftware/feature/circleci2
Upgrade to CircleCI 2
- Loading branch information
Showing
7 changed files
with
336 additions
and
43 deletions.
There are no files selected for viewing
This file contains 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,166 @@ | ||
defaults: | ||
- &default-config | ||
parallelism: 1 | ||
environment: | ||
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts | ||
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results | ||
BUNDLE_PATH: vendor/bundle | ||
macos: | ||
xcode: "9.3.0" | ||
shell: /bin/bash --login -eo pipefail | ||
- &prepare-storage | ||
run: | ||
name: Create directories for artifacts and reports | ||
command: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS | ||
- &restore-gems | ||
restore_cache: | ||
keys: | ||
- gems-{{ checksum "Gemfile.lock" }} | ||
- gems- | ||
- &install-gems | ||
run: | ||
name: Bundle install | ||
command: bundle check || bundle install | ||
environment: | ||
BUNDLE_JOBS: 4 | ||
BUNDLE_RETRY: 3 | ||
- &store-gems | ||
save_cache: | ||
key: gems-{{ checksum "Gemfile.lock" }} | ||
paths: | ||
- vendor/bundle | ||
- &fetch-xcode-logs | ||
run: | ||
name: Getting Xcode activity logs | ||
command: find $HOME/Library/Developer/Xcode/DerivedData -name '*.xcactivitylog' -exec cp {} $CIRCLE_ARTIFACTS/xcactivitylog \; || true | ||
- &store-artifacts | ||
store_artifacts: | ||
path: /tmp/circleci-artifacts | ||
|
||
|
||
version: 2 | ||
jobs: | ||
carthage-build: | ||
<<: *default-config | ||
steps: | ||
- *prepare-storage | ||
- checkout | ||
- *restore-gems | ||
- *install-gems | ||
- *store-gems | ||
- run: | ||
name: Install Carthage | ||
command: bundle exec rake carthage:install | ||
- run: | ||
name: Build | ||
command: bundle exec rake carthage:build | ||
- store_test_results: | ||
path: /tmp/circleci-test-results | ||
- *fetch-xcode-logs | ||
- *store-artifacts | ||
|
||
check-deploy: | ||
<<: *default-config | ||
steps: | ||
- *prepare-storage | ||
- checkout | ||
- *restore-gems | ||
- *install-gems | ||
- *store-gems | ||
- run: | ||
name: Download podspec repo | ||
command: curl https://cocoapods-specs.circleci.com/fetch-cocoapods-repo-from-s3.sh | bash -s cf | ||
- run: | ||
name: Lint podspec | ||
command: bundle exec rake pod:lint | ||
- *store-artifacts | ||
|
||
lint: | ||
<<: *default-config | ||
steps: | ||
- *prepare-storage | ||
- checkout | ||
- *restore-gems | ||
- *install-gems | ||
- *store-gems | ||
- run: | ||
name: Install SwiftLint | ||
command: bundle exec rake swiftlint:install | ||
- run: | ||
name: Lint source code | ||
command: bundle exec rake swiftlint:run | ||
- *store-artifacts | ||
|
||
spm-build-and-test: | ||
<<: *default-config | ||
steps: | ||
- *prepare-storage | ||
- checkout | ||
- *restore-gems | ||
- *install-gems | ||
- *store-gems | ||
- run: | ||
name: Run all tests | ||
command: bundle exec rake spm:test | ||
- *store-artifacts | ||
|
||
xcode-ios-build-and-test: | ||
<<: *default-config | ||
steps: | ||
- *prepare-storage | ||
- checkout | ||
- *restore-gems | ||
- *install-gems | ||
- *store-gems | ||
- run: | ||
name: Build Framework | ||
command: bundle exec rake fmk:ios | ||
- run: | ||
name: Run Tests | ||
command: bundle exec rake demo:ios | ||
- store_test_results: | ||
path: /tmp/circleci-test-results | ||
- *fetch-xcode-logs | ||
- *store-artifacts | ||
|
||
xcode-tvos-build-and-test: | ||
<<: *default-config | ||
steps: | ||
- *prepare-storage | ||
- checkout | ||
- *restore-gems | ||
- *install-gems | ||
- *store-gems | ||
- run: | ||
name: Build Framework | ||
command: bundle exec rake fmk:tvos | ||
- run: | ||
name: Run Tests | ||
command: bundle exec rake demo:tvos | ||
- store_test_results: | ||
path: /tmp/circleci-test-results | ||
- *fetch-xcode-logs | ||
- *store-artifacts | ||
|
||
|
||
workflows: | ||
version: 2 | ||
lint-buildandtest-checkdeploy: | ||
jobs: | ||
- lint | ||
- xcode-ios-build-and-test: | ||
requires: | ||
- lint | ||
- xcode-tvos-build-and-test: | ||
requires: | ||
- lint | ||
- carthage-build: | ||
requires: | ||
- lint | ||
- xcode-ios-build-and-test | ||
- xcode-tvos-build-and-test | ||
- check-deploy: | ||
requires: | ||
- lint | ||
- xcode-ios-build-and-test | ||
- xcode-tvos-build-and-test |
This file contains 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
This file contains 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,15 @@ | ||
# frozen_string_literal: true | ||
|
||
source 'https://rubygems.org' | ||
|
||
# The bare minimum for building, e.g. in Homebrew | ||
group :build do | ||
gem 'rake', '~> 10.5' | ||
gem 'xcpretty' | ||
end | ||
|
||
# In addition to :build, for contributing | ||
group :development do | ||
gem 'cocoapods', '~> 1.5' | ||
gem 'rubocop', '~> 0.58' | ||
end |
This file contains 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,100 @@ | ||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
CFPropertyList (3.0.0) | ||
activesupport (4.2.10) | ||
i18n (~> 0.7) | ||
minitest (~> 5.1) | ||
thread_safe (~> 0.3, >= 0.3.4) | ||
tzinfo (~> 1.1) | ||
ast (2.4.0) | ||
atomos (0.1.2) | ||
claide (1.0.2) | ||
cocoapods (1.5.3) | ||
activesupport (>= 4.0.2, < 5) | ||
claide (>= 1.0.2, < 2.0) | ||
cocoapods-core (= 1.5.3) | ||
cocoapods-deintegrate (>= 1.0.2, < 2.0) | ||
cocoapods-downloader (>= 1.2.0, < 2.0) | ||
cocoapods-plugins (>= 1.0.0, < 2.0) | ||
cocoapods-search (>= 1.0.0, < 2.0) | ||
cocoapods-stats (>= 1.0.0, < 2.0) | ||
cocoapods-trunk (>= 1.3.0, < 2.0) | ||
cocoapods-try (>= 1.1.0, < 2.0) | ||
colored2 (~> 3.1) | ||
escape (~> 0.0.4) | ||
fourflusher (~> 2.0.1) | ||
gh_inspector (~> 1.0) | ||
molinillo (~> 0.6.5) | ||
nap (~> 1.0) | ||
ruby-macho (~> 1.1) | ||
xcodeproj (>= 1.5.7, < 2.0) | ||
cocoapods-core (1.5.3) | ||
activesupport (>= 4.0.2, < 6) | ||
fuzzy_match (~> 2.0.4) | ||
nap (~> 1.0) | ||
cocoapods-deintegrate (1.0.2) | ||
cocoapods-downloader (1.2.1) | ||
cocoapods-plugins (1.0.0) | ||
nap | ||
cocoapods-search (1.0.0) | ||
cocoapods-stats (1.0.0) | ||
cocoapods-trunk (1.3.0) | ||
nap (>= 0.8, < 2.0) | ||
netrc (~> 0.11) | ||
cocoapods-try (1.1.0) | ||
colored2 (3.1.2) | ||
concurrent-ruby (1.0.5) | ||
escape (0.0.4) | ||
fourflusher (2.0.1) | ||
fuzzy_match (2.0.4) | ||
gh_inspector (1.1.3) | ||
i18n (0.9.5) | ||
concurrent-ruby (~> 1.0) | ||
jaro_winkler (1.5.1) | ||
minitest (5.11.3) | ||
molinillo (0.6.5) | ||
nanaimo (0.2.6) | ||
nap (1.1.0) | ||
netrc (0.11.0) | ||
parallel (1.12.1) | ||
parser (2.5.1.2) | ||
ast (~> 2.4.0) | ||
powerpack (0.1.2) | ||
rainbow (3.0.0) | ||
rake (10.5.0) | ||
rouge (2.0.7) | ||
rubocop (0.58.1) | ||
jaro_winkler (~> 1.5.1) | ||
parallel (~> 1.10) | ||
parser (>= 2.5, != 2.5.1.1) | ||
powerpack (~> 0.1) | ||
rainbow (>= 2.2.2, < 4.0) | ||
ruby-progressbar (~> 1.7) | ||
unicode-display_width (~> 1.0, >= 1.0.1) | ||
ruby-macho (1.2.0) | ||
ruby-progressbar (1.9.0) | ||
thread_safe (0.3.6) | ||
tzinfo (1.2.5) | ||
thread_safe (~> 0.1) | ||
unicode-display_width (1.4.0) | ||
xcodeproj (1.5.9) | ||
CFPropertyList (>= 2.3.3, < 4.0) | ||
atomos (~> 0.1.2) | ||
claide (>= 1.0.2, < 2.0) | ||
colored2 (~> 3.1) | ||
nanaimo (~> 0.2.5) | ||
xcpretty (0.2.8) | ||
rouge (~> 2.0.7) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
cocoapods (~> 1.5) | ||
rake (~> 10.5) | ||
rubocop (~> 0.58) | ||
xcpretty | ||
|
||
BUNDLED WITH | ||
1.16.1 |
This file contains 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,5 +1,19 @@ | ||
// swift-tools-version:4.0 | ||
import PackageDescription | ||
|
||
// Note: SPM support is broken until we can add dependency on UIKit. | ||
|
||
let package = Package( | ||
name: "Reusable" | ||
name: "Reusable", | ||
products: [ | ||
.library(name: "Reusable", targets: ["Reusable"]) | ||
], | ||
targets: [ | ||
.target( | ||
name: "Reusable", | ||
path: "", | ||
sources: ["Sources"] | ||
) | ||
], | ||
swiftLanguageVersions: [3, 4] | ||
) |
This file contains 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
Oops, something went wrong.