Permalink
Browse files

Allow Contrib libs to exclude JDKs and Clojure versions

New ci_data.clj options for matrix test builds of contrib libraries:

  :min-clojure  Clojure version string like "1.3.0", the minimum
                version this library supports. Matches strings in the
                :clojure-versions list

  :exclude-jdk  Set of JDK names like "IBM JDK 1.5" to exclude from
                the matrix build. Matches :name strings in the :jdks
                list.
  • Loading branch information...
1 parent e1c0ab6 commit eb4d0255f7b8f18e80dfd72c60bd8275c10de437 @stuartsierra stuartsierra committed Feb 16, 2013
Showing with 55 additions and 13 deletions.
  1. +7 −7 ci_data.clj
  2. +16 −1 generator/src/main/clojure/clojure/build/ci/generator.clj
  3. +32 −5 hudson/config.xml
View
14 ci_data.clj
@@ -55,19 +55,19 @@
[{:name "algo.monads" :owners ["konradhinsen"]}
{:name "algo.generic" :owners ["konradhinsen"]}
{:name "core.incubator" :owners []}
- {:name "core.logic" :owners ["davidnolen"]}
- {:name "core.match" :owners ["davidnolen"]}
+ {:name "core.logic" :owners ["davidnolen"] :min-clojure "1.3.0"}
+ {:name "core.match" :owners ["davidnolen"] :min-clojure "1.3.0"}
{:name "core.unify" :owners ["fogus"]}
{:name "core.memoize" :owners ["fogus"]}
{:name "core.cache" :owners ["fogus"]}
{:name "core.contracts" :owners ["fogus"]}
- {:name "data.codec" :owners ["ataggart"]}
+ {:name "data.codec" :owners ["ataggart"] :min-clojure "1.3.0"}
{:name "data.csv" :owners ["jonasenlund"]}
- {:name "data.finger-tree" :owners ["Chouser"]}
+ {:name "data.finger-tree" :owners ["Chouser"] :min-clojure "1.2.1"}
{:name "data.generators" :owners ["stuart.halloway"]}
- {:name "data.json" :owners ["stuartsierra"]}
+ {:name "data.json" :owners ["stuartsierra"] :min-clojure "1.3.0"}
{:name "data.priority-map" :owners ["markengelberg" "seancorfield"]}
- {:name "data.xml" :owners ["ryansenior"] :jdk-version "1.6"}
+ {:name "data.xml" :owners ["ryansenior"] :exclude-jdk #{"Sun JDK 1.5" "IBM JDK 1.5" "IBM JDK 1.6"}}
{:name "data.zip" :owners []}
{:name "java.classpath" :owners ["stuartsierra"]}
{:name "java.data" :owners ["cosminstejerean"]}
@@ -79,7 +79,7 @@
{:name "tools.cli" :owners ["garethjones"]}
{:name "tools.logging" :owners ["ataggart"]}
{:name "tools.macro" :owners ["konradhinsen"]}
- {:name "tools.namespace" :owners ["stuartsierra"]}
+ {:name "tools.namespace" :owners ["stuartsierra"] :min-clojure "1.3.0"}
{:name "tools.nrepl" :owners ["cemerick"]}
{:name "tools.reader" :owners ["nicolamometto"]}
{:name "tools.trace" :owners ["lucprefontaine"]}]}
View
17 generator/src/main/clojure/clojure/build/ci/generator.clj
@@ -75,9 +75,24 @@
{:jdks (jdk-names)
:clojures (active-clojures)})
+(defn update-min-clojure [lib]
+ (if-let [version (:min-clojure lib)]
+ (update-in lib [:clojures]
+ (fn [versions] (drop-while #(not= version %) versions)))
+ lib))
+
+(defn update-exclude-jdk [lib]
+ (if-let [exclusions (:exclude-jdk lib)]
+ (update-in lib [:jdks]
+ (fn [versions] (remove (set exclusions) versions)))
+ lib))
+
(defn matrix-job-config [lib]
(render-template "matrix_job"
- (merge (matrix-job-defaults) lib)))
+ (-> (matrix-job-defaults)
+ (merge lib)
+ (update-min-clojure)
+ (update-exclude-jdk))))
(defn write-release-job [lib]
(.mkdirs (job-dir (:name lib)))
View
37 hudson/config.xml
@@ -7,6 +7,7 @@
<authorizationStrategy class="hudson.security.ProjectMatrixAuthorizationStrategy">
<permission>hudson.model.Hudson.Administer:abedra</permission>
<permission>hudson.model.Hudson.Administer:cemerick</permission>
+ <permission>hudson.model.Hudson.Administer:chrisredinger</permission>
<permission>hudson.model.Hudson.Administer:richhickey</permission>
<permission>hudson.model.Hudson.Administer:stuart.halloway</permission>
<permission>hudson.model.Hudson.Administer:stuartsierra</permission>
@@ -16,9 +17,8 @@
<securityRealm class="hudson.security.HudsonPrivateSecurityRealm">
<disableSignup>true</disableSignup>
</securityRealm>
- <systemMessage>&lt;p&gt;Clojure build server; deploying to &lt;a href=&quot;https://oss.sonatype.org/&quot;&gt;oss.sonatype.org&lt;/a&gt;; releases are sync&apos;ed to the &lt;a href=&quot;http://repo1.maven.org/maven2&quot;&gt;Maven Central Repository&lt;/a&gt;.&lt;/p&gt;&#xd;
-&lt;p&gt;Older &lt;a href=&quot;/releases&quot;&gt;releases&lt;/a&gt; and &lt;a href=&quot;/snapshots&quot;&gt;snapshots&lt;/a&gt; are hosted locally.&lt;/p&gt;&#xd;
-&lt;p&gt;All projects build on Sun/Oracle JDK 1.5 unless specified otherwise.&lt;/p&gt;</systemMessage>
+ <systemMessage>&lt;p&gt;Clojure build server, deploying to &lt;a href=&quot;https://oss.sonatype.org/&quot;&gt;Sonatype OSS&lt;/a&gt;. See &lt;a href=&quot;http://dev.clojure.org/display/doc/Maven+Settings+and+Repositories&quot;&gt;Maven Settings and Repositories&lt;/a&gt; on the Clojure Wiki for more information.&#xd;
+&lt;p&gt;All projects build on Sun/Oracle JDK 1.5. "-test-matrix" jobs test multiple JDKs and Clojure versions.&lt;/p&gt;</systemMessage>
<jdks>
<jdk>
<name>Sun JDK 1.5</name>
@@ -36,11 +36,21 @@
<properties/>
</jdk>
<jdk>
- <name>IBM JDK 5</name>
+ <name>IBM JDK 1.5</name>
<home>/usr/java/ibm-java2-x86_64-50</home>
<properties/>
</jdk>
<jdk>
+ <name>IBM JDK 1.6</name>
+ <home>/usr/java/ibm-java-x86_64-sdk-6.0-9.2</home>
+ <properties/>
+ </jdk>
+ <jdk>
+ <name>IBM JDK 1.7</name>
+ <home>/usr/java/ibm-java-x86_64-sdk-7.0-0.0</home>
+ <properties/>
+ </jdk>
+ <jdk>
<name>OpenJDK 1.6</name>
<home>/usr/java/java-1.6.0-openjdk-1.6.0.0.x86_64</home>
<properties/>
@@ -92,13 +102,15 @@
</listView>
<listView>
<owner class="hudson" reference="../../.."/>
- <name>Contrib Libraries</name>
+ <name>Contrib</name>
<filterExecutors>false</filterExecutors>
<filterQueue>false</filterQueue>
<jobNames class="tree-set">
<comparator class="hudson.util.CaseInsensitiveComparator" reference="../../../listView/jobNames/comparator"/>
<string>algo.monads</string>
<string>algo.monads-test-matrix</string>
+ <string>algo.generic</string>
+ <string>algo.generic-test-matrix</string>
<string>core.incubator</string>
<string>core.incubator-test-matrix</string>
<string>core.logic</string>
@@ -107,10 +119,20 @@
<string>core.match-test-matrix</string>
<string>core.unify</string>
<string>core.unify-test-matrix</string>
+ <string>core.memoize</string>
+ <string>core.memoize-test-matrix</string>
+ <string>core.cache</string>
+ <string>core.cache-test-matrix</string>
+ <string>core.contracts</string>
+ <string>core.contracts-test-matrix</string>
+ <string>data.codec</string>
+ <string>data.codec-test-matrix</string>
<string>data.csv</string>
<string>data.csv-test-matrix</string>
<string>data.finger-tree</string>
<string>data.finger-tree-test-matrix</string>
+ <string>data.generators</string>
+ <string>data.generators-test-matrix</string>
<string>data.json</string>
<string>data.json-test-matrix</string>
<string>data.priority-map</string>
@@ -143,6 +165,10 @@
<string>tools.namespace-test-matrix</string>
<string>tools.nrepl</string>
<string>tools.nrepl-test-matrix</string>
+ <string>tools.reader</string>
+ <string>tools.reader-test-matrix</string>
+ <string>tools.trace</string>
+ <string>tools.trace-test-matrix</string>
</jobNames>
<jobFilters/>
<columns>
@@ -164,6 +190,7 @@
<comparator class="hudson.util.CaseInsensitiveComparator" reference="../../../listView/jobNames/comparator"/>
<string>build.ci</string>
<string>build.poms</string>
+ <string>rebuild-all-libraries</string>
</jobNames>
<jobFilters/>
<columns>

0 comments on commit eb4d025

Please sign in to comment.