Authored by Jonas Budelmann

adding coveralls

---
language: objective-c
language: objective-c
before_script:
- brew update
- brew install xctool
before_script:
- sudo easy_install cpp-coveralls
- brew update
- brew install xctool
script:
- xctool -workspace 'Masonry.xcworkspace' -scheme 'Masonry iOS' -configuration Debug -sdk iphonesimulator6.0 clean build test
- xctool -workspace 'Masonry.xcworkspace' -scheme 'Masonry Mac' -configuration Debug -sdk macosx10.7 clean build test
script:
- xctool -workspace 'Masonry.xcworkspace' -scheme 'Masonry iOS' -configuration Debug -sdk iphonesimulator6.0 clean build test
- xctool -workspace 'Masonry.xcworkspace' -scheme 'Masonry Mac' -configuration Debug -sdk macosx10.7 clean build test
after_success:
- ./script/coveralls.sh
\ No newline at end of file
... ...
... ... @@ -403,6 +403,7 @@
DDA4D6E717C0253B0076BD87 /* Frameworks */,
DDA4D6E817C0253B0076BD87 /* Headers */,
DDA4D6E917C0253B0076BD87 /* Resources */,
DDCD4D0517CD6A3F00927D72 /* ShellScript */,
);
buildRules = (
);
... ... @@ -574,6 +575,19 @@
shellPath = /bin/sh;
shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n";
};
DDCD4D0517CD6A3F00927D72 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = script/exportenv.sh;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
... ... @@ -787,6 +801,8 @@
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
FRAMEWORK_VERSION = A;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Masonry/Masonry-Prefix.pch";
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
... ...
#!/bin/bash
source env.sh
declare -r gcov_dir="${OBJECT_FILE_DIR_normal}/${CURRENT_ARCH}/"
## ======
generateGcov()
{
# doesn't set output dir to gcov...
cd "${gcov_dir}"
for file in ${gcov_dir}/*.gcda
do
gcov-4.2 "${file}" -o "${gcov_dir}"
done
cd -
}
copyGcovToProjectDir()
{
cp -r "${gcov_dir}" gcov
}
removeGcov()
{
rm -r gcov
}
main()
{
# generate + copy
generateGcov
copyGcovToProjectDir
# post
coveralls ${@+"$@"}
# clean up
removeGcov
}
main ${@+"$@"}
\ No newline at end of file
... ...
export | egrep '( BUILT_PRODUCTS_DIR)|(CURRENT_ARCH)|(OBJECT_FILE_DIR_normal)|(SRCROOT)|(OBJROOT)' > script/env.sh
\ No newline at end of file
... ...