Skip to content

Commit

Permalink
Replace Carthage support with bazel support (#17)
Browse files Browse the repository at this point in the history
* Add a more thorough kokoro script that supports running on all available simulators.

* More flexible script.

* Even more thorough.

* Support xcode 8 and 9 only.

* Minor change.

* Formatting cleanup.

* Add comments and general cleanup to the script.

* Add stricter warning flags.

* Run tests and builds against iphoneos as well.

* More fixes.

* Rename config to warnings.

* Remove comments.

* Use versioned test runner.

* Remove carthage dependency.

* Add bazel support.

* Use v2.0.0

* Formatting.

* Bump kokoro script.
  • Loading branch information
jverkoey authored and randallli committed Oct 6, 2017
1 parent 8198bd5 commit dc45a1a
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 472 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
docs/
bazel-*
.kokoro-ios-runner

# Xcode
#
Expand Down
18 changes: 9 additions & 9 deletions .kokoro
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

# Fail on any error.
set -e
# Display commands to stderr.
set -x

gem install xcpretty --no-rdoc --no-ri --no-document --quiet
if [ ! -d .kokoro-ios-runner ]; then
git clone https://github.com/material-foundation/kokoro-ios-runner.git .kokoro-ios-runner
fi

sudo xcode-select --switch /Applications/Xcode_8.2.app/Contents/Developer
xcodebuild -version
pushd .kokoro-ios-runner
git fetch > /dev/null
git checkout v2.1.0 > /dev/null
popd

cd github/repo
xcodebuild clean build -project CatalogByConvention/CatalogByConvention.xcodeproj -sdk "iphonesimulator" | xcpretty
./.kokoro-ios-runner/bazel.sh //:CatalogByConvention

# Enable this if and when we have unit tests.
#bash <(curl -s https://codecov.io/bash)
echo "Success!"
39 changes: 39 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Description:
# Tools for building a Catalog by Convention.

licenses(["notice"]) # Apache 2.0

exports_files(["LICENSE"])

objc_library(
name = "CatalogByConvention",
srcs = glob([
"src/*.m",
"src/private/*.m",
]),
hdrs = glob([
"src/*.h",
"src/private/*.h",
]),
includes = ["src"],
visibility = ["//visibility:public"],
copts = [
"-Wall", # Standard known-to-be-bugs warnings.
"-Wcast-align", # Casting a pointer such that alignment is broken.
"-Wconversion", # Numeric conversion warnings.
"-Wdocumentation", # Documentation checks.
"-Werror", # All warnings as errors.
"-Wextra", # Many useful extra warnings.
"-Wimplicit-atomic-properties", # Dynamic properties should be non-atomic.
"-Wmissing-prototypes", # Global function is defined without a previous prototype.
"-Wno-error=deprecated", # Deprecation warnings are never errors.
"-Wno-error=deprecated-implementations", # Deprecation warnings are never errors.
"-Wno-sign-conversion", # Do not warn on sign conversions.
"-Wno-unused-parameter", # Do not warn on unused parameters.
"-Woverlength-strings", # Strings longer than the C maximum.
"-Wshadow", # Local variable shadows another variable, parameter, etc.
"-Wstrict-selector-match", # Compiler can't figure out the right selector.
"-Wundeclared-selector", # Compiler doesn't see a selector.
"-Wunreachable-code", # Code will never be reached.
]
)
Loading

0 comments on commit dc45a1a

Please sign in to comment.