diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 44536f9..b9e4a06 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,7 +44,7 @@ jobs: with: version: ${{ matrix.version }} arch: ${{ matrix.arch }} - - uses: actions/cache@v1 + - uses: actions/cache@v4 env: cache-name: cache-artifacts with: diff --git a/src/nlp/consistency.jl b/src/nlp/consistency.jl index 8512ead..0b11d9d 100644 --- a/src/nlp/consistency.jl +++ b/src/nlp/consistency.jl @@ -21,16 +21,17 @@ function consistent_nlps( test_slack = true, test_qn = true, test_derivative = true, + test_counters = true, rtol = 1.0e-8, ) - consistent_counters(nlps, linear_api = linear_api, reimplemented = reimplemented) + test_counters && consistent_counters(nlps, linear_api = linear_api, reimplemented = reimplemented) test_meta && consistent_meta(nlps, rtol = rtol) consistent_functions(nlps, linear_api = linear_api, rtol = rtol, exclude = exclude) - consistent_counters(nlps, linear_api = linear_api, reimplemented = reimplemented) + test_counters && consistent_counters(nlps, linear_api = linear_api, reimplemented = reimplemented) for nlp in nlps reset!(nlp) end - consistent_counters(nlps, linear_api = linear_api, reimplemented = reimplemented) + test_counters && consistent_counters(nlps, linear_api = linear_api, reimplemented = reimplemented) if test_derivative for nlp in nlps @test length(gradient_check(nlp)) == 0 @@ -51,7 +52,7 @@ function consistent_nlps( linear_api = linear_api, exclude = [hess, hess_coord, hprod, jth_hess, jth_hess_coord, jth_hprod, ghjvprod] ∪ exclude, ) - consistent_counters([nlps; qnmodels], linear_api = linear_api, reimplemented = reimplemented) + test_counters && consistent_counters([nlps; qnmodels], linear_api = linear_api, reimplemented = reimplemented) end if test_slack && has_inequalities(nlps[1]) @@ -62,7 +63,7 @@ function consistent_nlps( linear_api = linear_api, exclude = [jth_hess, jth_hess_coord, jth_hprod] ∪ exclude, ) - consistent_counters(slack_nlps, linear_api = linear_api, reimplemented = reimplemented) + test_counters && consistent_counters(slack_nlps, linear_api = linear_api, reimplemented = reimplemented) end end diff --git a/src/nlp/coord-memory.jl b/src/nlp/coord-memory.jl index ebc6113..b72b4e9 100644 --- a/src/nlp/coord-memory.jl +++ b/src/nlp/coord-memory.jl @@ -1,7 +1,7 @@ export coord_memory_nlp """ - coord_memory_nlp(nlp; exclude = []) + coord_memory_nlp(nlp; linear_api = false, exclude = []) Check that the allocated memory for in place coord methods is sufficiently smaller than their allocating counter parts. diff --git a/src/nls/consistency.jl b/src/nls/consistency.jl index 5fde9b8..d1a8211 100644 --- a/src/nls/consistency.jl +++ b/src/nls/consistency.jl @@ -20,12 +20,13 @@ function consistent_nlss( linear_api = false, test_slack = true, test_ff = true, + test_counters = true, ) consistent_nls_counters(nlss) - consistent_counters(nlss, linear_api = linear_api) + test_counters && consistent_counters(nlss, linear_api = linear_api) consistent_nls_functions(nlss, exclude = exclude) consistent_nls_counters(nlss) - consistent_counters(nlss, linear_api = linear_api) + test_counters && consistent_counters(nlss, linear_api = linear_api) for nls in nlss reset!(nls) end @@ -35,8 +36,8 @@ function consistent_nlss( reset!.(nlss) slack_nlss = SlackNLSModel.(nlss) consistent_nls_functions(slack_nlss, exclude = exclude) - consistent_nls_counters(slack_nlss) - consistent_counters(slack_nlss, linear_api = linear_api) + test_counters && consistent_nls_counters(slack_nlss) + test_counters && consistent_counters(slack_nlss, linear_api = linear_api) consistent_functions( slack_nlss, linear_api = linear_api, @@ -48,8 +49,8 @@ function consistent_nlss( reset!.(nlss) ff_nlss = FeasibilityFormNLS.(nlss) consistent_nls_functions(ff_nlss, exclude = exclude) - consistent_nls_counters(ff_nlss) - consistent_counters(ff_nlss, linear_api = false) + test_counters && consistent_nls_counters(ff_nlss) + test_counters && consistent_counters(ff_nlss, linear_api = false) consistent_functions( ff_nlss, linear_api = false,