|
3 | 3 | pull_request: |
4 | 4 | branches: |
5 | 5 | - master |
| 6 | + - v7 |
6 | 7 | push: |
7 | 8 | branches: |
8 | 9 | - master |
| 10 | + - v7 |
9 | 11 | concurrency: |
10 | 12 | # Skip intermediate builds: always. |
11 | 13 | # Cancel intermediate builds: only if it is a pull request build. |
|
19 | 21 | runs-on: ubuntu-latest |
20 | 22 | timeout-minutes: 120 |
21 | 23 | continue-on-error: ${{ matrix.group == 'Downstream' }} |
| 24 | + env: |
| 25 | + # Bypass Julia's Pkg server for registry; it lags behind JuliaRegistries/General |
| 26 | + # by up to hours and caches on a TTL. Resolve against git directly so newly |
| 27 | + # registered package versions are seen immediately by CI. |
| 28 | + JULIA_PKG_SERVER: "" |
22 | 29 | strategy: |
23 | 30 | fail-fast: false |
24 | 31 | matrix: |
|
75 | 82 | cache-compiled: 'false' |
76 | 83 | - name: Cache Julia depot (PR — restore only) |
77 | 84 | if: github.event_name != 'push' |
78 | | - uses: actions/cache/restore@v4 |
| 85 | + uses: actions/cache/restore@v5 |
79 | 86 | continue-on-error: true |
80 | 87 | with: |
81 | 88 | path: | |
|
91 | 98 | key: julia-cache;workflow=${{ github.workflow }};job=${{ github.job }};os=${{ runner.os }};group=${{ matrix.group }};version=${{ matrix.version }};run_id=${{ github.run_id }};run_attempt=${{ github.run_attempt }} |
92 | 99 | restore-keys: | |
93 | 100 | julia-cache;workflow=${{ github.workflow }};job=${{ github.job }};os=${{ runner.os }};group=${{ matrix.group }};version=${{ matrix.version }}; |
| 101 | + - name: Develop local path deps (Julia < 1.11) |
| 102 | + shell: julia --color=yes --project=. {0} |
| 103 | + run: | |
| 104 | + using Pkg |
| 105 | + if VERSION < v"1.11.0-DEV.0" |
| 106 | + toml = Pkg.TOML.parsefile("Project.toml") |
| 107 | + if haskey(toml, "sources") |
| 108 | + specs = Pkg.PackageSpec[] |
| 109 | + for (dep, spec) in toml["sources"] |
| 110 | + if spec isa Dict && haskey(spec, "path") && isdir(spec["path"]) |
| 111 | + @info "Developing" dep spec["path"] |
| 112 | + push!(specs, Pkg.PackageSpec(path=spec["path"])) |
| 113 | + end |
| 114 | + end |
| 115 | + # Batch the develop call so Pkg resolves all path deps together. |
| 116 | + # Calling Pkg.develop once per source triggers a full re-resolve |
| 117 | + # each time, which fails if any sibling path dep isn't yet |
| 118 | + # registered (e.g. OrdinaryDiffEqRosenbrockTableaus). |
| 119 | + isempty(specs) || Pkg.develop(specs) |
| 120 | + end |
| 121 | + end |
| 122 | + - name: Refresh General registry directly from git |
| 123 | + shell: julia --color=yes --project=. {0} |
| 124 | + run: | |
| 125 | + using Pkg |
| 126 | + # Force a fresh git clone of General to dodge pkg server lag. |
| 127 | + try |
| 128 | + Pkg.Registry.rm("General") |
| 129 | + catch |
| 130 | + end |
| 131 | + Pkg.Registry.add(Pkg.RegistrySpec(url = "https://github.com/JuliaRegistries/General.git")) |
94 | 132 | - uses: julia-actions/julia-buildpkg@v1 |
95 | 133 | - uses: julia-actions/julia-runtest@v1 |
96 | 134 | with: |
|
0 commit comments