From 1b8efb5255cc77c891bc3e07eb2eb0859e634fab Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Fri, 21 Jul 2017 09:42:58 -0400 Subject: [PATCH] CI runs SSK tests Clean up Makefile cruft // FREEBIE --- .travis.yml | 2 +- Makefile | 23 ++--------------- Podfile | 1 - Podfile.lock | 2 +- .../Example/TSKitiOSTestApp/Podfile | 2 +- .../Example/TSKitiOSTestApp/Podfile.lock | 8 +++--- SignalServiceKit/Makefile | 25 +++---------------- 7 files changed, 13 insertions(+), 50 deletions(-) diff --git a/.travis.yml b/.travis.yml index f0beb4d6c..e2cc94f6a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,5 +12,5 @@ before_install: - bundle - bundle exec pod repo update --silent # log output is too long without --silent -script: make ci_scan +script: make ci diff --git a/Makefile b/Makefile index da7cdc3ac..807b3c91d 100644 --- a/Makefile +++ b/Makefile @@ -1,20 +1,15 @@ # Make sure we're failing even though we pipe to xcpretty SHELL=/bin/bash -o pipefail -o errexit -# iPhone6, iOS10 -DEVICE_UUID:=$(shell xcrun instruments -s | grep -o "iPhone 6 (10.0) \[.*\]" | grep -o "\[.*\]" | sed "s/^\[\(.*\)\]$$/\1/") -BUILD_DESTINATION = platform=iOS Simulator,id=${DEVICE_UUID} WORKING_DIR = ./ SCHEME = Signal -XCODE_BUILD = xcrun xcodebuild -workspace $(SCHEME).xcworkspace -scheme $(SCHEME) -sdk iphonesimulator .PHONY: build test retest clean dependencies default: test ci: dependencies test - -ci_scan: dependencies scan + cd SignalServiceKit && make ci update_dependencies: bundle exec pod update @@ -30,26 +25,12 @@ build: dependencies cd $(WORKING_DIR) && \ $(XCODE_BUILD) build | xcpretty -scan: +test: bundle exec fastlane scan -test: optional_early_start_simulator - cd $(WORKING_DIR) && \ - $(XCODE_BUILD) \ - -destination '${BUILD_DESTINATION}' \ - test | xcpretty - clean: cd $(WORKING_DIR) && \ rm -fr Carthage/Build && \ $(XCODE_BUILD) \ clean | xcpretty -optional_early_start_simulator: -ifdef EARLY_START_SIMULATOR - echo "Waiting for simulator to start to help with testing timeouts" &&\ - xcrun instruments -w '${DEVICE_UUID}' || true # xcrun can return irrelevant non-zeroes. -else - echo "Not waiting for simulator." -endif - diff --git a/Podfile b/Podfile index 6c9dfcbc6..5ce0150c8 100644 --- a/Podfile +++ b/Podfile @@ -9,7 +9,6 @@ target 'Signal' do #pod 'JSQMessagesViewController', path: '../JSQMessagesViewController' pod 'PureLayout' pod 'Reachability' - #pod 'SignalServiceKit', git: 'https://github.com/WhisperSystems/Signal-iOS.git' pod 'SignalServiceKit', path: '.' pod 'SocketRocket', :git => 'https://github.com/facebook/SocketRocket.git' target 'SignalTests' do diff --git a/Podfile.lock b/Podfile.lock index a0c109b1d..e0c154187 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -161,6 +161,6 @@ SPEC CHECKSUMS: UnionFind: c33be5adb12983981d6e827ea94fc7f9e370f52d YapDatabase: cd911121580ff16675f65ad742a9eb0ab4d9e266 -PODFILE CHECKSUM: 354c63d01f78442b541ac178dff04045b94eee8d +PODFILE CHECKSUM: 13b48854ce4b92e887ffb55d72029fe49b45a789 COCOAPODS: 1.2.1 diff --git a/SignalServiceKit/Example/TSKitiOSTestApp/Podfile b/SignalServiceKit/Example/TSKitiOSTestApp/Podfile index ac9917f84..c2450c69b 100644 --- a/SignalServiceKit/Example/TSKitiOSTestApp/Podfile +++ b/SignalServiceKit/Example/TSKitiOSTestApp/Podfile @@ -4,7 +4,7 @@ source 'https://github.com/CocoaPods/Specs.git' target 'TSKitiOSTestApp' do pod 'SocketRocket', git: 'https://github.com/facebook/SocketRocket.git' pod 'AxolotlKit', git: 'https://github.com/WhisperSystems/SignalProtocolKit.git' - pod 'SignalServiceKit', :path => '../../SignalServiceKit.podspec' + pod 'SignalServiceKit', :path => '../../../SignalServiceKit.podspec' target 'TSKitiOSTestAppTests' do inherit! :search_paths diff --git a/SignalServiceKit/Example/TSKitiOSTestApp/Podfile.lock b/SignalServiceKit/Example/TSKitiOSTestApp/Podfile.lock index c66d52d58..9c62eecb9 100644 --- a/SignalServiceKit/Example/TSKitiOSTestApp/Podfile.lock +++ b/SignalServiceKit/Example/TSKitiOSTestApp/Podfile.lock @@ -104,14 +104,14 @@ PODS: DEPENDENCIES: - AxolotlKit (from `https://github.com/WhisperSystems/SignalProtocolKit.git`) - - SignalServiceKit (from `../../SignalServiceKit.podspec`) + - SignalServiceKit (from `../../../SignalServiceKit.podspec`) - SocketRocket (from `https://github.com/facebook/SocketRocket.git`) EXTERNAL SOURCES: AxolotlKit: :git: https://github.com/WhisperSystems/SignalProtocolKit.git SignalServiceKit: - :path: ../../SignalServiceKit.podspec + :path: "../../../SignalServiceKit.podspec" SocketRocket: :git: https://github.com/facebook/SocketRocket.git @@ -133,13 +133,13 @@ SPEC CHECKSUMS: Mantle: 2fa750afa478cd625a94230fbf1c13462f29395b ProtocolBuffers: d509225eb2ea43d9582a59e94348fcf86e2abd65 SAMKeychain: 1865333198217411f35327e8da61b43de79b635b - SignalServiceKit: 2ad8d86da055e24ac3ea0354ec1d4b13251af28f + SignalServiceKit: 0fa1aa668c13b51bca399ce970bc1f1d9297184b SocketRocket: dbb1554b8fc288ef8ef370d6285aeca7361be31e SQLCipher: 43d12c0eb9c57fb438749618fc3ce0065509a559 TwistedOakCollapsingFutures: f359b90f203e9ab13dfb92c9ff41842a7fe1cd0c UnionFind: c33be5adb12983981d6e827ea94fc7f9e370f52d YapDatabase: cd911121580ff16675f65ad742a9eb0ab4d9e266 -PODFILE CHECKSUM: a0f4507b6b4e6f9da3250901b06187a67236e083 +PODFILE CHECKSUM: 5bfff8cb73ff80b5e5c383fda4dca6aeff2fa8d3 COCOAPODS: 1.2.1 diff --git a/SignalServiceKit/Makefile b/SignalServiceKit/Makefile index 7dd3f196a..79bc654c2 100644 --- a/SignalServiceKit/Makefile +++ b/SignalServiceKit/Makefile @@ -4,19 +4,16 @@ SHELL=/bin/bash -o pipefail -o errexit WORKING_DIR = Example/TSKitiOSTestApp SCHEME = TSKitiOSTestApp -DEVICE_UUID:=$(shell xcrun instruments -s | grep -o "iPhone 6 (9.3) \[.*\]" | grep -o "\[.*\]" | sed "s/^\[\(.*\)\]$$/\1/") -BUILD_DESTINATION = platform=iOS Simulator,id=${DEVICE_UUID} XCODE_BUILD = xcrun xcodebuild -workspace $(SCHEME).xcworkspace -scheme $(SCHEME) -sdk iphonesimulator .PHONY: build test retest clean default: test +ci: test -test: pod_install retest +test: dependencies test -scan_test: pod_install scan - -pod_install: +dependencies: cd $(WORKING_DIR) && \ bundle exec pod install @@ -24,13 +21,7 @@ build: pod_install cd $(WORKING_DIR) && \ $(XCODE_BUILD) build | xcpretty -retest: optional_early_start_simulator - cd $(WORKING_DIR) && \ - $(XCODE_BUILD) \ - -destination '${BUILD_DESTINATION}' \ - test | xcpretty - -scan: +test: bundle exec fastlane scan clean: @@ -38,11 +29,3 @@ clean: $(XCODE_BUILD) \ clean | xcpretty -optional_early_start_simulator: -ifdef EARLY_START_SIMULATOR - echo "Waiting for simulator to start to help with testing timeouts" &&\ - xcrun instruments -w '${DEVICE_UUID}' || true # xcrun can return irrelevant non-zeroes. -else - echo "Not waiting for simulator." -endif -