Skip to content

Commit 71d943a

Browse files
committed
Use Docker bind mounts for persistent caching
1 parent eb28cbd commit 71d943a

File tree

1 file changed

+67
-11
lines changed

1 file changed

+67
-11
lines changed

.github/workflows/ci.yaml

Lines changed: 67 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,12 @@ env:
2020
jobs:
2121
test:
2222
runs-on: [self-hosted, Linux]
23-
container: lampepfl/dotty:2020-09-08
23+
container:
24+
image: lampepfl/dotty:2020-09-08
25+
volumes:
26+
- ${{ github.workspace }}/../../cache/sbt:/root/.sbt
27+
- ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache
28+
- ${{ github.workspace }}/../../cache/general:/root/.cache
2429
if: "!(github.event_name == 'push' &&
2530
startsWith(github.event.ref, 'refs/tags/sbt-dotty-'))"
2631

@@ -44,7 +49,12 @@ jobs:
4449
4550
test_bootstrapped:
4651
runs-on: [self-hosted, Linux]
47-
container: lampepfl/dotty:2020-09-08
52+
container:
53+
image: lampepfl/dotty:2020-09-08
54+
volumes:
55+
- ${{ github.workspace }}/../../cache/sbt:/root/.sbt
56+
- ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache
57+
- ${{ github.workspace }}/../../cache/general:/root/.cache
4858
if: "!(github.event_name == 'push' &&
4959
startsWith(github.event.ref, 'refs/tags/sbt-dotty-'))"
5060

@@ -108,7 +118,12 @@ jobs:
108118

109119
community_build_a:
110120
runs-on: [self-hosted, Linux]
111-
container: lampepfl/dotty:2020-09-08
121+
container:
122+
image: lampepfl/dotty:2020-09-08
123+
volumes:
124+
- ${{ github.workspace }}/../../cache/sbt:/root/.sbt
125+
- ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache
126+
- ${{ github.workspace }}/../../cache/general:/root/.cache
112127

113128
steps:
114129
- name: Checkout cleanup script
@@ -131,7 +146,12 @@ jobs:
131146
132147
community_build_b:
133148
runs-on: [self-hosted, Linux]
134-
container: lampepfl/dotty:2020-09-08
149+
container:
150+
image: lampepfl/dotty:2020-09-08
151+
volumes:
152+
- ${{ github.workspace }}/../../cache/sbt:/root/.sbt
153+
- ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache
154+
- ${{ github.workspace }}/../../cache/general:/root/.cache
135155

136156
steps:
137157
- name: Checkout cleanup script
@@ -154,7 +174,12 @@ jobs:
154174
155175
test_sbt:
156176
runs-on: [self-hosted, Linux]
157-
container: lampepfl/dotty:2020-09-08
177+
container:
178+
image: lampepfl/dotty:2020-09-08
179+
volumes:
180+
- ${{ github.workspace }}/../../cache/sbt:/root/.sbt
181+
- ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache
182+
- ${{ github.workspace }}/../../cache/general:/root/.cache
158183
if: (
159184
github.event_name == 'push' &&
160185
startsWith(github.event.ref, 'refs/tags/')
@@ -176,7 +201,13 @@ jobs:
176201

177202
test_java8:
178203
runs-on: [self-hosted, Linux]
179-
container: lampepfl/dotty:2020-09-08
204+
container:
205+
image: lampepfl/dotty:2020-09-08
206+
volumes:
207+
- ${{ github.workspace }}/../../cache/sbt:/root/.sbt
208+
- ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache
209+
- ${{ github.workspace }}/../../cache/general:/root/.cache
210+
180211
if: "(
181212
github.event_name == 'push' &&
182213
startsWith(github.event.ref, 'refs/tags/') &&
@@ -202,7 +233,12 @@ jobs:
202233

203234
publish_nightly:
204235
runs-on: [self-hosted, Linux]
205-
container: lampepfl/dotty:2020-09-08
236+
container:
237+
image: lampepfl/dotty:2020-09-08
238+
volumes:
239+
- ${{ github.workspace }}/../../cache/sbt:/root/.sbt
240+
- ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache
241+
- ${{ github.workspace }}/../../cache/general:/root/.cache
206242
needs: [test, test_bootstrapped, community_build_a, community_build_b, test_sbt, test_java8]
207243
if: github.event_name == 'schedule'
208244
env:
@@ -228,7 +264,12 @@ jobs:
228264
229265
nightly_documentation:
230266
runs-on: [self-hosted, Linux]
231-
container: lampepfl/dotty:2020-09-08
267+
container:
268+
image: lampepfl/dotty:2020-09-08
269+
volumes:
270+
- ${{ github.workspace }}/../../cache/sbt:/root/.sbt
271+
- ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache
272+
- ${{ github.workspace }}/../../cache/general:/root/.cache
232273
needs: [publish_nightly]
233274
if: github.event_name == 'schedule'
234275
env:
@@ -261,7 +302,12 @@ jobs:
261302

262303
publish_release:
263304
runs-on: [self-hosted, Linux]
264-
container: lampepfl/dotty:2020-09-08
305+
container:
306+
image: lampepfl/dotty:2020-09-08
307+
volumes:
308+
- ${{ github.workspace }}/../../cache/sbt:/root/.sbt
309+
- ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache
310+
- ${{ github.workspace }}/../../cache/general:/root/.cache
265311
needs: [test, test_bootstrapped, community_build_a, community_build_b, test_sbt, test_java8]
266312
if: github.event_name == 'push' &&
267313
startsWith(github.event.ref, 'refs/tags/') &&
@@ -335,7 +381,12 @@ jobs:
335381

336382
release_documentation:
337383
runs-on: [self-hosted, Linux]
338-
container: lampepfl/dotty:2020-09-08
384+
container:
385+
image: lampepfl/dotty:2020-09-08
386+
volumes:
387+
- ${{ github.workspace }}/../../cache/sbt:/root/.sbt
388+
- ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache
389+
- ${{ github.workspace }}/../../cache/general:/root/.cache
339390
needs: [publish_release]
340391
if: github.event_name == 'push' &&
341392
startsWith(github.event.ref, 'refs/tags/') &&
@@ -371,7 +422,12 @@ jobs:
371422

372423
publish_sbt_release:
373424
runs-on: [self-hosted, Linux]
374-
container: lampepfl/dotty:2020-09-08
425+
container:
426+
image: lampepfl/dotty:2020-09-08
427+
volumes:
428+
- ${{ github.workspace }}/../../cache/sbt:/root/.sbt
429+
- ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache
430+
- ${{ github.workspace }}/../../cache/general:/root/.cache
375431
needs: [community_build_a, community_build_b, test_sbt]
376432
if: github.event_name == 'push' &&
377433
startsWith(github.event.ref, 'refs/tags/sbt-dotty-')

0 commit comments

Comments
 (0)