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

[RFC] Refactor into standalone build scripts. #14

Merged
merged 1 commit into from
Sep 7, 2014

Conversation

fwalch
Copy link
Member

@fwalch fwalch commented Aug 21, 2014

A build is here, output (from multiple builds) in fwalch/doc2.

From the updated readme:

To generate individual reports locally, execute ./ci/<build script>, where build script is any executable shell script. Override environment variables as necessary, e.g. NEOVIM_REPO=<username>/neovim NEOVIM_BRANCH=my-branch ./ci/clang-report.sh.

I think this also improves high-level readability of report generation quite a bit:

# clang report
DOC_SUBTREE="/reports/clang/"
install_dependencies
clone_doc
clone_neovim
generate_clang_report
commit_doc

Next step is to install only required dependencies for each report (ref #12).

@fwalch fwalch mentioned this pull request Aug 21, 2014
26 tasks
@fwalch fwalch changed the title Refactor into standalone build scripts. [RFC] Refactor into standalone build scripts. Aug 21, 2014
@fwalch fwalch force-pushed the standalone-scripts branch 3 times, most recently from fc0bc5e to 2699a13 Compare August 21, 2014 12:48
# ${BUILD_DIR}

install_dependencies() {
if [[ ${CI} != true ]]; then
Copy link
Member Author

Choose a reason for hiding this comment

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

This environment variable is set by Travis.

@fwalch fwalch force-pushed the standalone-scripts branch 2 times, most recently from 87fe7e2 to 26bc360 Compare August 22, 2014 16:09
@fwalch
Copy link
Member Author

fwalch commented Aug 22, 2014

Rebased from master. Now suppresses all output from git push instead of just using --quiet to make sure that the token won't leak even in case of an error (ref #15).

@fwalch fwalch force-pushed the standalone-scripts branch 2 times, most recently from 89e68d1 to fb05b72 Compare August 23, 2014 11:11
@fwalch
Copy link
Member Author

fwalch commented Aug 23, 2014

Changed to a more detailed commit message and fixed infinite loops on Travis for neovim/bot-ci forks. This occurred because the decrypted GH_TOKEN is of course not accessible in forks, so if Travis was enabled and e.g. this PR's branch was built after pushing, it would repeatedly try to push without the token (resulting in Anonymous access to neovim/doc.git denied.) until Travis timed out the build.

You have to add a separate commit to test PRs on Travis; I added instructions for that to the readme.

From my point of view, this is ready.

@fwalch fwalch force-pushed the standalone-scripts branch 5 times, most recently from 110a555 to ea3f2bf Compare August 23, 2014 11:47
@fwalch
Copy link
Member Author

fwalch commented Sep 5, 2014

@justinmk What do you think of this? There are a lot of modified files in this PR, but not that many code changes. I tried to sum them up in the commit message.

* Enable Travis CI.
* Create a new testing branch based on your PR branch (e.g. `git checkout pr-branch && git checkout -b pr-branch-test`).
* Obtain a [Github personal access token](https://github.com/settings/applications) and encrypt it for Travis using `travis encrypt 'GH_TOKEN=<token>' -r <username>/bot-ci`.
* Modify `.travis.yml` and override environment variables as necessary, e.g.:
Copy link
Member

Choose a reason for hiding this comment

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

Very nice instructions. I learned something :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks :-)

* Move build scripts from ./scripts/ to ./ci/.
* Overridable environment variables for test builds (see README.md).
* Suppress all output from `git push`.
* Fix infinite `git push` loop on PR branches.
justinmk added a commit that referenced this pull request Sep 7, 2014
Refactor into standalone build scripts.
@justinmk justinmk merged commit 70c017c into neovim:master Sep 7, 2014
@fwalch fwalch deleted the standalone-scripts branch September 7, 2014 20:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants