Skip to content

Commit 277ad36

Browse files
committed
add separate cache warmup job on which the rest of the testing depends.
1 parent 260f0ab commit 277ad36

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/CI.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,32 @@ concurrency:
2929
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
3030

3131
jobs:
32+
cache-warmup:
33+
runs-on: ubuntu-24.04
34+
strategy:
35+
matrix:
36+
version: ["1.10", "1.11"]
37+
os: [ubuntu-24.04, ubuntu-22.04-arm, macOS-latest]
38+
runtime: ["PJRT", "IFRT"]
39+
assertions: [false, true]
40+
steps:
41+
- uses: actions/checkout@v4
42+
- uses: julia-actions/setup-julia@v2
43+
with:
44+
version: ${{ matrix.version }}
45+
- uses: julia-actions/cache@v2
46+
with:
47+
cache-name: julia-cache;workflow=${{ github.workflow }};job=${{ github.job }};version=${{ matrix.version }};os=${{ matrix.os }};runtime=${{ matrix.runtime }};assertions=${{ matrix.assertions }}
48+
include-matrix: false
49+
- name: Warm cache
50+
run: |
51+
import Pkg
52+
Pkg.Registry.update()
53+
Pkg.instantiate()
54+
Pkg.precompile()
55+
shell: julia --project=. {0}
3256
test:
57+
needs: cache-warmup
3358
timeout-minutes: 90
3459
name: Julia ${{ matrix.version }} - ${{ matrix.test_group }} - ${{ matrix.os }} - ${{ matrix.runtime }} - assertions=${{ matrix.assertions }} - ${{ github.event_name }}
3560
runs-on: ${{ matrix.os }}

0 commit comments

Comments
 (0)