Skip to content

Commit

Permalink
Deployment updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Apr 7, 2019
1 parent 93d7906 commit fe1e9c5
Show file tree
Hide file tree
Showing 5 changed files with 105 additions and 119 deletions.
6 changes: 2 additions & 4 deletions .github/PromiseKit.podspec
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
Pod::Spec.new do |s|
s.name = "PromiseKit"

`xcodebuild -project PromiseKit.xcodeproj -showBuildSettings` =~ /CURRENT_PROJECT_VERSION = ((\d\.)+\d)/
abort("No version detected") if $1.nil?
s.version = $1
s.version = '0.0.1'

s.source = {
:git => "https://github.com/mxcl/#{s.name}.git",
Expand All @@ -21,7 +19,7 @@ Pod::Spec.new do |s|
s.default_subspecs = 'CorePromise', 'UIKit', 'Foundation'
s.requires_arc = true

s.swift_versions = ['3.1', '3.2', '3.3', '3.4', '4.0', '4.1', '4.2', '5.0']
s.swift_versions = ['3.1', '3.2', '3.3', '3.4', '4.0', '4.1', '4.2', '4.3', '4.4', '5.0']

# CocoaPods requires us to specify the root deployment targets
# even though for us it is nonsense. Our root spec has no
Expand Down
182 changes: 81 additions & 101 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
os: osx
osx_image: xcode10.2
language: swift

branches:
only:
- v7
- master
- v4
- v7
- legacy-1.x
- /^\d+\.\d+\.\d+$/
stages:
- name: pretest
if: type != push OR branch =~ /^\d+\.\d+\.\d+$/
- name: lint
if: NOT branch =~ ^\d+\.\d+\.\d+$
- name: compile
- name: carthage
if: type != push OR branch =~ /^\d+\.\d+\.\d+$/
- name: swiftpm
if: type != push OR branch =~ /^\d+\.\d+\.\d+$/
- name: test
if: type != push OR branch =~ /^\d+\.\d+\.\d+$/
Expand All @@ -19,69 +25,70 @@ stages:
jobs:
include:
- stage: pretest
name: Validate Linux has complete test coverage
name: Validate Linux test coverage completeness
install: swift test --generate-linuxmain -Xswiftc -target -Xswiftc x86_64-apple-macosx10.12
script: git diff --exit-code
os: osx
osx_image: xcode10.1
language: swift

- &carthage
stage: compile
osx_image: xcode9.2
name: Carthage / Xcode 9.2
os: osx
language: objective-c
stage: carthage
osx_image: xcode9
before_script: sed -i '' "s/SWIFT_TREAT_WARNINGS_AS_ERRORS = NO;/SWIFT_TREAT_WARNINGS_AS_ERRORS = YES;/" *.xcodeproj/project.pbxproj
script: carthage build --no-skip-current --configuration Release
name: Swift 4.0.0 / Xcode 9.0
- <<: *carthage
osx_image: xcode9.4
name: Carthage / Xcode 9.4
osx_image: xcode9.1
name: Swift 4.0.2 / Xcode 9.1
- <<: *carthage
osx_image: xcode9.2
name: Swift 4.0.3 / Xcode 9.2
- <<: *carthage
osx_image: xcode9.3
name: Swift 4.1.0 / Xcode 9.3.1
- <<: *carthage
osx_image: xcode9.4
name: Swift 4.1.2 / Xcode 9.4.1
- <<: *carthage
osx_image: xcode10.1
name: Carthage / Xcode 10.1
name: Swift 4.1.50 / Xcode 10.1
- <<: *carthage
osx_image: xcode10.2
name: Swift 4.1.51 / Xcode 10.2

- &pod
stage: lint
osx_image: xcode8.3
env: SWIFT=3.1
name: pod lib lint --swift-version=3.1
os: osx
cache: cocoapods
language: objective-c
before_install: mv .github/PromiseKit.podspec .
install: gem install cocoapods --pre -v 1.7.0.beta.1
install: gem install cocoapods --pre -v 1.7.0.beta.3
script: pod lib lint --subspec=PromiseKit/CorePromise --fail-fast --swift-version=$SWIFT
- <<: *pod
osx_image: xcode9.2
env: SWIFT=3.2
name: pod lib lint --swift-version=3.2
- <<: *pod
osx_image: xcode9.4
env: SWIFT=3.3
name: pod lib lint --swift-version=3.3
- <<: *pod
osx_image: xcode10.1
env: SWIFT=3.4
name: pod lib lint --swift-version=3.4
- <<: *pod
osx_image: xcode9.2
env: SWIFT=4.0
name: pod lib lint --swift-version=4.0
- <<: *pod
osx_image: xcode9.4
env: SWIFT=4.1
name: pod lib lint --swift-version=4.1
- <<: *pod
osx_image: xcode10.1
env: SWIFT=4.2
name: pod lib lint --swift-version=4.2
- <<: *pod
osx_image: xcode10.2
env: SWIFT=4.2
name: pod lib lint --swift-version=5.0
env: SWIFT=4.3
- <<: *pod
osx_image: xcode10.2
env: SWIFT=5.0

- &linux
stage: compile
stage: swiftpm
env: SWIFT_BUILD_VERSION=3 SWIFT_VERSION=4.0.3
name: Linux / Swift 3.2
os: linux
Expand All @@ -91,127 +98,100 @@ jobs:
before_install: eval "$(curl -sL https://swiftenv.fuller.li/install.sh)"
install: swift build -Xswiftc -swift-version -Xswiftc $SWIFT_BUILD_VERSION
script: "true"
osx_image: null
- <<: *linux
env: SWIFT_BUILD_VERSION=3 SWIFT_VERSION=4.1.2
env: SWIFT_BUILD_VERSION=3 SWIFT_VERSION=4.1.3
name: Linux / Swift 3.3
- <<: *linux
env: SWIFT_BUILD_VERSION=3 SWIFT_VERSION=4.2.1
env: SWIFT_BUILD_VERSION=3 SWIFT_VERSION=4.2.4
name: Linux / Swift 3.4
- <<: *linux
env: SWIFT_BUILD_VERSION=4 SWIFT_VERSION=4.0.3
name: Linux / Swift 4.0
stage: test
script: swift test -Xswiftc -swift-version -Xswiftc 4
env: SWIFT_BUILD_VERSION=4 SWIFT_VERSION=4.0.3
name: Linux / Swift 4.0.3
- <<: *linux
env: SWIFT_BUILD_VERSION=4 SWIFT_VERSION=4.1.2
name: Linux / Swift 4.1
env: SWIFT_BUILD_VERSION=4 SWIFT_VERSION=4.1.3
name: Linux / Swift 4.1.3
- <<: *linux
env: SWIFT_BUILD_VERSION=4 SWIFT_VERSION=4.2.2
name: Linux / Swift 4.2
stage: test
script: swift test -Xswiftc -swift-version -Xswiftc 4
env: SWIFT_BUILD_VERSION=4 SWIFT_VERSION=4.2.4
name: Linux / Swift 4.1.50
- <<: *linux
env: SWIFT_BUILD_VERSION=4.2 SWIFT_VERSION=4.2.4
name: Linux / Swift 4.2.4
- <<: *linux
env: SWIFT_BUILD_VERSION=4.2 SWIFT_VERSION=5.0
name: Linux / Swift 4.3
- <<: *linux
env: SWIFT_BUILD_VERSION=5 SWIFT_VERSION=5.0
name: Linux / Swift 5.0
stage: test
script: swift test -Xswiftc -swift-version -Xswiftc 5
name: 'Linux / Swift 5.0 / +Tests'
script: swift test -Xswiftc -swift-version -Xswiftc $SWIFT_BUILD_VERSION

- &test
stage: test
name: macOS / Xcode 9.2 / Swift 4.0.3
osx_image: xcode9.2
os: osx
language: objective-c
env: DST='platform=OS X,arch=x86_64'
before_install: |
set -exo pipefail
gem install xcpretty
install:
xcodebuild -scheme PromiseKit -target PromiseKit -destination "$DST" SWIFT_TREAT_WARNINGS_AS_ERRORS=YES build | xcpretty
script:
xcodebuild -scheme PromiseKit -destination="$DST" -enableCodeCoverage YES SWIFT_VERSION=4 test | xcpretty
after_success:
bash <(curl -s https://codecov.io/bash)
- <<: *test
name: macOS / Xcode 9.4 / Swift 4.1.2
osx_image: xcode9.4
script:
xcodebuild -scheme PromiseKit -destination "$DST" -enableCodeCoverage YES SWIFT_VERSION=4 test | xcpretty
- <<: *test
name: macOS / Xcode 10.1 / Swift 4.2.1
osx_image: xcode10.1
script:
xcodebuild -scheme PromiseKit -destination "$DST" -enableCodeCoverage YES SWIFT_VERSION=4 test | xcpretty
name: macOS / Xcode 10.2
xcode_scheme: PromiseKit
xcode_project: PromiseKit.xcodeproj
xcode_destination: 'platform=macOS'
after_success: bash <(curl -s https://codecov.io/bash)

- <<: *test
name: iOS / Xcode 10.1
osx_image: xcode10.1
env: DST='OS=12.1,name=iPhone SE'
name: iOS / Xcode 10.2
xcode_destination: 'platform=iOS Simulator,OS=12.2,name=iPhone SE'

- <<: *test
name: tvOS / Xcode 10.1
env: DST='OS=12.1,name=Apple TV'
osx_image: xcode10.1
name: tvOS / Xcode 10.2
xcode_destination: 'platform=tvOS Simulator,OS=12.2,name=Apple TV'

- stage: test
name: Promises/A+ (via WebKit JavaScript Bridge)
language: objective-c
os: osx
osx_image: xcode10.1
before_install: |
- name: Promises/A+ (via WebKit JavaScript Bridge)
before_install:
set -exo pipefail
npm install -g npm
gem install xcpretty
install:
bash -c "cd Tests/JS-A+; npm ci &>/dev/null && npm run --hide-modules build"
script: |
set -exo pipefail
script:
xcodebuild -scheme PromiseKit -target PMKJSA+Tests -enableCodeCoverage NO -only-testing:PMKJSA+Tests test | xcpretty
#FIXME ^^ still _builds_ *all* the tests
cache:
directories:
- Tests/JS-A+/build
- Tests/JS-A+/node_modules
cache.directories:
- Tests/JS-A+/build
- Tests/JS-A+/node_modules

- &swiftpm
stage: compile
name: SwiftPM / macOS / Xcode 9.4 / Swift 3.3
os: osx
stage: swiftpm
name: 'macOS / swift-tools-version: 4.0 / Swift 4.1.2'
osx_image: xcode9.4
script: swift build
- <<: *swiftpm
osx_image: xcode10.1
name: SwiftPM / macOS / Xcode 10.1 / Swift 4.2
name: 'macOS / swift-tools-version: 4.2 / Swift 4.2.1'
- <<: *swiftpm
osx_image: xcode10.2
name: 'macOS / swift-tools-version: 5.0 / Swift 5.0.0'

- stage: deploy
install: gem install cocoapods --pre 1.7.0-beta.1
before_script: mv .github/PromiseKit.podspec .
- name: '`pod trunk push`'
stage: deploy
install: gem install cocoapods --pre -v 1.7.0.beta.3
before_script: |
mv .github/PromiseKit.podspec .
sed -i '' "s/s.version = '0.0.1'/s.version = '$TRAVIS_TAG'/g" PromiseKit.podspec
script: |
set -exo pipefail
pod trunk push --verbose --allow-warnings | tee pod.log | ruby -e 'ARGF.each{ print "." }'
# ^^ pipe because Travis times us out if there is no output
# AND `pod` defaults to hardly any output
# BUT `--verbose` generates so much output that Travis kills our script due to *too much* output!
# --allow-warnings because Bolts generates warnings and CocoaPods fails you even if your deps emit warnings
os: osx
osx_image: xcode10.2
language: swift
after_failure: cat pod.log | grep error

- name: Generate Documentation
os: osx
git.depth: false
osx_image: xcode10.1
language: swift
install: gem install jazzy
script: |
set -exo pipefail
jazzy --config .github/jazzy.yml \
--github_url "https://github.com/$TRAVIS_REPO_SLUG" \
--module-version "$TRAVIS_TAG"
git remote update
git fetch origin gh-pages:gh-pages --depth 1
git checkout gh-pages
rm -rf reference/v6
mv foo reference/v6
mv output reference/v6
git add reference/v6
git config user.name "Travis"
git config user.email "[email protected]"
Expand Down
7 changes: 5 additions & 2 deletions PromiseKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
Base,
);
Expand Down Expand Up @@ -930,7 +931,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 6.8.3;
CURRENT_PROJECT_VERSION = 6.8.4;
DEBUG_INFORMATION_FORMAT = dwarf;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
Expand Down Expand Up @@ -991,7 +992,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 6.8.3;
CURRENT_PROJECT_VERSION = 6.8.4;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
Expand Down Expand Up @@ -1070,6 +1071,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_PACKAGE_TYPE = FMWK;
SKIP_INSTALL = YES;
SWIFT_TREAT_WARNINGS_AS_ERRORS = NO;
TARGETED_DEVICE_FAMILY = "1,2,3,4";
};
name = Debug;
Expand Down Expand Up @@ -1123,6 +1125,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_PACKAGE_TYPE = FMWK;
SKIP_INSTALL = YES;
SWIFT_TREAT_WARNINGS_AS_ERRORS = NO;
TARGETED_DEVICE_FAMILY = "1,2,3,4";
};
name = Release;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit fe1e9c5

Please sign in to comment.