Permalink
Browse files

Generate build.js on CI; rm -rf from sources

  • Loading branch information...
mxcl committed Sep 28, 2018
1 parent d3dfe22 commit 3a281ac8e0219e6af411e61dc46ad0adb041c707
Showing with 15 additions and 1,860 deletions.
  1. +1 −1 .gitignore
  2. +11 −4 .travis.yml
  3. +0 −4 PromiseKit.xcodeproj/project.pbxproj
  4. +3 −3 Tests/JS-A+/AllTests.swift
  5. +0 −1,848 Tests/JS-A+/build/build.js
View
@@ -1,9 +1,9 @@
*.xcodeproj/**/xcuserdata/
*.xcscmblueprint
/Carthage
/Cartfile.resolved
/.build
.DS_Store
DerivedData
/PromiseKit.podspec
/Extensions/Carthage
/Tests/JS-A+/build
View
@@ -54,16 +54,23 @@ matrix:
- {os: linux, dist: trusty, sudo: required, language: generic, env: 'SWIFT_BUILD_VERSION=4 SWIFT_VERSION=4.1.2 TEST=1'}
# Swift 4.2
- {os: linux, dist: trusty, sudo: required, language: generic, env: 'SWIFT_BUILD_VERSION=4 SWIFT_VERSION=DEVELOPMENT-SNAPSHOT-2018-06-20-a TEST=1'}
cache:
- Tests/JS-A+/build
before_install:
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
eval "$(curl -sL https://swiftenv.fuller.li/install.sh)";
elif [ "$TEST" == "1" ]; then
brew install node;
fi
install:
case $PLAT in
iOS|tvOS|macOS|watchOS)
xcodebuild -scheme PromiseKit -target PromiseKit SWIFT_VERSION=$SWFT -quiet -destination "$DST" SWIFT_TREAT_WARNINGS_AS_ERRORS=YES build;
if [ "$TEST" == "1" ]; then
pushd Tests/JS-A+;
npm ci;
npm run build;
popd;
xcodebuild -scheme PromiseKit -quiet -destination "$DST" build;
fi;;
*)
@@ -83,6 +90,6 @@ script:
fi;;
esac
after_success:
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then
bash <(curl -s https://codecov.io/bash);
fi
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
bash <(curl -s https://codecov.io/bash);
fi
@@ -84,7 +84,6 @@
C013F740204E5064006B57B1 /* JSUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = C013F73F204E5063006B57B1 /* JSUtils.swift */; };
C0244E5E2047A6CB00ACB4AC /* PromiseKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63B0AC571D595E1B00FA21D9 /* PromiseKit.framework */; };
C0244E692047AC9F00ACB4AC /* AllTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0244E682047AC9F00ACB4AC /* AllTests.swift */; };
C0244E6F2047AF1700ACB4AC /* build in CopyFiles */ = {isa = PBXBuildFile; fileRef = C0244E6D2047AEA400ACB4AC /* build */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -132,7 +131,6 @@
dstPath = "";
dstSubfolderSpec = 7;
files = (
C0244E6F2047AF1700ACB4AC /* build in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -227,7 +225,6 @@
C013F73F204E5063006B57B1 /* JSUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JSUtils.swift; path = "Tests/JS-A+/JSUtils.swift"; sourceTree = "<group>"; };
C0244E622047A6CB00ACB4AC /* PMKJSA+Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "PMKJSA+Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
C0244E682047AC9F00ACB4AC /* AllTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AllTests.swift; path = "Tests/JS-A+/AllTests.swift"; sourceTree = "<group>"; };
C0244E6D2047AEA400ACB4AC /* build */ = {isa = PBXFileReference; lastKnownFileType = folder; name = build; path = "Tests/JS-A+/build"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -482,7 +479,6 @@
C0244E6B2047ACAF00ACB4AC /* JS/A+ */ = {
isa = PBXGroup;
children = (
C0244E6D2047AEA400ACB4AC /* build */,
C0244E682047AC9F00ACB4AC /* AllTests.swift */,
C013F7372048E3B6006B57B1 /* MockNodeEnvironment.swift */,
C013F7392049076A006B57B1 /* JSPromise.swift */,
@@ -13,9 +13,9 @@ class AllTests: XCTestCase {
func testAll() {
let bundle = Bundle(for: AllTests.self)
guard let scriptPath = bundle.url(forResource: "build", withExtension: "js", subdirectory: "build") else {
return XCTFail("Couldn't find test suite")
let scriptPath = URL(fileURLWithPath: #file).deletingLastPathComponent().appendingPathComponent("build/build.js")
guard FileManager.default.fileExists(atPath: scriptPath.path) else {
return print("Skipping JS-A+: see README for instructions on how to build")
}
guard let script = try? String(contentsOf: scriptPath) else {
View

This file was deleted.

Oops, something went wrong.

0 comments on commit 3a281ac

Please sign in to comment.