-
-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test new projects and test against JDK 10 and 11 (#693)
* Add tests for new figwheel projects and simplify test runner * Abstract out build config * Build against JDK 8, 10, 11 * Enable tests for all projects * Add back install * Use Makefiles where they exist * Remove make, as it is not on circle images * Reorder install order
- Loading branch information
1 parent
f0c9bee
commit 4828ee6
Showing
5 changed files
with
74 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,44 @@ | ||
defaults: &defaults | ||
working_directory: ~/lein-figwheel | ||
environment: | ||
LEIN_ROOT: nbd | ||
JVM_OPTS: -Xmx3200m | ||
steps: | ||
- checkout | ||
- run: scripts/install-lein | ||
- run: scripts/dependency-checksum | ||
- restore_cache: | ||
key: figwheel-v1-{{ checksum "checksum.tmp" }} | ||
- run: | ||
name: Install all JARs | ||
command: scripts/install | ||
- run: | ||
name: Test all projects | ||
command: scripts/test-all | ||
- save_cache: | ||
paths: | ||
- ~/.m2 | ||
- ~/.lein/self-installs | ||
key: figwheel-v1-{{ checksum "checksum.tmp" }} | ||
|
||
version: 2 | ||
jobs: | ||
build: | ||
working_directory: ~/lein-figwheel | ||
build-jdk-8: | ||
<<: *defaults | ||
docker: | ||
- image: circleci/clojure:lein-2.7.1 | ||
environment: | ||
LEIN_ROOT: nbd | ||
JVM_OPTS: -Xmx3200m | ||
steps: | ||
- checkout | ||
# See https://discuss.circleci.com/t/cant-checksum-multiple-files-with-slashes-in-the-file-path/20667 for why we do this: | ||
- run: shasum sidecar/project.clj plugin/project.clj support/project.clj > checksum.tmp | ||
- restore_cache: | ||
key: figwheel-{{ checksum "checksum.tmp" }} | ||
- run: scripts/install | ||
- save_cache: | ||
paths: | ||
- ~/.m2 | ||
key: figwheel-{{ checksum "checksum.tmp" }} | ||
- run: | ||
name: Test plugin | ||
command: lein test | ||
working_directory: plugin | ||
- run: | ||
name: Test sidecar | ||
command: lein test | ||
working_directory: sidecar | ||
- run: | ||
name: Test support | ||
command: lein test | ||
working_directory: support | ||
|
||
- image: circleci/openjdk:8-node | ||
build-jdk-10: | ||
<<: *defaults | ||
docker: | ||
- image: circleci/openjdk:10-node | ||
build-jdk-11: | ||
<<: *defaults | ||
docker: | ||
- image: circleci/openjdk:11-ea-node-browsers | ||
workflows: | ||
version: 2 | ||
build-all: | ||
jobs: | ||
- build-jdk-8 | ||
- build-jdk-10 | ||
- build-jdk-11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
# See https://discuss.circleci.com/t/cant-checksum-multiple-files-with-slashes-in-the-file-path/20667 for why we do this: | ||
# Calculates checksums for all Figwheel project dependencies. | ||
|
||
shasum sidecar/project.clj plugin/project.clj support/project.clj figwheel-core/deps.edn figwheel-main/deps.edn figwheel-repl/deps.edn /usr/local/bin/lein > checksum.tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
#!/bin/bash | ||
|
||
pushd support ; lein install ; popd | ||
pushd sidecar ; lein install ; popd | ||
pushd plugin ; lein install ; popd | ||
set -ex | ||
|
||
# We install all JARs so that cross project dependencies work correctly. | ||
for project in "figwheel-repl" "figwheel-core" "figwheel-main" "plugin" "sidecar" "support"; do | ||
pushd ${project} | ||
lein install | ||
popd | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
# Used for CircleCI so that we can have a build matrix of multiple JDK's to test against. | ||
# The Clojure images they provide only have a single JDK 8 available. | ||
sudo wget -O /usr/local/bin/lein https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein | ||
sudo chmod a+x /usr/local/bin/lein |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
# TODO: add "figwheel-core" "figwheel-main" | ||
for project in "figwheel-repl" "plugin" "sidecar" "support"; do | ||
pushd ${project} | ||
lein test | ||
popd | ||
done |