Skip to content

Commit 1d551dd

Browse files
authored
Ak96/add cache (#7)
1 parent f7cedea commit 1d551dd

1 file changed

Lines changed: 24 additions & 6 deletions

File tree

.github/workflows/CI.yml

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ concurrency:
1212

1313
jobs:
1414
job1:
15-
name: "Get tutorials list"
15+
name: "Prepare Tests"
1616
runs-on: ubuntu-latest
1717
outputs:
1818
matrix: ${{ steps.set-matrix.outputs.matrix }}
@@ -21,6 +21,24 @@ jobs:
2121
- id: set-matrix
2222
run: |
2323
echo "matrix={\"node\":[$(python getter.py)]}" >> $GITHUB_OUTPUT
24+
- name: "Set Up Julia"
25+
uses: julia-actions/setup-julia@v2
26+
with:
27+
version: '1.10'
28+
- uses: julia-actions/cache@v2
29+
with:
30+
cache-name: julia-cache;workflow=${{ github.workflow }};ref=${{ github.run_id }}
31+
include-matrix: false
32+
- name: "Install julia pre-requisites"
33+
run: |
34+
julia -e '
35+
using Pkg
36+
Pkg.add("Oscar")
37+
Pkg.add("BenchmarkTools")
38+
Pkg.add("GraphRecipes")
39+
Pkg.add("Graphs")
40+
Pkg.add("Interact")
41+
Pkg.add("Plots")'
2442
job2:
2543
needs:
2644
- job1
@@ -31,23 +49,23 @@ jobs:
3149
matrix: ${{fromJSON(needs.job1.outputs.matrix)}}
3250
timeout-minutes: 30
3351
steps:
34-
- uses: actions/checkout@v4
35-
- name: "Set up Julia"
36-
uses: julia-actions/setup-julia@v2
52+
- uses: julia-actions/cache@v2
3753
with:
38-
version: '1.10'
54+
cache-name: julia-cache;workflow=${{ github.workflow }};ref=${{ github.run_id }}
55+
include-matrix: false
56+
- uses: actions/checkout@v4
3957
- name: "Install Jupyter"
4058
run: pip3 install notebook jupytext
4159
- name: "Install julia pre-requisites"
4260
run: |
4361
julia -e '
4462
using Pkg
45-
Pkg.add("IJulia")
4663
Pkg.add("Oscar")
4764
Pkg.add("BenchmarkTools")
4865
Pkg.add("GraphRecipes")
4966
Pkg.add("Graphs")
5067
Pkg.add("Interact")
68+
Pkg.add("IJulia")
5169
Pkg.add("Plots")'
5270
- run: mkdir -pv notebooks
5371
- name: Use default julia environment

0 commit comments

Comments
 (0)