From d584da1870a77d3bc7fe6ef666bf724346fe566c Mon Sep 17 00:00:00 2001 From: Martin Bies Date: Thu, 6 Nov 2025 14:56:15 +0100 Subject: [PATCH 1/2] Optimizing CI --- .github/workflows/CI.yml | 50 +++++++++++++++------------------------- tester.py | 3 +-- 2 files changed, 19 insertions(+), 34 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index bd4bdd3..bdea5a8 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -10,7 +10,7 @@ concurrency: cancel-in-progress: true jobs: - job1: + generate_matrix: name: "Prepare Tests" runs-on: ubuntu-latest outputs: @@ -20,32 +20,15 @@ jobs: - id: set-matrix run: | echo "matrix={\"node\":[$(python getter.py)]}" >> $GITHUB_OUTPUT - - name: "Set Up Julia" - uses: julia-actions/setup-julia@v2 - with: - version: "1.10" - - uses: julia-actions/cache@v2 - with: - cache-name: julia-cache;workflow=${{ github.workflow }};ref=${{ github.run_id }} - include-matrix: false - - name: "Install julia pre-requisites" - run: | - julia -e ' - using Pkg - Pkg.add("Oscar") - Pkg.add("BenchmarkTools") - Pkg.add("GraphRecipes") - Pkg.add("Graphs") - Pkg.add("Interact") - Pkg.add("Plots")' - job2: + + run_notebook: needs: - - job1 + - generate_matrix name: "Run tests" runs-on: ubuntu-latest strategy: fail-fast: false - matrix: ${{fromJSON(needs.job1.outputs.matrix)}} + matrix: ${{fromJSON(needs.generate_matrix.outputs.matrix)}} timeout-minutes: 60 steps: - name: "Set Up Julia" @@ -69,18 +52,21 @@ jobs: run: | julia -e ' using Pkg - Pkg.add("Oscar") - Pkg.add("BenchmarkTools") - Pkg.add("GraphRecipes") - Pkg.add("Graphs") - Pkg.add("Interact") Pkg.add(name="IJulia", version="1.31.1") - Pkg.add("Plots")' - - run: mkdir -pv notebooks - - name: Use default julia environment + Pkg.add([ + "Oscar", + "BenchmarkTools", + "GraphRecipes", + "Graphs", + "Interact", + "Plots", + ])' + - name: "Set kernel for IJulia" run: | - cat ~/.local/share/jupyter/kernels/julia-1.10/kernel.json | sed 's/^.*project=.*$//' > ~/.local/share/jupyter/kernels/julia-1.10/kernel.json.new - mv -v ~/.local/share/jupyter/kernels/julia-1.10/kernel.json.new ~/.local/share/jupyter/kernels/julia-1.10/kernel.json + julia -e ' + using IJulia + installkernel("Julia")' + - run: mkdir -pv notebooks - run: python3 tester.py ${{ matrix.node }} - name: Upload new notebook uses: actions/upload-artifact@v4 diff --git a/tester.py b/tester.py index b0367ad..f77be5c 100644 --- a/tester.py +++ b/tester.py @@ -15,6 +15,5 @@ #finally, run the stuff print(f"Running {repo}/{filename}...") -subprocess.run(f'''jupytext --set-kernel "julia-1.10" --execute {nbfilename}''', shell=True, check=True) +subprocess.run(f'''jupytext --set-kernel "Julia" --execute {nbfilename}''', shell=True, check=True) print(f"{repo}/{filename} tested successfully!") - From f11578c8fdc37c63d1fcc8c1540db7a1fb5cb3ec Mon Sep 17 00:00:00 2001 From: Martin Bies Date: Wed, 26 Nov 2025 12:34:56 +0100 Subject: [PATCH 2/2] Try some more --- .github/workflows/CI.yml | 5 ----- tester.py | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index bdea5a8..29e4205 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -61,11 +61,6 @@ jobs: "Interact", "Plots", ])' - - name: "Set kernel for IJulia" - run: | - julia -e ' - using IJulia - installkernel("Julia")' - run: mkdir -pv notebooks - run: python3 tester.py ${{ matrix.node }} - name: Upload new notebook diff --git a/tester.py b/tester.py index f77be5c..bac5828 100644 --- a/tester.py +++ b/tester.py @@ -15,5 +15,5 @@ #finally, run the stuff print(f"Running {repo}/{filename}...") -subprocess.run(f'''jupytext --set-kernel "Julia" --execute {nbfilename}''', shell=True, check=True) +subprocess.run(f'''jupytext --set-kernel "julia-1.10" --execute {nbfilename}''', shell=True, check=True) print(f"{repo}/{filename} tested successfully!")