From 1501b0986bb57431b1a63bbae96ad503dcbde9de Mon Sep 17 00:00:00 2001 From: Gabriele Bozzola Date: Tue, 8 Oct 2024 21:26:46 -0700 Subject: [PATCH 1/2] Remove arch from CI jobs and update actions Specifying arch forces the macOS runner to run in emulation mode (the correct arch is aarch64), making it much slower than it needs to be. In the process, I also updated some actions and added dependabot to keep them updated --- .github/dependabot.yml | 7 +++++++ .github/workflows/ci.yml | 9 +++------ 2 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..700707ced --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" # Location of package manifests + schedule: + interval: "weekly" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f944cc186..858916c43 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,19 +27,16 @@ jobs: - ubuntu-latest - macOS-latest - windows-latest - arch: - - x64 steps: - uses: actions/checkout@v4 - - uses: julia-actions/cache@v1 - - uses: julia-actions/setup-julia@v1 + - uses: julia-actions/cache@v2 + - uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.version }} - arch: ${{ matrix.arch }} - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 - uses: julia-actions/julia-processcoverage@v1 - - uses: codecov/codecov-action@v3 + - uses: codecov/codecov-action@v4 with: file: lcov.info token: ${{secrets.CODECOV_TOKEN}} From 17687b58ce6c69115f1b8aeed28654a4deab9cd7 Mon Sep 17 00:00:00 2001 From: Anna Jaruga Date: Wed, 9 Oct 2024 11:56:17 -0700 Subject: [PATCH 2/2] Fix rtol in ice calibration test --- test/Project.toml | 2 +- test/ice_nucleation_calibration.jl | 15 +++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/test/Project.toml b/test/Project.toml index c72d8eea0..ea1fbf19c 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -32,6 +32,6 @@ Thermodynamics = "b60c26fb-14c3-4610-9d3e-2d17fe7ff00c" [compat] ClimaParams = "0.10.6" EnsembleKalmanProcesses = "1.1.5" -MLJFlux = "0.4" KernelAbstractions = "0.9" +MLJFlux = "0.4" Optim = "<1.9.3" diff --git a/test/ice_nucleation_calibration.jl b/test/ice_nucleation_calibration.jl index a87204ce9..cf90f688d 100644 --- a/test/ice_nucleation_calibration.jl +++ b/test/ice_nucleation_calibration.jl @@ -28,22 +28,21 @@ function test_J_calibration(FT, IN_mode) run_calibrated_model(FT, IN_mode, calibrated_parameters, params, IC) true_soln = run_calibrated_model(FT, IN_mode, coeff_true, params, IC) - - # test that coeffs are close to "true" values + # test that coeffs are close to "true" values and that end ICNC are similar if IN_mode == "ABDINM" TT.@test calibrated_parameters[1] ≈ coeff_true[1] rtol = FT(0.3) - TT.@test calibrated_parameters[2] ≈ coeff_true[2] atol = FT(3) + TT.@test calibrated_parameters[2] ≈ coeff_true[2] rtol = FT(1.5) + TT.@test calibrated_soln[9, end] ≈ true_soln[9, end] rtol = FT(0.3) elseif IN_mode == "ABIFM" TT.@test calibrated_parameters[1] ≈ coeff_true[1] rtol = FT(0.3) - TT.@test calibrated_parameters[2] ≈ coeff_true[2] atol = FT(7) + TT.@test calibrated_parameters[2] ≈ coeff_true[2] rtol = FT(0.3) + TT.@test calibrated_soln[9, end] ≈ true_soln[9, end] rtol = FT(0.3) elseif IN_mode == "ABHOM" TT.@test calibrated_parameters[1] ≈ coeff_true[1] rtol = FT(0.3) - TT.@test calibrated_parameters[2] ≈ coeff_true[2] atol = FT(20) + TT.@test calibrated_parameters[2] ≈ coeff_true[2] rtol = FT(0.3) + TT.@test calibrated_soln[9, end] ≈ true_soln[9, end] rtol = FT(0.3) end - # test that resulting ICNC are similar - TT.@test (calibrated_soln[9, end] ./ (IC[7] + IC[8] + IC[9])) ≈ - (true_soln[9, end] ./ (IC[7] + IC[8] + IC[9])) rtol = FT(0.1) end @info "Ice Nucleation Calibration Test"