Skip to content

Commit 167e548

Browse files
committed
try caching julia
1 parent aac6e96 commit 167e548

File tree

1 file changed

+29
-27
lines changed

1 file changed

+29
-27
lines changed

.github/workflows/job.test.yml

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,17 @@ defaults:
1616
shell: bash -l {0}
1717

1818
env:
19-
# Increase this value to reset all caches
20-
CACHE_EPOCH: 1
19+
JULIA_NUM_THREADS: 2
20+
MAMBA_NO_BANNER: 1
21+
PIP_DISABLE_PIP_VERSION_CHECK: 1
22+
PYTHONUNBUFFERED: 1
2123

24+
ATEST_RETRIES: 3
2225
JLPM_CMD: jlpm --ignore-optional --prefer-offline --frozen-lockfile
2326

24-
PYTHONUNBUFFERED: 1
25-
ATEST_RETRIES: 3
26-
PIP_DISABLE_PIP_VERSION_CHECK: 1
27-
MAMBA_NO_BANNER: 1
27+
# Increase this value to reset all caches
28+
CACHE_EPOCH: 1
29+
JULIA_LANGSERVER: 3.2.0
2830

2931
jobs:
3032
lint:
@@ -75,15 +77,17 @@ jobs:
7577
uses: actions/cache@v2
7678
with:
7779
path: '**/node_modules'
78-
key: ${{ env.CACHE_EPOCH }}-${{ runner.os }}-node-lint-${{ hashFiles('yarn.lock', 'requirements/github-actions.yml') }}
80+
key: |
81+
${{ env.CACHE_EPOCH }}-${{ runner.os }}-node-lint-${{ hashFiles('yarn.lock', 'requirements/github-actions.yml') }}
7982
8083
- name: Cache yarn packages
8184
id: cache-yarn-packages
8285
if: steps.cache-node-modules.outputs.cache-hit != 'true'
8386
uses: actions/cache@v2
8487
with:
8588
path: .yarn-packages
86-
key: ${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
89+
key: |
90+
${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
8791
restore-keys: |
8892
${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-
8993
${{ env.CACHE_EPOCH }}-yarn-
@@ -148,15 +152,17 @@ jobs:
148152
uses: actions/cache@v2
149153
with:
150154
path: '**/node_modules'
151-
key: ${{ env.CACHE_EPOCH }}-${{ runner.os }}-node-build-${{ hashFiles('yarn.lock', 'requirements/github-actions.yml') }}
155+
key: |
156+
${{ env.CACHE_EPOCH }}-${{ runner.os }}-node-build-${{ hashFiles('yarn.lock', 'requirements/github-actions.yml') }}
152157
153158
- name: Cache yarn packages
154159
id: cache-yarn-packages
155160
if: steps.cache-node-modules.outputs.cache-hit != 'true'
156161
uses: actions/cache@v2
157162
with:
158163
path: .yarn-packages
159-
key: ${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
164+
key: |
165+
${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
160166
restore-keys: |
161167
${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-
162168
${{ env.CACHE_EPOCH }}-yarn-
@@ -227,11 +233,6 @@ jobs:
227233
steps:
228234
- uses: actions/checkout@v2
229235

230-
- uses: julia-actions/setup-julia@v1
231-
232-
- name: Install Julia language server
233-
run: julia -e 'using Pkg; Pkg.add("LanguageServer")'
234-
235236
- name: Set JupyterLab and Node versions
236237
uses: cschleiden/replace-tokens@v1
237238
with:
@@ -263,22 +264,17 @@ jobs:
263264
run: conda list
264265

265266
- name: Cache node_modules
266-
id: cache-node-modules
267267
uses: actions/cache@v2
268268
with:
269269
path: '**/node_modules'
270-
key: ${{ env.CACHE_EPOCH }}-${{ runner.os }}-node-test-${{ hashFiles('yarn.lock', 'requirements/github-actions.yml') }}
270+
key: |
271+
${{ env.CACHE_EPOCH }}-${{ runner.os }}-node-atest-${{ hashFiles('yarn.lock') }}
271272
272-
- name: Cache yarn packages
273-
id: cache-yarn-packages
274-
if: steps.cache-node-modules.outputs.cache-hit != 'true'
275-
uses: actions/cache@v2
273+
- uses: actions/cache@v2
276274
with:
277-
path: .yarn-packages
278-
key: ${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
279-
restore-keys: |
280-
${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-
281-
${{ env.CACHE_EPOCH }}-yarn-
275+
path: ~/.julia/artifacts
276+
key: |
277+
${{ env.CACHE_EPOCH }}-julia-test-${{ runner.os }}-${{ env.JULIA_LANGSERVER }}
282278
283279
- uses: actions/download-artifact@v2
284280
with:
@@ -304,10 +300,16 @@ jobs:
304300
- name: List frontend extensions
305301
run: jupyter labextension list
306302

307-
- name: install npm dependencies
303+
- name: install node-based language servers
308304
if: steps.cache-node-modules.outputs.cache-hit != 'true'
309305
run: ${{ env.JLPM_CMD }}
310306

307+
- name: Install Julia
308+
uses: julia-actions/setup-julia@v1
309+
310+
- name: Install Julia language server
311+
run: julia -e 'using Pkg; Pkg.add(Pkg.PackageSpec(;name="LanguageServer", version="${{ env.JULIA_LANGSERVER }}"))'
312+
311313
- name: Run python tests
312314
run: python scripts/utest.py
313315

0 commit comments

Comments
 (0)