From 02e531d7e2648eb43d7c7ea6b10d6f86bef2421a Mon Sep 17 00:00:00 2001 From: ArnoStrouwen Date: Sun, 24 Dec 2023 13:44:15 +0100 Subject: [PATCH 1/3] downgrade CI --- .github/workflows/Downgrade.yml | 29 +++++++++++++++++++++++ Project.toml | 42 ++++++++++++++++----------------- src/Optimization.jl | 39 ------------------------------ test/Project.toml | 10 +------- 4 files changed, 50 insertions(+), 70 deletions(-) create mode 100644 .github/workflows/Downgrade.yml diff --git a/.github/workflows/Downgrade.yml b/.github/workflows/Downgrade.yml new file mode 100644 index 000000000..01ff8cad5 --- /dev/null +++ b/.github/workflows/Downgrade.yml @@ -0,0 +1,29 @@ +name: Downgrade +on: + pull_request: + branches: + - master + paths-ignore: + - 'docs/**' + push: + branches: + - master + paths-ignore: + - 'docs/**' +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + version: ['1'] + steps: + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@v1 + with: + version: ${{ matrix.version }} + - uses: cjdoris/julia-downgrade-compat-action@v1 +# if: ${{ matrix.version == '1.6' }} + with: + skip: Pkg,TOML + - uses: julia-actions/julia-buildpkg@v1 + - uses: julia-actions/julia-runtest@v1 \ No newline at end of file diff --git a/Project.toml b/Project.toml index 0632cb149..b021ce120 100644 --- a/Project.toml +++ b/Project.toml @@ -14,7 +14,6 @@ Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" ProgressLogging = "33c8b6b6-d38a-422a-b730-caa89a2f386c" Reexport = "189a3867-3050-52da-a836-e630ba90ab69" -Requires = "ae029012-a4dd-5104-9daa-d747884805df" SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" SymbolicIndexingInterface = "2efcf032-c050-4f8e-a9bb-153293bab1f5" @@ -42,31 +41,30 @@ OptimizationTrackerExt = "Tracker" OptimizationZygoteExt = "Zygote" [compat] -ADTypes = "0.1.5, 0.2" -ArrayInterface = "6, 7" -ConsoleProgressMonitor = "0.1" -DocStringExtensions = "0.8, 0.9" -Enzyme = "0.11.2" -FiniteDiff = "2" -ForwardDiff = "0.10" -LinearAlgebra = "1" -Logging = "1" -LoggingExtras = "0.4, 0.5, 1" -ModelingToolkit = "8" +ADTypes = "0.2.5" +ArrayInterface = "7.6" +ConsoleProgressMonitor = "0.1.1" +DocStringExtensions = "0.9" +Enzyme = "0.11.9" +FiniteDiff = "2.12" +ForwardDiff = "0.10.26" +LinearAlgebra = "1.9" +Logging = "1.9" +LoggingExtras = "0.4" +ModelingToolkit = "8.74" Pkg = "1" -Printf = "1" +Printf = "1.9" ProgressLogging = "0.1" -Reexport = "0.2, 1.0" -Requires = "1.0" -ReverseDiff = "1" -SciMLBase = "1.79.0, 2" -SparseArrays = "1" -SparseDiffTools = "2" +Reexport = "1.2" +ReverseDiff = "1.14" +SciMLBase = "2.11" +SparseArrays = "1.9" +SparseDiffTools = "2.14" SymbolicIndexingInterface = "0.3" -Symbolics = "5" +Symbolics = "5.12" TerminalLoggers = "0.1" -Tracker = "0.2" -Zygote = "0.6" +Tracker = "0.2.29" +Zygote = "0.6.67" julia = "1.9" [extras] diff --git a/src/Optimization.jl b/src/Optimization.jl index 4a043ea0d..8c338a7d7 100644 --- a/src/Optimization.jl +++ b/src/Optimization.jl @@ -25,45 +25,6 @@ include("function.jl") include("adtypes.jl") include("cache.jl") -@static if !isdefined(Base, :get_extension) - function __init__() - # AD backends - @require FiniteDiff="6a86dc24-6348-571c-b903-95158fe2bd41" begin - include("../ext/OptimizationFiniteDiffExt.jl") - using .OptimizationFiniteDiffExt - end - @require ForwardDiff="f6369f11-7733-5829-9624-2563aa707210" begin - include("../ext/OptimizationForwardDiffExt.jl") - using .OptimizationForwardDiffExt - end - @require ReverseDiff="37e2e3b7-166d-5795-8a7a-e32c996b4267" begin - include("../ext/OptimizationReverseDiffExt.jl") - using .OptimizationReverseDiffExt - end - @require Tracker="9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" begin - include("../ext/OptimizationTrackerExt.jl") - using .OptimizationTrackerExt - end - @require Zygote="e88e6eb3-aa80-5325-afca-941959d7151f" begin - include("../ext/OptimizationZygoteExt.jl") - using .OptimizationZygoteExt - end - @require ModelingToolkit="961ee093-0014-501f-94e3-6117800e7a78" begin - include("../ext/OptimizationMTKExt.jl") - using .OptimizationMTKExt - end - @require Enzyme="7da242da-08ed-463a-9acd-ee780be4f1d9" begin - include("../ext/OptimizationEnzymeExt.jl") - using .OptimizationEnzymeExt - end - @require SparseDiffTools="47a9eef4-7e08-11e9-0b38-333d64bd3804" begin - @require Symbolics="0c5d862f-8b57-4792-8d23-62f2024744c7" begin - include("../ext/OptimizationSparseDiffExt.jl") - using .OptimizationSparseDiffExt - end - end - end -end export solve, OptimizationCache diff --git a/test/Project.toml b/test/Project.toml index 5d1c78904..af64fbe0c 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -30,19 +30,11 @@ Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" Aqua = "0.8" ComponentArrays = ">= 0.13.9" DiffEqFlux = ">= 2" -Enzyme = ">= 0.11.0" -FiniteDiff = ">= 2.8.1" Flux = "0.13, 0.14" -ForwardDiff = ">= 0.10.19" IterTools = ">= 1.3.0" Lux = ">= 0.4.50" -ModelingToolkit = ">= 8.11.0" Optim = ">= 1.4.1" Optimisers = ">= 0.2.5" OrdinaryDiffEq = ">= 5" -ReverseDiff = ">= 1.9.0" SafeTestsets = ">= 0.0.1" -SciMLSensitivity = ">= 7.0.0" -Tracker = ">= 0.2" -Zygote = ">= 0.5" -julia = "1.5" +SciMLSensitivity = ">= 7.0.0" \ No newline at end of file From 0420edb49eae295c21a557b5a3c24e82e0e62760 Mon Sep 17 00:00:00 2001 From: Arno Strouwen Date: Sun, 24 Dec 2023 17:21:27 +0100 Subject: [PATCH 2/3] add extension tests --- .github/workflows/Downgrade.yml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/.github/workflows/Downgrade.yml b/.github/workflows/Downgrade.yml index 01ff8cad5..dafdccf96 100644 --- a/.github/workflows/Downgrade.yml +++ b/.github/workflows/Downgrade.yml @@ -14,8 +14,28 @@ jobs: test: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: version: ['1'] + group: + - Core + - OptimizationBBO + - OptimizationCMAEvolutionStrategy + - OptimizationEvolutionary + - OptimizationFlux + - OptimizationGCMAES + - OptimizationMetaheuristics + - OptimizationMOI + - OptimizationMultistartOptimization + - OptimizationNLopt + #- OptimizationNonconvex + - OptimizationNOMAD + - OptimizationOptimJL + - OptimizationOptimisers + - OptimizationPRIMA + - OptimizationQuadDIRECT + - OptimizationSpeedMapping + - OptimizationPolyalgorithms steps: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@v1 @@ -26,4 +46,6 @@ jobs: with: skip: Pkg,TOML - uses: julia-actions/julia-buildpkg@v1 - - uses: julia-actions/julia-runtest@v1 \ No newline at end of file + - uses: julia-actions/julia-runtest@v1 + env: + GROUP: ${{ matrix.group }} \ No newline at end of file From bd624b46550c22d1bea8336b2c160377613fa873 Mon Sep 17 00:00:00 2001 From: Arno Strouwen Date: Sun, 24 Dec 2023 18:20:51 +0100 Subject: [PATCH 3/3] make QuadDIRECT available for Downgrade CI --- .github/workflows/Downgrade.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/Downgrade.yml b/.github/workflows/Downgrade.yml index dafdccf96..8dc8b4a9b 100644 --- a/.github/workflows/Downgrade.yml +++ b/.github/workflows/Downgrade.yml @@ -46,6 +46,8 @@ jobs: with: skip: Pkg,TOML - uses: julia-actions/julia-buildpkg@v1 + - if: ${{ matrix.group == 'OptimizationQuadDIRECT' }} + run: julia --project -e 'using Pkg; Pkg.Registry.add(RegistrySpec(url = "https://github.com/HolyLab/HolyLabRegistry.git")); Pkg.add("QuadDIRECT")' - uses: julia-actions/julia-runtest@v1 env: GROUP: ${{ matrix.group }} \ No newline at end of file