Skip to content

Commit

Permalink
fix clang on macos-14 (arm64)
Browse files Browse the repository at this point in the history
  • Loading branch information
burnpanck committed Nov 12, 2024
1 parent ff11878 commit b35e241
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions .github/generate-job-matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,30 +26,30 @@ def make_gcc_config(version: int) -> Configuration:
def make_clang_config(
version: int, platform: typing.Literal["x86-64", "arm64"] = "x86-64"
) -> Configuration:
ret = SimpleNamespace(
cfg = SimpleNamespace(
name=f"Clang-{version} ({platform})",
os=None, # replaced below
compiler=SimpleNamespace(
type="CLANG",
version=version,
cc=f"clang-{version}",
cxx=f"clang++-{version}",
),
lib="libc++",
cxx_modules=version >= 17,
std_format_support=version >= 17,
)
match platform:
case "x86-64":
ret.os = "ubuntu-22.04" if version < 17 else "ubuntu-24.04"
cfg.os = "ubuntu-22.04" if version < 17 else "ubuntu-24.04"
cfg.compiler.cc = f"clang-{version}"
cfg.compiler.cxx = f"clang++-{version}"
case "arm64":
ret.os = "macos-14"
pfx = f"/opt/homebrew/opt/llvm@{version}/bin/"
ret.compiler.cc = pfx + ret.compiler.cc
ret.compiler.cxx = pfx + ret.compiler.cxx
cfg.os = "macos-14"
pfx = f"/opt/homebrew/opt/llvm@{version}/bin"
cfg.compiler.cc = f"{pfx}/clang"
cfg.compiler.cxx = f"{pfx}/clang++"
case _:
raise KeyError(f"Unsupported platform {platform!r} for Clang")
ret.compiler = Compiler(**vars(ret.compiler))
ret = cfg
ret.compiler = Compiler(**vars(cfg.compiler))
return Configuration(**vars(ret))


Expand Down Expand Up @@ -92,6 +92,8 @@ def make_msvc_config(release: str, version: int) -> Configuration:
make_clang_config(ver, platform)
for ver in [16, 17, 18]
for platform in ["x86-64", "arm64"]
# arm64 runners are expensive; only consider one version
if ver == 18 or platform != "arm64"
]
+ [make_apple_clang_config(ver) for ver in [15]]
+ [make_msvc_config(release="14.4", version=194)]
Expand Down

0 comments on commit b35e241

Please sign in to comment.