Skip to content

Commit 5ef603f

Browse files
committed
Partition community build
1 parent ac4e29d commit 5ef603f

File tree

2 files changed

+71
-24
lines changed

2 files changed

+71
-24
lines changed

.github/workflows/ci.yaml

Lines changed: 46 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ jobs:
133133
run: sbt ";sjsJUnitTests/test ;sjsCompilerTests/test"
134134
shell: cmd
135135

136-
community_build:
136+
community_build_a:
137137
runs-on: [self-hosted, Linux]
138138
container: lampepfl/dotty:2020-04-24
139139

@@ -172,7 +172,48 @@ jobs:
172172
run: |
173173
git submodule sync
174174
git submodule update --init --recursive --jobs 7
175-
./project/scripts/sbt community-build/test
175+
./project/scripts/sbt "community-build/testOnly dotty.communitybuild.CommunityBuildTestA"
176+
177+
community_build_b:
178+
runs-on: [self-hosted, Linux]
179+
container: lampepfl/dotty:2020-04-24
180+
181+
steps:
182+
- name: Checkout cleanup script
183+
uses: actions/checkout@v2
184+
185+
- name: Cleanup
186+
run: .github/workflows/cleanup.sh
187+
188+
- name: Git Checkout
189+
uses: actions/checkout@v2
190+
191+
- name: Cache Ivy
192+
uses: actions/cache@v1.1.2
193+
with:
194+
path: /root/.ivy2/cache
195+
key: ${{ runner.os }}-ivy-${{ hashFiles('**/build.sbt') }}
196+
restore-keys: ${{ runner.os }}-ivy-
197+
198+
- name: Cache SBT
199+
uses: actions/cache@v1.1.2
200+
with:
201+
path: /root/.sbt
202+
key: ${{ runner.os }}-sbt-${{ hashFiles('project/**') }}
203+
restore-keys: ${{ runner.os }}-sbt-
204+
205+
- name: Cache Coursier and Mill
206+
uses: actions/cache@v1.1.2
207+
with:
208+
path: /root/.cache
209+
key: ${{ runner.os }}-general-${{ hashFiles('**/build.sbt') }}
210+
restore-keys: ${{ runner.os }}-general-
211+
212+
- name: Test
213+
run: |
214+
git submodule sync
215+
git submodule update --init --recursive --jobs 7
216+
./project/scripts/sbt "community-build/testOnly dotty.communitybuild.CommunityBuildTestB"
176217
177218
test_sbt:
178219
runs-on: [self-hosted, Linux]
@@ -267,7 +308,7 @@ jobs:
267308
publish_nightly:
268309
runs-on: [self-hosted, Linux]
269310
container: lampepfl/dotty:2020-04-24
270-
needs: [test, test_bootstrapped, community_build, test_sbt, test_java8]
311+
needs: [test, test_bootstrapped, community_build_a, community_build_b, test_sbt, test_java8]
271312
if: github.event_name == 'schedule'
272313
env:
273314
NIGHTLYBUILD: yes
@@ -368,7 +409,7 @@ jobs:
368409
publish_release:
369410
runs-on: [self-hosted, Linux]
370411
container: lampepfl/dotty:2020-04-24
371-
needs: [test, test_bootstrapped, community_build, test_sbt, test_java8]
412+
needs: [test, test_bootstrapped, community_build_a, community_build_b, test_sbt, test_java8]
372413
if: github.event_name == 'push' &&
373414
startsWith(github.event.ref, 'refs/tags/') &&
374415
!startsWith(github.event.ref, 'refs/tags/sbt-dotty-')
@@ -520,7 +561,7 @@ jobs:
520561
publish_sbt_release:
521562
runs-on: [self-hosted, Linux]
522563
container: lampepfl/dotty:2020-04-24
523-
needs: [community_build, test_sbt]
564+
needs: [community_build_a, community_build_b, test_sbt]
524565
if: github.event_name == 'push' &&
525566
startsWith(github.event.ref, 'refs/tags/sbt-dotty-')
526567

community-build/test/scala/dotty/communitybuild/CommunityBuildTest.scala

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ import org.junit.{Ignore, Test}
77
import org.junit.Assert.{assertEquals, fail}
88
import org.junit.experimental.categories.Category
99

10-
@Category(Array(classOf[TestCategory]))
11-
class CommunityBuildTest:
10+
abstract class CommunityBuildTest:
1211
given CommunityBuildTest = this
1312

1413
/** Depending on the mode of operation, either
@@ -79,7 +78,30 @@ class CommunityBuildTest:
7978
|""".stripMargin)
8079
}
8180
}
81+
end CommunityBuildTest
82+
83+
@Category(Array(classOf[TestCategory]))
84+
class CommunityBuildTestA extends CommunityBuildTest:
85+
@Test def fansi = projects.fansi.run()
86+
@Test def fastparse = projects.fastparse.run()
87+
@Test def geny = projects.geny.run()
88+
@Test def oslib = projects.oslib.run()
89+
// @Test def oslibWatch = projects.oslibWatch.run()
90+
@Test def pprint = projects.pprint.run()
91+
@Test def requests = projects.requests.run()
92+
@Test def scalacheck = projects.scalacheck.run()
93+
@Test def scalatest = projects.scalatest.run()
94+
@Test def scalatestplusScalacheck = projects.scalatestplusScalacheck.run()
95+
@Test def sourcecode = projects.sourcecode.run()
96+
@Test def scodec = projects.scodec.run()
97+
@Test def scodecBits = projects.scodecBits.run()
98+
@Test def ujson = projects.ujson.run()
99+
@Test def upickle = projects.upickle.run()
100+
@Test def utest = projects.utest.run()
101+
end CommunityBuildTestA
82102

103+
@Category(Array(classOf[TestCategory]))
104+
class CommunityBuildTestB extends CommunityBuildTest:
83105
@Test def algebra = projects.algebra.run()
84106
@Test def betterfiles = projects.betterfiles.run()
85107
@Test def catsEffect2 = projects.catsEffect2.run()
@@ -88,37 +110,21 @@ class CommunityBuildTest:
88110
// @Test def dottyCpsAsync = projects.dottyCpsAsync.run()
89111
@Test def effpi = projects.effpi.run()
90112
@Test def endpoints4s = projects.endpoints4s.run()
91-
@Test def fansi = projects.fansi.run()
92-
@Test def fastparse = projects.fastparse.run()
93-
@Test def geny = projects.geny.run()
94113
@Test def intent = projects.intent.run()
95114
@Test def minitest = projects.minitest.run()
96115
@Test def munit = projects.munit.run()
97-
@Test def oslib = projects.oslib.run()
98-
// @Test def oslibWatch = projects.oslibWatch.run()
99-
@Test def pprint = projects.pprint.run()
100-
@Test def requests = projects.requests.run()
101-
@Test def scalacheck = projects.scalacheck.run()
102116
@Test def scalap = projects.scalap.run()
103117
@Test def scalaParserCombinators = projects.scalaParserCombinators.run()
104118
@Test def ScalaPB = projects.ScalaPB.run()
105-
@Test def scalatest = projects.scalatest.run()
106-
@Test def scalatestplusScalacheck = projects.scalatestplusScalacheck.run()
107119
@Test def scalaXml = projects.scalaXml.run()
108120
@Test def scalaz = projects.scalaz.run()
109-
@Test def scodec = projects.scodec.run()
110-
@Test def scodecBits = projects.scodecBits.run()
111121
@Test def sconfig = projects.sconfig.run()
112122
@Test def scopt = projects.scopt.run()
113123
@Test def shapeless = projects.shapeless.run()
114-
@Test def sourcecode = projects.sourcecode.run()
115124
@Test def squants = projects.squants.run()
116125
@Test def stdLib213 = projects.stdLib213.run()
117-
@Test def ujson = projects.ujson.run()
118-
@Test def upickle = projects.upickle.run()
119-
@Test def utest = projects.utest.run()
120126
@Test def xmlInterpolator = projects.xmlInterpolator.run()
121127
@Test def zio = projects.zio.run()
122-
end CommunityBuildTest
128+
end CommunityBuildTestB
123129

124130
class TestCategory

0 commit comments

Comments
 (0)