Skip to content

Commit bd2e3b0

Browse files
authored
Optimizing CI (#14)
* Optimizing CI * Try some more
1 parent 099f380 commit bd2e3b0

2 files changed

Lines changed: 13 additions & 33 deletions

File tree

.github/workflows/CI.yml

Lines changed: 13 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ concurrency:
1010
cancel-in-progress: true
1111

1212
jobs:
13-
job1:
13+
generate_matrix:
1414
name: "Prepare Tests"
1515
runs-on: ubuntu-latest
1616
outputs:
@@ -20,32 +20,15 @@ jobs:
2020
- id: set-matrix
2121
run: |
2222
echo "matrix={\"node\":[$(python getter.py)]}" >> $GITHUB_OUTPUT
23-
- name: "Set Up Julia"
24-
uses: julia-actions/setup-julia@v2
25-
with:
26-
version: "1.10"
27-
- uses: julia-actions/cache@v2
28-
with:
29-
cache-name: julia-cache;workflow=${{ github.workflow }};ref=${{ github.run_id }}
30-
include-matrix: false
31-
- name: "Install julia pre-requisites"
32-
run: |
33-
julia -e '
34-
using Pkg
35-
Pkg.add("Oscar")
36-
Pkg.add("BenchmarkTools")
37-
Pkg.add("GraphRecipes")
38-
Pkg.add("Graphs")
39-
Pkg.add("Interact")
40-
Pkg.add("Plots")'
41-
job2:
23+
24+
run_notebook:
4225
needs:
43-
- job1
26+
- generate_matrix
4427
name: "Run tests"
4528
runs-on: ubuntu-latest
4629
strategy:
4730
fail-fast: false
48-
matrix: ${{fromJSON(needs.job1.outputs.matrix)}}
31+
matrix: ${{fromJSON(needs.generate_matrix.outputs.matrix)}}
4932
timeout-minutes: 60
5033
steps:
5134
- name: "Set Up Julia"
@@ -69,18 +52,16 @@ jobs:
6952
run: |
7053
julia -e '
7154
using Pkg
72-
Pkg.add("Oscar")
73-
Pkg.add("BenchmarkTools")
74-
Pkg.add("GraphRecipes")
75-
Pkg.add("Graphs")
76-
Pkg.add("Interact")
7755
Pkg.add(name="IJulia", version="1.31.1")
78-
Pkg.add("Plots")'
56+
Pkg.add([
57+
"Oscar",
58+
"BenchmarkTools",
59+
"GraphRecipes",
60+
"Graphs",
61+
"Interact",
62+
"Plots",
63+
])'
7964
- run: mkdir -pv notebooks
80-
- name: Use default julia environment
81-
run: |
82-
cat ~/.local/share/jupyter/kernels/julia-1.10/kernel.json | sed 's/^.*project=.*$//' > ~/.local/share/jupyter/kernels/julia-1.10/kernel.json.new
83-
mv -v ~/.local/share/jupyter/kernels/julia-1.10/kernel.json.new ~/.local/share/jupyter/kernels/julia-1.10/kernel.json
8465
- run: python3 tester.py ${{ matrix.node }}
8566
- name: Upload new notebook
8667
uses: actions/upload-artifact@v4

tester.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,3 @@
1717
print(f"Running {repo}/{filename}...")
1818
subprocess.run(f'''jupytext --set-kernel "julia-1.10" --execute {nbfilename}''', shell=True, check=True)
1919
print(f"{repo}/{filename} tested successfully!")
20-

0 commit comments

Comments
 (0)