Skip to content

Commit 5c27139

Browse files
committed
Update
1 parent 0689934 commit 5c27139

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

.github/workflows/julia-tests.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,24 +81,29 @@ jobs:
8181
with:
8282
name: ${{ matrix.triplet }}-jll
8383
path: ${{ github.workspace }}/HiGHS_jll
84+
# Now we need to update the Artifacts.toml in the HiGHS_jll that we've
85+
# downloaded. Otherwise Julia will try to download the default on install.
86+
- shell: julia --color=yes {0}
87+
run: |
88+
file = joinpath(ENV["GITHUB_WORKSPACE"], "HiGHS_jll", "Artifacts.toml")
89+
m = match(r"git-tree-sha1 = \"(.+?)\"", read(file, String))
90+
dir = escape_string(joinpath(ENV["GITHUB_WORKSPACE"], "products"))
91+
write(
92+
expanduser(joinpath("~", ".julia", "artifacts", "Overrides.toml")),
93+
"$(m[1]) = \"$(dir)\"\n",
94+
)
95+
Pkg.develop(; path = joinpath(ENV["GITHUB_WORKSPACE"], "HiGHS_jll"))
96+
# We need to update the [compat] section in HiGHS to support HiGHS_jll
8497
- shell: julia --color=yes {0}
8598
run: |
8699
using Pkg
87100
Pkg.develop("HiGHS")
88-
Pkg.develop(; path = joinpath(ENV["GITHUB_WORKSPACE"], "HiGHS_jll"))
89101
project_filename = joinpath(Pkg.devdir(), "HiGHS", "Project.toml")
90102
project = read(project_filename, String)
91103
write(
92104
project_filename,
93105
replace(project, r"HiGHS_jll = \"=.+?\"" => "HiGHS_jll = \"1\""),
94106
)
95-
#
96-
import HiGHS_jll
97-
artifact_dir = HiGHS_jll.artifact_dir
98-
sha = last(splitpath(artifact_dir))
99-
dir = escape_string(joinpath(ENV["GITHUB_WORKSPACE"], "products"))
100-
content = "$sha = \"$(dir)\"\n"
101-
write(replace(artifact_dir, sha => "Overrides.toml"), content)
102107
- shell: julia --color=yes {0}
103108
run: |
104109
using Pkg

0 commit comments

Comments
 (0)