Skip to content

Commit

Permalink
Generate build.js on CI; rm -rf from sources
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Sep 28, 2018
1 parent d3dfe22 commit 3a281ac
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 1,860 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Original file line Diff line number Diff line change
@@ -1,9 +1,9 @@
*.xcodeproj/**/xcuserdata/ *.xcodeproj/**/xcuserdata/
*.xcscmblueprint *.xcscmblueprint
/Carthage /Carthage
/Cartfile.resolved
/.build /.build
.DS_Store .DS_Store
DerivedData DerivedData
/PromiseKit.podspec /PromiseKit.podspec
/Extensions/Carthage /Extensions/Carthage
/Tests/JS-A+/build
15 changes: 11 additions & 4 deletions .travis.yml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -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'} - {os: linux, dist: trusty, sudo: required, language: generic, env: 'SWIFT_BUILD_VERSION=4 SWIFT_VERSION=4.1.2 TEST=1'}
# Swift 4.2 # 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'} - {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: before_install:
if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$TRAVIS_OS_NAME" == "linux" ]; then
eval "$(curl -sL https://swiftenv.fuller.li/install.sh)"; eval "$(curl -sL https://swiftenv.fuller.li/install.sh)";
elif [ "$TEST" == "1" ]; then
brew install node;
fi fi
install: install:
case $PLAT in case $PLAT in
iOS|tvOS|macOS|watchOS) iOS|tvOS|macOS|watchOS)
xcodebuild -scheme PromiseKit -target PromiseKit SWIFT_VERSION=$SWFT -quiet -destination "$DST" SWIFT_TREAT_WARNINGS_AS_ERRORS=YES build; xcodebuild -scheme PromiseKit -target PromiseKit SWIFT_VERSION=$SWFT -quiet -destination "$DST" SWIFT_TREAT_WARNINGS_AS_ERRORS=YES build;
if [ "$TEST" == "1" ]; then if [ "$TEST" == "1" ]; then
pushd Tests/JS-A+;
npm ci;
npm run build;
popd;
xcodebuild -scheme PromiseKit -quiet -destination "$DST" build; xcodebuild -scheme PromiseKit -quiet -destination "$DST" build;
fi;; fi;;
*) *)
Expand All @@ -83,6 +90,6 @@ script:
fi;; fi;;
esac esac
after_success: after_success:
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then if [ "$TRAVIS_OS_NAME" == "osx" ]; then
bash <(curl -s https://codecov.io/bash); bash <(curl -s https://codecov.io/bash);
fi fi
4 changes: 0 additions & 4 deletions PromiseKit.xcodeproj/project.pbxproj
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
C013F740204E5064006B57B1 /* JSUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = C013F73F204E5063006B57B1 /* JSUtils.swift */; }; C013F740204E5064006B57B1 /* JSUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = C013F73F204E5063006B57B1 /* JSUtils.swift */; };
C0244E5E2047A6CB00ACB4AC /* PromiseKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63B0AC571D595E1B00FA21D9 /* PromiseKit.framework */; }; C0244E5E2047A6CB00ACB4AC /* PromiseKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63B0AC571D595E1B00FA21D9 /* PromiseKit.framework */; };
C0244E692047AC9F00ACB4AC /* AllTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0244E682047AC9F00ACB4AC /* AllTests.swift */; }; C0244E692047AC9F00ACB4AC /* AllTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0244E682047AC9F00ACB4AC /* AllTests.swift */; };
C0244E6F2047AF1700ACB4AC /* build in CopyFiles */ = {isa = PBXBuildFile; fileRef = C0244E6D2047AEA400ACB4AC /* build */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */


/* Begin PBXContainerItemProxy section */ /* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -132,7 +131,6 @@
dstPath = ""; dstPath = "";
dstSubfolderSpec = 7; dstSubfolderSpec = 7;
files = ( files = (
C0244E6F2047AF1700ACB4AC /* build in CopyFiles */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
Expand Down Expand Up @@ -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>"; }; 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; }; 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>"; }; 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 */ /* End PBXFileReference section */


/* Begin PBXFrameworksBuildPhase section */ /* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -482,7 +479,6 @@
C0244E6B2047ACAF00ACB4AC /* JS/A+ */ = { C0244E6B2047ACAF00ACB4AC /* JS/A+ */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
C0244E6D2047AEA400ACB4AC /* build */,
C0244E682047AC9F00ACB4AC /* AllTests.swift */, C0244E682047AC9F00ACB4AC /* AllTests.swift */,
C013F7372048E3B6006B57B1 /* MockNodeEnvironment.swift */, C013F7372048E3B6006B57B1 /* MockNodeEnvironment.swift */,
C013F7392049076A006B57B1 /* JSPromise.swift */, C013F7392049076A006B57B1 /* JSPromise.swift */,
Expand Down
6 changes: 3 additions & 3 deletions Tests/JS-A+/AllTests.swift
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ class AllTests: XCTestCase {


func testAll() { func testAll() {


let bundle = Bundle(for: AllTests.self) let scriptPath = URL(fileURLWithPath: #file).deletingLastPathComponent().appendingPathComponent("build/build.js")
guard let scriptPath = bundle.url(forResource: "build", withExtension: "js", subdirectory: "build") else { guard FileManager.default.fileExists(atPath: scriptPath.path) else {
return XCTFail("Couldn't find test suite") return print("Skipping JS-A+: see README for instructions on how to build")
} }


guard let script = try? String(contentsOf: scriptPath) else { guard let script = try? String(contentsOf: scriptPath) else {
Expand Down
1,848 changes: 0 additions & 1,848 deletions Tests/JS-A+/build/build.js

This file was deleted.

0 comments on commit 3a281ac

Please sign in to comment.