Skip to content

Commit 7acdc2b

Browse files
authored
CI: for the macOS CI jobs with the MKL provider, force MKL_jll 2023 to be installed (#286)
CI: for the macOS CI jobs with the MKL provider, force MKL_jll 2023 to be installed
1 parent 76732cd commit 7acdc2b

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

.ci/macos_mkl_2023.jl

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# In MKL 2024, Intel dropped support for macOS.
2+
# So, in CI, for the macOS jobs, we force MKL 2023 to be installed (instead of
3+
# MKL 2024).
4+
5+
import TOML
6+
7+
using Test: @test
8+
9+
function main()
10+
root_dotci_dir = @__DIR__
11+
root_dir = dirname(root_dotci_dir)
12+
root_project_toml_filename = joinpath(root_dir, "Project.toml")
13+
project = TOML.parsefile(root_project_toml_filename)
14+
old_mkl_jll_compat = project["compat"]["MKL_jll"]
15+
old_mkl_jll_compat_list = strip.(split(strip(old_mkl_jll_compat), ","))
16+
17+
# Regression test to catch if we ever drop support for MKL_jll 2023.
18+
# Because, if we ever do choose to drop support for MKL_jll 2023, then this
19+
# entire script should probably be deleted, since Intel dropped support for
20+
# macOS in MKL 2024.
21+
@test "2023" in old_mkl_jll_compat_list
22+
23+
new_compat = "2023"
24+
project["compat"]["MKL_jll"] = new_compat # force MKL_jll 2023
25+
open(root_project_toml_filename, "w") do io
26+
TOML.print(io, project)
27+
end
28+
@info "Changed the compat entry for MKL_jll to: $(new_compat)"
29+
return nothing
30+
end
31+
32+
main()

.github/workflows/CI.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ jobs:
5757
version: ${{ matrix.version }}
5858
arch: ${{ matrix.arch }}
5959
- uses: julia-actions/cache@v1
60+
# In MKL 2024, Intel dropped support for macOS.
61+
# So, in CI, for the macOS jobs, we force MKL 2023 to be installed (instead of
62+
# MKL 2024).
63+
- run: julia .ci/macos_mkl_2023.jl
64+
if: (matrix.os == 'macOS-latest') && (matrix.provider == 'mkl')
6065
- name: Set Preferences
6166
run: julia --project .github/set_ci_preferences.jl "${{ matrix.provider }}"
6267
- uses: julia-actions/julia-runtest@v1

0 commit comments

Comments
 (0)