Skip to content

Commit 6553c76

Browse files
Refactor make targets for Travis
1 parent 7e2b7cf commit 6553c76

File tree

2 files changed

+14
-25
lines changed

2 files changed

+14
-25
lines changed

.travis.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
language: objective-c
22
osx_image: xcode10.1
33
xcode_project: RMQClient.xcodeproj
4-
xcode_scheme: RMQClient
4+
xcode_scheme: "RMQClient"
55
before_install:
66
- brew update
77
- brew install rabbitmq
@@ -16,9 +16,11 @@ before_script:
1616
- make set_up_test_vhosts
1717
- make set_up_test_users
1818
env:
19-
- TARGET=tests_ios TRAVIS_XCODE_SDK=iphonesimulator12.1 iOS_VERSION=12.1
20-
- TARGET=tests_macos TRAVIS_XCODE_SDK=macosx10.14
21-
script: travis_retry make $TARGET iOS_VERSION=$iOS_VERSION
19+
- TARGET=tests_ios SCHEME="RMQClient" TRAVIS_XCODE_SDK=iphonesimulator12.1 iOS_VERSION=12.1
20+
- TARGET=tests_macos SCHEME="RMQClient" TRAVIS_XCODE_SDK=macosx10.14
21+
- TARGET=tests_ios SCHEME="RMQClient with TLS tests" TRAVIS_XCODE_SDK=iphonesimulator12.1 iOS_VERSION=12.1
22+
- TARGET=tests_macos SCHEME="RMQClient with TLS tests" TRAVIS_XCODE_SDK=macosx10.14
23+
script: travis_retry make $TARGET SCHEME=$ iOS_VERSION=$iOS_VERSION
2224
after_failure:
2325
- cat /usr/local/var/log/rabbitmq/[email protected]
2426
cache:

Makefile

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
tests: tests_iOS tests_MacOS
2-
31
iOS_VERSION := 12.1
42

3+
SCHEME := "RMQClient"
4+
55
RABBITMQCTL := /usr/local/sbin/rabbitmqctl
66
RABBITMQ_PLUGINS := /usr/local/sbin/rabbitmq-plugins
77

@@ -11,39 +11,26 @@ tests_ios: tests_iOS
1111

1212
tests_macos: tests_MacOS
1313

14-
tests_with_tls: tests_iOS_with_tls tests_macos_with_tls lint
15-
1614
tests_iOS: test_dependencies
1715
set -o pipefail && \
1816
xcodebuild test \
1917
-project RMQClient.xcodeproj \
20-
-scheme RMQClient \
21-
-destination 'platform=iOS Simulator,name=iPhone XR,OS=$(iOS_VERSION)' | \
22-
xcpretty
23-
24-
tests_iOS_with_tls: test_dependencies
25-
set -o pipefail && \
26-
xcodebuild test \
27-
-project RMQClient.xcodeproj \
28-
-scheme "RMQClient with TLS tests" \
18+
-scheme "${SCHEME}" \
2919
-destination 'platform=iOS Simulator,name=iPhone XR,OS=$(iOS_VERSION)' | \
3020
xcpretty
3121

3222
tests_MacOS: test_dependencies
3323
set -o pipefail && \
3424
xcodebuild test \
3525
-project RMQClient.xcodeproj \
36-
-scheme RMQClient \
26+
-scheme "${SCHEME}" \
3727
-destination 'platform=OS X,arch=x86_64' | \
3828
xcpretty
3929

40-
tests_MacOS_with_tls: test_dependencies
41-
set -o pipefail && \
42-
xcodebuild test \
43-
-project RMQClient.xcodeproj \
44-
-scheme "RMQClient with TLS tests" \
45-
-destination 'platform=OS X,arch=x86_64' | \
46-
xcpretty
30+
tests_with_tls:
31+
${MAKE} tests_ios SCHEME="RMQClient with TLS tests"
32+
${MAKE} tests_macos SCHEME="RMQClient with TLS tests"
33+
${MAKE} lint
4734

4835
test_dependencies: bootstrap
4936
gem list -i xcpretty || gem install xcpretty

0 commit comments

Comments
 (0)