Skip to content

Commit

Permalink
Fix compat and add downgrade action
Browse files Browse the repository at this point in the history
The compats in ClimaAtmos were largely wrong. In this commit, I fix them. I also
add a new action that checks that our tests pass with the oldest possible
combination of packages that is advertised to be compatible with ClimaAtmos.

Since we required ClimaComms 0.6, I also removed all the checks on that version
for the import_required_backends
  • Loading branch information
Sbozzolo committed Sep 2, 2024
1 parent a72783f commit d126287
Show file tree
Hide file tree
Showing 31 changed files with 307 additions and 267 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/downgrade.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Downgrade
on:
pull_request:
push:
branches:
- main
tags: '*'

# Needed to allow julia-actions/cache to delete old caches that it has created
permissions:
actions: write
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
version: ['1']
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.version }}
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-downgrade-compat@v1
with:
skip: Artifacts, Dates, LazyArtifacts, LinearAlgebra, Logging, Printf, Test, Statistics, Random, Pkg
- uses: julia-actions/julia-buildpkg@latest
- uses: julia-actions/julia-runtest@latest
30 changes: 13 additions & 17 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ ClimaUtilities = "b3f4f4ca-9299-4f7f-bd9b-81e1242a7513"
CloudMicrophysics = "6a9e3e04-43cd-43ba-94b9-e8782df3c71b"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e"
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
FastGaussQuadrature = "442a2c76-b920-505d-bb47-c5924d526838"
Insolation = "e98cc03f-d57e-4e3c-b70c-8d51efe9e0d8"
Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59"
IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953"
Krylov = "ba0b0d4f-ebba-5204-a429-3ac8c609bfb7"
LazyArtifacts = "4af54fe1-eca0-43a8-85a7-787d91b784e3"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand All @@ -47,37 +45,35 @@ Adapt = "4"
ArgParse = "1"
ArtifactWrappers = "0.2"
Artifacts = "1"
AtmosphericProfilesLibrary = "0.1.6"
ClimaComms = "0.6.2"
AtmosphericProfilesLibrary = "0.1.7"
ClimaComms = "0.6.4"
ClimaCore = "0.14.12"
ClimaDiagnostics = "0.2"
ClimaDiagnostics = "0.2.4"
ClimaParams = "0.10.12"
ClimaTimeSteppers = "0.7.33"
ClimaUtilities = "0.1.3"
ClimaUtilities = "0.1.14"
CloudMicrophysics = "0.22"
Dates = "1"
DiffEqBase = "6"
DocStringExtensions = "0.8, 0.9"
FastGaussQuadrature = "0.4, 0.5, 1"
DiffEqBase = "6.145"
FastGaussQuadrature = "0.5, 1"
Insolation = "0.9.2"
Interpolations = "0.14, 0.15"
IntervalSets = "0.5, 0.6, 0.7"
Interpolations = "0.15.1"
Krylov = "0.9"
LazyArtifacts = "1"
LinearAlgebra = "1"
Logging = "1"
NCDatasets = "0.14.2"
NVTX = "0.3"
Pkg = "1.8"
Pkg = "1.9"
Printf = "1"
RRTMGP = "0.17"
Random = "1"
RootSolvers = "0.2, 0.3, 0.4"
SciMLBase = "1, 2"
StaticArrays = "1"
RootSolvers = "0.4"
SciMLBase = "2.12"
StaticArrays = "1.7"
Statistics = "1"
StatsBase = "0.33, 0.34"
StatsBase = "0.34"
SurfaceFluxes = "0.11"
Thermodynamics = "0.12.4"
YAML = "0.4"
julia = "1.7"
julia = "1.9"
2 changes: 1 addition & 1 deletion calibration/model_interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ redirect_stderr(IOContext(stderr, :stacktrace_types_limited => Ref(false)))
import ClimaAtmos as CA
import YAML
import ClimaComms
@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends
ClimaComms.@import_required_backends
using ClimaUtilities.ClimaArtifacts
import ClimaCalibrate:
set_up_forward_model,
Expand Down
2 changes: 1 addition & 1 deletion calibration/test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195"
YAML = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6"

[compat]
ClimaCalibrate = "0.0.2"
ClimaCalibrate = "0.0.2, 0.0.3"
Loading

0 comments on commit d126287

Please sign in to comment.