Skip to content

Commit

Permalink
using CI for runtests
Browse files Browse the repository at this point in the history
  • Loading branch information
sumiya11 committed Jul 11, 2023
1 parent df4828e commit fa704dc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/utils/logging.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
# Logging is disabled on all threads except the one with threadid() == 1.

const _default_logger = @static if VERSION >= v"1.8.0"
const _default_logger = @static if VERSION >= v"1.7.0"
Ref{Logging.ConsoleLogger}(Logging.ConsoleLogger(Logging.Info, show_limited=false))
else
Ref{Logging.ConsoleLogger}(Logging.ConsoleLogger())
Expand Down
10 changes: 8 additions & 2 deletions src/utils/parameters.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Select parameters for Groebner basis computation

const _default_rng_type = @static if VERSION >= v"1.8.0"
Random.Xoshiro
else
Random.MersenneTwister
end

struct AlgorithmParameters{Ord1, Ord2}
# Output polynomials monomial ordering
target_ord::Ord1
Expand Down Expand Up @@ -37,7 +43,7 @@ struct AlgorithmParameters{Ord1, Ord2}

# Random number generator seed
seed::UInt64
rng::Random.Xoshiro
rng::_default_rng_type
end

function AlgorithmParameters(ring, kwargs::KeywordsHandler)
Expand Down Expand Up @@ -73,7 +79,7 @@ function AlgorithmParameters(ring, kwargs::KeywordsHandler)

emit_computation_graph = false

rng = Random.Xoshiro(seed)
rng = _default_rng_type(seed)

useed = UInt64(seed)

Expand Down
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ using Groebner

# Check invariants during testing
Groebner.invariants_enabled() = true
Groebner.update_logger(stream=stdout, loglevel=0)

# Taken from JuMP/test/solvers.jl
function try_import(name::Symbol)
Expand Down

0 comments on commit fa704dc

Please sign in to comment.