Skip to content

Instantly share code, notes, and snippets.

@Deraen
Last active July 5, 2017 19:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Deraen/f3b25fd459b6af134c0836cde36fb3fb to your computer and use it in GitHub Desktop.
Save Deraen/f3b25fd459b6af134c0836cde36fb3fb to your computer and use it in GitHub Desktop.
cljs-oss CI setup
  1. One process for building Cljs and pushing resulting jar somewhere
  2. Process for each OS project for running tests against the jar
  3. One repo to save the build results

Builds can be triggered (in addition to commits to the repo), by Travis cron daily, or with HTTP endpoint called by other builds, in other projects: https://docs.travis-ci.com/user/triggering-builds/

clojure/clojurescript would trigger process (cljs-oss/clojurescript) to build the new jar file.

cljs-oss/clojurescript triggers new build for each OS project.

Participating OS projects trigger new build from their CI. cljs-oss/lib projects would contain test setup to clone the project and run tests against latest cljs-oss Cljs jar.

OS projects commit the results to cljs-oss/results repository.

Results repository can be published using gh-pages. Can contain JSON files which can be loaded dynamically by other pages (e.g. clojurescript.org), or even static page generated by Jekyll.

                                clojure/clojurescript

                                      +
                                      |
HTTP Trigger                          |
                                      |
                                      v

                                cljs-oss/clojurescript

                            +------------------+
                            |                  |
HTTP Trigger                |                  |
                            |                  |
                            v                  v

                     cljs-oss/reagent      cljs-oss/om
                                +                  +
                            ^   |              ^   |
                            |   |              |   |                cljs-oss/results
HTTP Trigger                |   +------------------+-------------->
                            |                  |                    results are commited here in
                            |                  |                    JSON or such, for website
                            +                  +                    and graphs etc.

                     reagent/reagent       omcljs/om

Alternative

Instead of keeping test configuration of participating OS projects in cljs-oss repos, we could trigger build at their existing CI with custom env variables, pointing to a Cljs jar and version number using which to run the tests with.

Benefits:

  • If lib test configuration (test-runner) or test configuration (env variables, needed system packages) changes, maintainer only needs to update the main project configuration, instead of additionally keeping cljs-oss repo up-to-date.
  • OS project test setup would normally (when commits made the the repo) run tests against their default Cljs version, and against latest Cljs jar from cljs-oss?
    • When test triggered by cljs-oss, only tests against the jar?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment