Skip to content

Commit

Permalink
Update Travis to Xcode 8, stop using xctool, and trim out some minor …
Browse files Browse the repository at this point in the history
…SDK tests.
  • Loading branch information
nolanw committed Oct 2, 2016
1 parent 2c7dc05 commit e7d13e2
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 26 deletions.
95 changes: 78 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,85 @@
language: objective-c
matrix:
include:
- osx_image: xcode7.2
env: TEST_SDK=macosx10.11 TEST_SCHEME="OS X"
- osx_image: xcode7.2
env: TEST_SDK=iphonesimulator9.2
- osx_image: xcode7.1
env: TEST_SDK=iphonesimulator9.1
# Xcode 8: iOS 10, macOS 10.12, tvOS 10, watchOS 3
- osx_image: xcode8
env:
- TEST_SDK="iphonesimulator10.0"
- TEST_SCHEME="iOS"
- DESTINATION="OS=10.0,name=iPhone 7 Plus"
- TEST_ACTION="test"
- osx_image: xcode8
env:
- TEST_SDK="macosx10.12"
- TEST_SCHEME="OS X"
- DESTINATION="arch=x86_64"
- TEST_ACTION="test"
- osx_image: xcode8
env:
- TEST_SDK="appletvsimulator10.0"
- TEST_SCHEME="tvOS"
- DESTINATION="OS=10.0,name=Apple TV 1080p"
- TEST_ACTION="test"
- osx_image: xcode8
env:
- TEST_SDK="watchsimulator3.0"
- TEST_SCHEME="watchOS"
- DESTINATION="OS=3.0,name=Apple Watch - 42mm"
- TEST_ACTION="build"
# Xcode 7.3: iOS 9, OS X 10.11, tvOS 9, watchOS 2
- osx_image: xcode7.3
env:
- TEST_SDK="iphonesimulator9.3"
- TEST_SCHEME="iOS"
- DESTINATION="OS=9.0,name=iPhone 5"
- TEST_ACTION="test"
- osx_image: xcode7.3
env:
- TEST_SDK="macosx10.11"
- TEST_SCHEME="OS X"
- DESTINATION="arch=x86_64"
- TEST_ACTION="test"
- osx_image: xcode7.3
env:
- TEST_SDK="appletvsimulator9.2"
- TEST_SCHEME="tvOS"
- DESTINATION="OS=9.0,name=Apple TV 1080p"
- TEST_ACTION="test"
- osx_image: xcode7.3
env:
- TEST_SDK="watchsimulator2.2"
- TEST_SCHEME="watchOS"
- DESTINATION="OS=2.0,name=Apple Watch - 42mm"
- TEST_ACTION="build"
# Xcode 6.4: iOS 8, OS X 10.10, OS X 10.9
- osx_image: xcode6.4
env: TEST_SDK=iphonesimulator8.4
- osx_image: beta-xcode6.3
env: TEST_SDK=iphonesimulator8.3
- osx_image: beta-xcode6.2
env: TEST_SDK=iphonesimulator8.2
- env: TEST_SDK=macosx10.10 TEST_SCHEME="OS X"
- env: TEST_SDK=macosx10.9 TEST_SCHEME="OS X"
- env: TEST_SDK=iphonesimulator8.1
- env: TEST_SDK=iphonesimulator7.1
- env: TEST_SDK=iphonesimulator7.0
script: xctool -project HTMLReader.xcodeproj -scheme "HTMLReader ${TEST_SCHEME:-iOS}" -sdk $TEST_SDK ${TEST_ACTION:-test}
env:
- TEST_SDK="iphonesimulator8.4"
- TEST_SCHEME="iOS"
- DESTINATION="OS=8.4,name=iPhone 5s"
- TEST_ACTION="test"
- osx_image: xcode6.4
env:
- TEST_SDK="macosx10.10"
- TEST_SCHEME="OS X"
- DESTINATION="arch=x86_64"
- TEST_ACTION="test"
- osx_image: xcode6.4
env:
- TEST_SDK="macosx10.9"
- TEST_SCHEME="OS X"
- DESTINATION="arch=x86_64"
- TEST_ACTION="test"
# Xcode 6.1: iOS 7
- osx_image: beta-xcode6.1
env:
- TEST_SDK="iphonesimulator7.1"
- TEST_SCHEME="iOS"
- DESTINATION="OS=7.1,name=iPhone 4s"
- TEST_ACTION="test"
script:
- set -o pipefail
- xcodebuild -project HTMLReader.xcodeproj -scheme "HTMLReader $TEST_SCHEME" -sdk "$TEST_SDK" -destination "$DESTINATION" "${TEST_ACTION:-test}" | xcpretty
notifications:
email:
- [email protected]
14 changes: 6 additions & 8 deletions HTMLReader.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -833,16 +833,14 @@
};
0D1077761C1AC2DF00CF9B41 = {
CreatedOnToolsVersion = 7.2;
ProvisioningStyle = Manual;
};
1C319BC21C618863000DAA63 = {
CreatedOnToolsVersion = 7.2;
};
1C6C1F4B1A179BF600236076 = {
CreatedOnToolsVersion = 6.1.1;
};
1C88294F18369DD70051653C = {
TestTargetID = 1C88293A18369DD70051653C;
};
1C9513C81A80971100BB2CC9 = {
CreatedOnToolsVersion = 6.1.1;
};
Expand Down Expand Up @@ -943,7 +941,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n";
shellScript = "# Run the unit tests in this test bundle.\nif [[ \"$XCODE_VERSION_MAJOR\" -lt 800 ]]; then\n \"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\nfi\n";
};
/* End PBXShellScriptBuildPhase section */

Expand Down Expand Up @@ -1247,7 +1245,9 @@
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CODE_SIGN_IDENTITY = "";
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = "";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
Expand Down Expand Up @@ -1277,8 +1277,10 @@
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CODE_SIGN_IDENTITY = "";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = "";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
Expand Down Expand Up @@ -1495,7 +1497,6 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 1C8829781836A0A80051653C /* Tests.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/HTMLReader.framework/Versions/A/HTMLReader";
CLANG_ENABLE_MODULES = NO;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
Expand All @@ -1514,7 +1515,6 @@
PRODUCT_BUNDLE_IDENTIFIER = "ca.nolanw.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
TEST_HOST = "$(BUNDLE_LOADER)";
WRAPPER_EXTENSION = xctest;
};
name = Debug;
Expand All @@ -1523,7 +1523,6 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 1C8829781836A0A80051653C /* Tests.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/HTMLReader.framework/Versions/A/HTMLReader";
CLANG_ENABLE_MODULES = NO;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
Expand All @@ -1544,7 +1543,6 @@
PRODUCT_BUNDLE_IDENTIFIER = "ca.nolanw.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
TEST_HOST = "$(BUNDLE_LOADER)";
WRAPPER_EXTENSION = xctest;
};
name = Release;
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ There are C libraries such as [Gumbo][] or [Hubbub][], but you need to shuffle d
HTMLReader continually runs [html5lib][html5lib-tests]'s tokenization and tree construction tests, ignoring the tests for `<template>` (which HTMLReader does not implement). Note that you need to check out the `Tests/html5lib` Git submodule in order to actually run these tests.
HTMLReader is continually tested on iOS versions 7.0, 7.1, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, and 9.2, as well as OS X versions 10.9, 10.10, and 10.11. It should work on down to iOS 5, OS X 10.7, tvOS 9.0, and watchOS 2.0 but no automated testing happens there.
HTMLReader is continually built and tested on iOS versions 7.1, 8.4, 9.3, and 10.0; built and tested on macOS versions 10.9, 10.10, 10.11, and 10.12; built and tested on tvOS versions 9.2 and 10.0; and built on watchOS versions 2.2 and 3.0. It should work on down to iOS 5, macOS 10.7, tvOS 9.0, and watchOS 2.0, but there is no automated testing there (it's ok to file an issue though!).
Given all that: [![Build Status](https://travis-ci.org/nolanw/HTMLReader.png?branch=master)](https://travis-ci.org/nolanw/HTMLReader)
Expand Down
6 changes: 6 additions & 0 deletions Sources/include/HTMLSupport.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
#define __null_unspecified
#endif

// The 10.9.5 SDK has nullability but exports neither NS_ASSUME_NONNULL_BEGIN nor NS_ASSUME_NONNULL_END
#if __has_feature(nullability) && !defined(NS_ASSUME_NONNULL_BEGIN)
#define NS_ASSUME_NONNULL_BEGIN _Pragma("clang assume_nonnull begin")
#define NS_ASSUME_NONNULL_END _Pragma("clang assume_nonnull end")
#endif

// NS_DESIGNATED_INITIALIZER arrived in Xcode 6, but we can use it earlier, and it's handy documentation even when it's unavailable as a compiler attribute.
#ifndef NS_DESIGNATED_INITIALIZER
#if __has_attribute(objc_designated_initializer)
Expand Down

0 comments on commit e7d13e2

Please sign in to comment.