Skip to content

Commit

Permalink
Try #208:
Browse files Browse the repository at this point in the history
  • Loading branch information
bors[bot] authored Sep 6, 2023
2 parents efe35c3 + faf2ede commit 924ae3d
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 6 deletions.
7 changes: 3 additions & 4 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ steps:
- "julia --project -e 'using Pkg; Pkg.precompile()'"

# force the initialization of the CUDA runtime as it is lazily loaded by default
- "julia --project -e 'using Pkg; Pkg.add(name=\"CUDA\")'"
- "julia --project -e 'using CUDA; CUDA.versioninfo()'"
- "julia --project -e 'using CUDA; CUDA.precompile_runtime()'"
- "julia --project -e 'using Pkg; Pkg.status()'"
- "julia --project=test -e 'using CUDA; CUDA.versioninfo()'"
- "julia --project=test -e 'using CUDA; CUDA.precompile_runtime()'"
- "julia --project=test -e 'using Pkg; Pkg.status()'"
agents:
config: gpu
queue: central
Expand Down
2 changes: 0 additions & 2 deletions src/Common.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ import ..CommonTypes as CT

export G_func
export H2SO4_soln_saturation_vapor_pressure
export ABIFM_Delta_a_w
export Chen_snow_ice_coeffs
export Chen2022_vel_add
export Chen2022_vel_coeffs

Expand Down
1 change: 1 addition & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[deps]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
CLIMAParameters = "6eacf6c3-8458-43b9-ae03-caf5306d3d53"
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
Expand Down
49 changes: 49 additions & 0 deletions test/aqua.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
using Test
using CloudMicrophysics
using Aqua

@testset "Quality assurance - Aqua" begin

@testset "Aqua tests (performance)" begin
# This tests that we don't accidentally run into
# https://github.com/JuliaLang/julia/issues/29393
ua = Aqua.detect_unbound_args_recursively(CloudMicrophysics)
# Uncomment for debugging:
# for unbound_arg in ua
# @show unbound_arg
# end

# There are unbound ambiguities in CM that match this pattern:
# https://github.com/JuliaTesting/Aqua.jl/issues/86
@test length(ua) <= 4

# See: https://github.com/SciML/OrdinaryDiffEq.jl/issues/1750
# Test that we're not introducing method ambiguities across deps
ambs = Aqua.detect_ambiguities(CloudMicrophysics; recursive = true)
pkg_match(pkgname, pkdir::Nothing) = false
pkg_match(pkgname, pkdir::AbstractString) = occursin(pkgname, pkdir)
filter!(
x -> pkg_match("CloudMicrophysics", pkgdir(last(x).module)),
ambs,
)

# If the number of ambiguities is less than the limit below,
# then please lower the limit based on the new number of ambiguities.
# We're trying to drive this number down to zero to reduce latency.
# Uncomment for debugging:
# for method_ambiguity in ambs
# @show method_ambiguity
# end
@test length(ambs) 0
end
@testset "Aqua tests (additional)" begin
Aqua.test_undefined_exports(CloudMicrophysics)
Aqua.test_stale_deps(CloudMicrophysics)
Aqua.test_deps_compat(CloudMicrophysics)
Aqua.test_project_extras(CloudMicrophysics)
Aqua.test_project_toml_formatting(CloudMicrophysics)
Aqua.test_piracy(CloudMicrophysics)
end

end
nothing
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ include("common_types_tests.jl")
include("nucleation_unit_tests.jl")
include("precipitation_susceptibility_tests.jl")
include("p3_tests.jl")
include("aqua.jl")

0 comments on commit 924ae3d

Please sign in to comment.