Skip to content

Conversation

@coryan
Copy link
Contributor

@coryan coryan commented Dec 22, 2017

This is mostly to measure how long each phase takes, to guide any
future optimization of the builds, such as caching. It fixes #49.

This is mostly to measure how long each phase takes, to guide any
future optimization of the builds, such as caching.  It fixes googleapis#49.
@coryan coryan requested review from mbrukman and paprat December 22, 2017 18:29
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Dec 22, 2017
CONTRIBUTING.md Outdated
* `DISTRO_VERSION`: the version of the distribution, e.g. `17.04`.
* `CHECK_STYLE`: if set to `yes` the build fails if the code is different
than the output from `clang-format(1)`.
than the output from `clang-format(1)`. Notice that this reformats your
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Notice/Note/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

CONTRIBUTING.md Outdated
* `CXX=g++ CC=gcc` to use GCC.
* `DISTRO`: the Linux distribution, use `ubuntu`, `fedora`, or `centos`.
* `DISTRO_VERSION`: the version of the distribution, e.g. `17.04`.
* `CHECK_STYLE`: if set to `yes` the build fails if the code is different
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/ the build/, the build/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

mkdir -p gccpp/build-output
cd gccpp/build-output
readonly IMAGE="cached-${DISTRO}-${DISTRO_VERSION}"
mkdir -p build-output/${IMAGE}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"build-output/${IMAGE}"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

cd gccpp/build-output
readonly IMAGE="cached-${DISTRO}-${DISTRO_VERSION}"
mkdir -p build-output/${IMAGE}
cd build-output/${IMAGE}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"build-output/${IMAGE}"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" ${CMAKE_FLAGS:-} ..

# If scan-build is enabled we, need to manually compile the dependencies;
echo "travis_fold:start:configure-cmake"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does Travis actually understand that as a directive and this is how it adds those collapsible sections?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# needed; otherwise, we pick errors from things we do not care about. With
# scan-build disabled we compile everything, to test the build as most
# developers will experience it.
echo ${COLOR_YELLOW}"Started build at: " $(date) ${COLOR_RESET}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

else
make -j ${NCPU} all
fi
echo ${COLOR_YELLOW}"Finished build at: " $(date) ${COLOR_RESET}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

_EOF_
exit 1
else
echo ${COLOR_GREEN}"scan-build completed without errors."${COLOR_RESET}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Include the vars inside the string.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

run scan-build locally and examine the HTML output install and configure Docker,
then run:"
DISTRO=ubuntu DISTRO_VERSION=17.04 SCAN_BUILD=yes NCPU=8 TRAVIS_OS_NAME=linux CXX=clang++ CC=clang ./ci/build-linux.sh"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the quote at EOL, if you are outputting all text until _EOF_?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was just a cut&paste / editing mistake.

DISTRO=ubuntu DISTRO_VERSION=17.04 SCAN_BUILD=yes NCPU=8 TRAVIS_OS_NAME=linux CXX=clang++ CC=clang ./ci/build-linux.sh"
The HTML output will be copied into the scan-build-output subdirectory."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the quote at EOL, if you are outputting all text until _EOF_?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@coryan
Copy link
Contributor Author

coryan commented Dec 23, 2017

PTAL.

Copy link
Contributor

@mbrukman mbrukman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@coryan coryan merged commit b46ba1a into googleapis:master Dec 23, 2017
@coryan coryan deleted the break-docker-creation-vs-build branch December 23, 2017 03:39
coryan added a commit to coryan/google-cloud-cpp that referenced this pull request Dec 28, 2017
The documents are generated inside a docker image, in a previous
change (googleapis#138), the path for the generated docs was changed. This
script should have been changed at the same time.

While testing I found out that there was another tiny problem, the
documents were never uploaded because the change detection was
broken.  Fix that too <blush>.
coryan added a commit that referenced this pull request Dec 30, 2017
The documents are generated inside a docker image, in a previous
change (#138), the path for the generated docs was changed. This
script should have been changed at the same time.

While testing I found out that there was another tiny problem, the
documents were never uploaded because the change detection was
broken.  Fix that too <blush>.
coryan added a commit to coryan/google-cloud-cpp that referenced this pull request Jan 8, 2018
mbrukman pushed a commit that referenced this pull request Jan 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider separating image creation and running build inside the image.

3 participants