Skip to content

Commit

Permalink
CI: for the macOS CI jobs with the MKL provider, force MKL_jll 2023 t…
Browse files Browse the repository at this point in the history
…o be installed (#286)

CI: for the macOS CI jobs with the MKL provider, force MKL_jll 2023 to be installed
  • Loading branch information
DilumAluthge authored Dec 10, 2023
1 parent 76732cd commit 7acdc2b
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .ci/macos_mkl_2023.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# In MKL 2024, Intel dropped support for macOS.
# So, in CI, for the macOS jobs, we force MKL 2023 to be installed (instead of
# MKL 2024).

import TOML

using Test: @test

function main()
root_dotci_dir = @__DIR__
root_dir = dirname(root_dotci_dir)
root_project_toml_filename = joinpath(root_dir, "Project.toml")
project = TOML.parsefile(root_project_toml_filename)
old_mkl_jll_compat = project["compat"]["MKL_jll"]
old_mkl_jll_compat_list = strip.(split(strip(old_mkl_jll_compat), ","))

# Regression test to catch if we ever drop support for MKL_jll 2023.
# Because, if we ever do choose to drop support for MKL_jll 2023, then this
# entire script should probably be deleted, since Intel dropped support for
# macOS in MKL 2024.
@test "2023" in old_mkl_jll_compat_list

new_compat = "2023"
project["compat"]["MKL_jll"] = new_compat # force MKL_jll 2023
open(root_project_toml_filename, "w") do io
TOML.print(io, project)
end
@info "Changed the compat entry for MKL_jll to: $(new_compat)"
return nothing
end

main()
5 changes: 5 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ jobs:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v1
# In MKL 2024, Intel dropped support for macOS.
# So, in CI, for the macOS jobs, we force MKL 2023 to be installed (instead of
# MKL 2024).
- run: julia .ci/macos_mkl_2023.jl
if: (matrix.os == 'macOS-latest') && (matrix.provider == 'mkl')
- name: Set Preferences
run: julia --project .github/set_ci_preferences.jl "${{ matrix.provider }}"
- uses: julia-actions/julia-runtest@v1
Expand Down

0 comments on commit 7acdc2b

Please sign in to comment.