Skip to content
This repository has been archived by the owner on Jan 19, 2020. It is now read-only.

Commit

Permalink
Merge pull request #43 from karnikad/master
Browse files Browse the repository at this point in the history
Added support for xcode 8.x
  • Loading branch information
misterfifths committed Jun 16, 2017
2 parents 4cb5269 + a0355f3 commit ad52145
Show file tree
Hide file tree
Showing 30 changed files with 137 additions and 110 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
language: objective-c
osx_image: xcode7
osx_image: xcode8.1

env:
global:
- LANG=en_US.UTF-8

script:
- xctool -workspace CrushBootstrap.xcworkspace -scheme CrushBootstrap-Staging -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone Retina (4-inch)' build test ARCHS=i386 VALID_ARCHS=i386 ONLY_ACTIVE_ARCH=NO GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES GCC_PREPROCESSOR_DEFINITIONS='${inherited} CI=1'
- xcodebuild -workspace CrushBootstrap.xcworkspace -scheme CrushBootstrap-Staging -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 6' build test ARCHS=i386 VALID_ARCHS=i386 ONLY_ACTIVE_ARCH=NO GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES GCC_PREPROCESSOR_DEFINITIONS='${inherited} CI=1'
# >>>bootstrap-only
- ./bootstrap-scripts/tiramisu-expect
- cd AmaroTest
- xctool -workspace AmaroTest.xcworkspace -scheme AmaroTest-Staging -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone Retina (4-inch)' build test ARCHS=i386 VALID_ARCHS=i386 ONLY_ACTIVE_ARCH=NO GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES GCC_PREPROCESSOR_DEFINITIONS='${inherited} CI=1'
# <<<bootstrap-only
- xcodebuild -workspace AmaroTest.xcworkspace -scheme AmaroTest-Staging -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 6' build test ARCHS=i386 VALID_ARCHS=i386 ONLY_ACTIVE_ARCH=NO GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES GCC_PREPROCESSOR_DEFINITIONS='${inherited} CI=1'
# <<<bootstrap-only
127 changes: 40 additions & 87 deletions CrushBootstrap.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Empty file.
49 changes: 48 additions & 1 deletion CrushBootstrap/Other-Sources/Configuration/jspahrsummers-xcconfigs/Base/Common.xcconfig
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,16 @@ CLANG_ENABLE_MODULES = YES
// Enable ARC
CLANG_ENABLE_OBJC_ARC = YES

// Warn about block captures of implicitly autoreleasing parameters.
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES

// Warn about implicit conversions to boolean values that are suspicious.
// For example, writing 'if (foo)' with 'foo' being the name a function will trigger a warning.
CLANG_WARN_BOOL_CONVERSION = YES

// Warn about suspicious uses of the comma operator.
CLANG_WARN_COMMA = YES

// Warn about implicit conversions of constant values that cause the constant value to change,
// either through a loss of precision, or entirely in its meaning.
CLANG_WARN_CONSTANT_CONVERSION = YES
Expand Down Expand Up @@ -56,15 +62,42 @@ CLANG_WARN_IMPLICIT_SIGN_CONVERSION = NO
// For example, this can catch issues when one incorrectly intermixes using NSNumbers and raw integers.
CLANG_WARN_INT_CONVERSION = YES

// Warn about non-literal expressions that evaluate to zero being treated as a null pointer.
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES

// Warn about implicit capture of self (e.g. direct ivar access)
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES

// Warn about implicit conversions from Objective-C literals to values of incompatible type.
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES

// Don't warn about repeatedly using a weak reference without assigning the weak reference to a strong reference. Too many false positives.
CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = NO

// Warn about classes that unintentionally do not subclass a root class (such as NSObject).
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR

// Warn about ranged-based for loops.
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES

// Whether to warn on suspicious implicit conversions
CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES

// Warn about non-prototype declarations.
CLANG_WARN_STRICT_PROTOTYPES = YES

// Warn if an API that is newer than the deployment target is used without "if (@available(...))" guards.
CLANG_WARN_UNGUARDED_AVAILABILITY = YES

// Warn about incorrect uses of nullable values
CLANG_WARN_NULLABLE_TO_NONNULL_CONVERSION = YES

// Warn for missing nullability attributes
CLANG_ANALYZER_NONNULL = YES

// Warn when a non-localized string is passed to a user-interface method expecting a localized string
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES

// Warn about potentially unreachable code
CLANG_WARN_UNREACHABLE_CODE = YES

Expand Down Expand Up @@ -106,6 +139,7 @@ GCC_VERSION = com.apple.compilers.llvm.clang.1_0

// Whether warnings are treated as errors
GCC_TREAT_WARNINGS_AS_ERRORS = YES
SWIFT_TREAT_WARNINGS_AS_ERRORS = YES

// Whether to warn about 64-bit values being implicitly shortened to 32 bits
GCC_WARN_64_TO_32_BIT_CONVERSION = YES
Expand Down Expand Up @@ -171,4 +205,17 @@ GCC_WARN_UNUSED_VARIABLE = YES
RUN_CLANG_STATIC_ANALYZER = YES

// Don't treat unknown warnings as errors, and disable GCC compatibility warnings and unused static const variable warnings
WARNING_CFLAGS = -Wno-error=unknown-warning-option -Wno-gcc-compat -Wno-unused-const-variable -Wno-nullability-completeness
WARNING_CFLAGS = -Wno-error=unknown-warning-option -Wno-gcc-compat -Wno-unused-const-variable

// This setting is on for new projects as of Xcode ~6.3, though it is still not
// the default. It warns if the same variable is declared in two binaries that
// are linked together.
GCC_NO_COMMON_BLOCKS = YES

// This warnings detects when a function will recursively call itself on every
// code path though that function. More information can be found here:
// http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20131216/096004.html
CLANG_WARN_INFINITE_RECURSION = YES

// This warning detects suspicious uses of std::move.
CLANG_WARN_SUSPICIOUS_MOVE = YES
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ GCC_OPTIMIZATION_LEVEL = 0
// Preproccessor definitions to apply to each file compiled
GCC_PREPROCESSOR_DEFINITIONS = DEBUG=1

// Allow @testable imports
ENABLE_TESTABILITY = YES

// Whether to enable link-time optimizations (such as inlining across translation
// units)
LLVM_LTO = NO
Expand All @@ -32,6 +35,11 @@ OTHER_CFLAGS = -ftrapv
// This enables conditional compilation with #if DEBUG
OTHER_SWIFT_FLAGS = -D DEBUG

// Xcode 8 introduced a new flag for conditional compilation
//
// This enables conditional compilation with #if DEBUG
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG

// Whether to strip debugging symbols when copying the built product to its
// final installation location
STRIP_INSTALLED_PRODUCT = NO
Expand Down
Empty file.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@
// Sandboxed apps can't be unit tested since they can't load some random
// external bundle. So we disable sandboxing for testing.
CODE_SIGN_ENTITLEMENTS =

// Allow @testable imports
ENABLE_TESTABILITY = YES
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
// instead.
//

// Disable code signing for successful device builds with Xcode 8. Frameworks do
// need to be signed, but they don't need to be signed at compile time because
// they'll be re-signed when you include them in your app.
CODE_SIGNING_REQUIRED = NO
CODE_SIGN_IDENTITY =

// Whether to strip out code that isn't called from anywhere
DEAD_CODE_STRIPPING = NO

Expand All @@ -29,4 +35,3 @@ SKIP_INSTALL = YES
// to app extensions and linking to frameworks
// that have not been built with this setting enabled.
APPLICATION_EXTENSION_API_ONLY = YES

Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
3 changes: 3 additions & 0 deletions CrushBootstrap/Other-Sources/Configuration/jspahrsummers-xcconfigs/iOS/iOS-Base.xcconfig
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/Frameworks @loader_path/
// The base SDK to use (if no version is specified, the latest version is
// assumed)
SDKROOT = iphoneos

// Supported device families (1 is iPhone, 2 is iPad)
TARGETED_DEVICE_FAMILY = 1,2
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,3 @@

// Apply common settings specific to iOS
#include "iOS-Base.xcconfig"

// Supported device families (1 is iPhone, 2 is iPad)
TARGETED_DEVICE_FAMILY = 1,2
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
//
// This file defines additional configuration options that are appropriate only
// for an application on watchOS. This should be set at the target level for
// for an application on tvOS. This should be set at the target level for
// each project configuration.
//

// Import base application settings
#include "../Base/Targets/Application.xcconfig"

// Apply common settings specific to watchOS
// Apply common settings specific to tvOS
#include "tvOS-Base.xcconfig"
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// This file defines additional configuration options that are appropriate only
// for watchOS. This file is not standalone -- it is meant to be included into
// for tvOS. This file is not standalone -- it is meant to be included into
// a configuration file for a specific type of target.
//

Expand All @@ -10,3 +10,6 @@ LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/Frameworks @loader_path/
// The base SDK to use (if no version is specified, the latest version is
// assumed)
SDKROOT = appletvos

// Supported device families
TARGETED_DEVICE_FAMILY = 3
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// This file defines additional configuration options that are appropriate only
// for a framework on watchOS. This should be set at the target level for each
// for a framework on tvOS. This should be set at the target level for each
// project configuration.
//

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
//
// This file defines additional configuration options that are appropriate only
// for a static library on watchOS. This should be set at the target level for
// for a static library on tvOS. This should be set at the target level for
// each project configuration.
//

// Import base static library settings
#include "../Base/Targets/StaticLibrary.xcconfig"

// Apply common settings specific to watchOS
// Apply common settings specific to tvOS
#include "tvOS-Base.xcconfig"

// Supported device families
TARGETED_DEVICE_FAMILY = 3
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/Frameworks @loader_path/
// The base SDK to use (if no version is specified, the latest version is
// assumed)
SDKROOT = watchos

// Supported device families
TARGETED_DEVICE_FAMILY = 4
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,3 @@

// Apply common settings specific to watchOS
#include "watchOS-Base.xcconfig"

// Supported device families
TARGETED_DEVICE_FAMILY = 4
15 changes: 13 additions & 2 deletions tiramisu
Original file line number Diff line number Diff line change
Expand Up @@ -448,8 +448,12 @@ class Bootstrapper
raise AmaroError.new("Amaro requires version 0.34.1 or later of CocoaPods. You have version #{pod_version}", 'Running "gem update cocoapods" should fix this.') unless pod_version_is_good

dev_tools_path = sh('xcode-select -p', 'The Xcode command line tools don\'t seem to be installed. Running "xcode-select --install" should fix that.', :show_output_on_error => false).strip

raise AmaroError.new('Amaro requires the developer tools path to point to Xcode installation', 'Running "sudo xcode-select --switch /Applications/Xcode.app" should fix this') unless Pathname.new(dev_tools_path).exist?

xcode_version = sh("/usr/libexec/PlistBuddy -c 'Print :CFBundleShortVersionString' '#{dev_tools_path}/../Info.plist'").strip
xcode_version_is_good = Gem::Dependency.new('xcode', '~>7.0').match?('xcode', xcode_version)

xcode_version_is_good = Gem::Dependency.new('xcode', '>=7.0', '<9.0').match?('xcode', xcode_version)
raise AmaroError.new("Amaro requires the default Xcode command line tools to point to Xcode 7.0 or later. Yours point to #{xcode_version}.", 'Install Xcode 7.0 or later, and run "xcode-select" to point to that.') unless xcode_version_is_good


Expand Down Expand Up @@ -509,8 +513,15 @@ class Bootstrapper
end

task 'Merging' do
# We need to use --allow-unrelated-histories only for git 2.9 and above
git_version = %x[git --version | awk -F'[^0-9.]+' '$0=$2'].chomp!
is_new_git = Gem::Dependency.new('git', ">=2.9").match?('git',git_version)
# We're using 'ours' merge option so that our README.md wins
sh("git merge -q --squash -X ours 'remotes/bootstrap/#{@bootstrap_branch}'")
if is_new_git
sh("git merge -q --squash -X ours 'remotes/bootstrap/#{@bootstrap_branch}' --allow-unrelated-histories")
else
sh("git merge -q --squash -X ours 'remotes/bootstrap/#{@bootstrap_branch}'")
end
commit 'Bootstrapping', :add_all => false
end

Expand Down

0 comments on commit ad52145

Please sign in to comment.