/bot-ci

Automation

Primary LanguageShellApache License 2.0Apache-2.0

Marvim Bot CI

Build Status

This is the part of Marvim's planet sized brain that runs on TravisCI. However, you won't find the "Genuine People Personalities" technology here.

Generated Content

bot-ci generates or updates all of these things:

How it works

  1. The scripts in this repo run as daily CI jobs.
  2. Some of the jobs push updates to the neovim/doc repo. Examples:
  3. neovim/doc has a gh-pages branch. GitHub implicitly creates a website for that repo, which is mapped to the /doc/ path of the main website.

Building Locally

To build locally, execute ./ci/<build script>, where build script is any executable shell script. Override environment variables as necessary.

Example: Generate the user manual HTML:

MAKE_CMD=ninja NEOVIM_DIR=~/neovim-src/ ./ci/user-docu.sh

Example: Generate the vim-patch report:

VIM_SOURCE_DIR=~/vim-src/ NEOVIM_DIR=~/neovim-src/ ./ci/vimpatch-report.sh

Example: Run the automated pull-requests task:

VIM_SOURCE_DIR=~/neovim/.vim-src/ NEOVIM_DIR=~/neovim-src/ ./ci/auto-pullrequest.sh

Testing PRs

Building of PRs is disabled for this repository; builds would always fail because of Travis's security restrictions. You can test your changes in a different way, though. Here's an example on how to test neovim/doc-related changes using Travis CI:

  • Fork the neovim/doc repository to <username>/doc.
  • Using your neovim/bot-ci fork:
    • 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 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.:
# ...
env:
  global:
    - DOC_REPO=<username>/doc
    - NEOVIM_REPO=<username>/neovim
    - NEOVIM_BRANCH=my-branch
    - secure: <output of travis encrypt>
# ...

After committing and pushing these changes to your PR testing branch, Travis will perform the build and push the results to <username>/doc. If you make changes to your PR, don't forget to rebase and push your PR testing branch so that <username>/doc will always be up-to-date.

The above steps can be performed analogously for other repositories a bot-ci script pushes to, e.g. neovim/deps for ci/deps64.sh.

Generated builds

The ci/nightly.sh script auto-generates and publishes builds to https://github.com/neovim/neovim/releases/nightly.

Setting up integration builds

This repo provides a script to download and set up the 64-bit Linux build of Neovim on Travis CI. In the future, it may be extended to support different versions and operating systems.

To use the script in a Travis build, download and evaluate it in .travis.yml:

# ...
before_install:
  - eval "$(curl -Ss https://raw.githubusercontent.com/neovim/bot-ci/master/scripts/travis-setup.sh) nightly-x64"
# ...
script:
  # `nvim` has been added to `$PATH` by the setup script.
  - nvim ...

For an example see the Python-client .travis.yml.