Browse Source

Modernized builds

Stephen Starkey 1 year ago
parent
commit
e1a8c48ecf
6 changed files with 53 additions and 3344 deletions
  1. 2
    0
      .gitignore
  2. 0
    16
      bin/pre-push-tests
  3. 9
    0
      bin/self-sufficient-build
  4. 42
    0
      bin/test-all
  5. 0
    0
      docs/.keep
  6. 0
    3328
      docs/index.html

+ 2
- 0
.gitignore View File

@@ -11,3 +11,5 @@ pom.xml.asc
11 11
 .hg/
12 12
 .idea/
13 13
 defenv.iml
14
+docs/index.html
15
+/*.log

+ 0
- 16
bin/pre-push-tests View File

@@ -1,16 +0,0 @@
1
-#!/bin/bash
2
-
3
-# A script for making sure our code stays clean
4
-
5
-check_return_code () {
6
-  if [ $? -ne 0 ]; then
7
-    echo $1
8
-    exit 1
9
-  fi
10
-}
11
-
12
-lein do clean, spec, ancient :all :no-colors, kibit, bikeshed
13
-check_return_code "Tests failed"
14
-
15
-echo "build successful"
16
-exit 0

+ 9
- 0
bin/self-sufficient-build View File

@@ -0,0 +1,9 @@
1
+#!/usr/bin/env bash
2
+BASEDIR=$(dirname "$0")
3
+
4
+mkdir -p /tmp/ssb &&
5
+  export PATH=/tmp/ssb:$PATH &&
6
+  wget https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein -O /tmp/ssb/lein &&
7
+  chmod +x /tmp/ssb/lein &&
8
+  $BASEDIR/test-all &&
9
+  $BASEDIR/docs

+ 42
- 0
bin/test-all View File

@@ -0,0 +1,42 @@
1
+#!/bin/bash
2
+
3
+# A script for making sure our code stays clean
4
+
5
+lein do clean, compile
6
+
7
+echo SPEC > spec.log
8
+echo KIBIT > kibit.log
9
+echo BIKESHED > bikeshed.log
10
+echo ANCIENT > ancient.log
11
+
12
+echo "Kicking off unit tests..."
13
+lein spec > spec.log 2>&1 &
14
+pids[1]=$!
15
+
16
+echo "Kicking off kibit..."
17
+lein kibit >> kibit.log 2>&1 &
18
+pids[2]=$!
19
+
20
+echo "Kicking off bikeshed..."
21
+lein bikeshed >> bikeshed.log 2>&1 &
22
+pids[3]=$!
23
+
24
+echo "Kicking off ancient..."
25
+lein ancient :all :no-colors >> ancient.log 2>&1 &
26
+pids[4]=$!
27
+
28
+FAIL=0
29
+
30
+for pid in ${pids[*]}; do
31
+  wait $pid || let "FAIL+=1"
32
+done
33
+
34
+if [ "$FAIL" == "0" ];
35
+then
36
+  echo "tests successful"
37
+  exit 0
38
+else
39
+  cat cljtest.log kibit.log bikeshed.log ancient.log
40
+  echo "TESTS FAILED"
41
+  exit 1
42
+fi

+ 0
- 0
docs/.keep View File


+ 0
- 3328
docs/index.html
File diff suppressed because it is too large
View File