Skip to content

Commit 49bc293

Browse files
committed
run tests without testing anything to precompile the right things.
1 parent 7981875 commit 49bc293

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

.github/workflows/CI.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,19 @@ jobs:
4646
with:
4747
cache-name: julia-cache;workflow=${{ github.workflow }};version=${{ matrix.version }};os=${{ matrix.os }};runtime=${{ matrix.runtime }};assertions=${{ matrix.assertions }}
4848
include-matrix: false
49+
- name: "Run Tests to warm cache"
50+
run: |
51+
import Pkg
52+
Pkg.Registry.update()
53+
Pkg.test()
54+
shell: julia --color=yes --depwarn=yes --project=. {0}
55+
env:
56+
JULIA_PKG_SERVER_REGISTRY_PREFERENCE: eager
57+
ENABLE_PJRT_COMPATIBILITY: 1
58+
REACTANT_TEST_GROUP: "none"
59+
XLA_FLAGS: "--xla_force_host_platform_device_count=12"
60+
JULIA_DEBUG: "Reactant,Reactant_jll"
61+
4962
- name: Warm cache
5063
run: |
5164
import Pkg

test/runtests.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ end
66

77
const REACTANT_TEST_GROUP = lowercase(get(ENV, "REACTANT_TEST_GROUP", "all"))
88

9+
# this is for the CI to precompile everything before running tests
10+
if REACTANT_TEST_GROUP == "none"
11+
println("Skipping all tests as REACTANT_TEST_GROUP is set to 'none'")
12+
exit(0)
13+
end
14+
15+
916
@testset "Reactant.jl Tests" begin
1017
if REACTANT_TEST_GROUP == "all" || REACTANT_TEST_GROUP == "core"
1118
if Sys.isapple() && haskey(Reactant.XLA.global_backend_state.clients, "metal")

0 commit comments

Comments
 (0)