|
49 | 49 | with: |
50 | 50 | files: lcov.info |
51 | 51 | token: ${{ secrets.CODECOV_TOKEN }} |
| 52 | + testoldest: |
| 53 | + name: Test Lower Compat Bounds |
| 54 | + runs-on: ubuntu-latest |
| 55 | + # Only run on release branches: this pins the *registered* ecosystem |
| 56 | + # (including QuantumPropagators) to the lowest versions allowed by the |
| 57 | + # `[compat]` bounds in Project.toml. A consistent solution generally only |
| 58 | + # exists for a released version, not while a breaking sibling version is |
| 59 | + # still under development on `master`/`dev`. |
| 60 | + if: startsWith(github.ref, 'refs/heads/release-') |
| 61 | + # Informational only: a failure here must not fail the overall workflow. |
| 62 | + continue-on-error: true |
| 63 | + steps: |
| 64 | + - uses: actions/checkout@v6 |
| 65 | + - uses: julia-actions/setup-julia@v3 |
| 66 | + with: |
| 67 | + # Oldest supported Julia (the `julia` compat lower bound). |
| 68 | + version: '1.9' |
| 69 | + - uses: julia-actions/cache@v3 |
| 70 | + - name: "Instantiate test environment with oldest dependencies" |
| 71 | + shell: julia --color=yes --project=test {0} |
| 72 | + run: | |
| 73 | + import Pkg |
| 74 | + # The QuantumControlRegistry hosts org package versions not (yet) in General. |
| 75 | + Pkg.Registry.add(Pkg.RegistrySpec(name="General")) |
| 76 | + Pkg.Registry.add(Pkg.RegistrySpec(url="https://github.com/JuliaQuantumControl/QuantumControlRegistry.git")) |
| 77 | + Pkg.Registry.update() |
| 78 | + # Dev-install the package under test from the current checkout. On |
| 79 | + # Julia < 1.11 the `[sources]` entry in test/Project.toml is ignored, |
| 80 | + # so QuantumControl would otherwise be taken from the registry. |
| 81 | + Pkg.develop(Pkg.PackageSpec(path=pwd())) |
| 82 | + # Pin the registered dependencies to the oldest versions allowed by the |
| 83 | + # `[compat]` bounds in Project.toml. Sibling org packages (GRAPE, |
| 84 | + # Krotov, ...) are left to the resolver, which selects versions |
| 85 | + # consistent with the pinned QuantumPropagators floor. |
| 86 | + Pkg.pin([ |
| 87 | + Pkg.PackageSpec(name="ChainRulesCore", version="1.0.0"), |
| 88 | + Pkg.PackageSpec(name="FileIO", version="1.0.0"), |
| 89 | + Pkg.PackageSpec(name="FiniteDifferences", version="0.12.0"), |
| 90 | + Pkg.PackageSpec(name="IOCapture", version="0.2.4"), |
| 91 | + Pkg.PackageSpec(name="JLD2", version="0.4.0"), |
| 92 | + Pkg.PackageSpec(name="QuantumPropagators", version="0.8.2"), |
| 93 | + Pkg.PackageSpec(name="Zygote", version="0.6.0"), |
| 94 | + ]) |
| 95 | + Pkg.precompile() |
| 96 | + Pkg.status() |
| 97 | + - name: "Run tests" |
| 98 | + shell: julia --color=yes --project=test --depwarn="yes" --check-bounds="yes" {0} |
| 99 | + run: | |
| 100 | + include(joinpath(pwd(), "test", "runtests.jl")) |
52 | 101 | docs: |
53 | 102 | name: Documentation |
54 | 103 | runs-on: ubuntu-latest |
|
0 commit comments