From b0a61e0a34cea254e49beab402d318eca86d19e1 Mon Sep 17 00:00:00 2001 From: partouf Date: Mon, 8 Apr 2024 19:38:31 +0200 Subject: [PATCH 1/3] add native_aarch64 install option --- bin/lib/ce_install.py | 3 +++ bin/lib/installable/installable.py | 3 +++ bin/lib/installation_context.py | 2 ++ bin/yaml/cpp.yaml | 14 ++++++++++++++ 4 files changed, 22 insertions(+) diff --git a/bin/lib/ce_install.py b/bin/lib/ce_install.py index 6f1b03763..e6b28d444 100644 --- a/bin/lib/ce_install.py +++ b/bin/lib/ce_install.py @@ -148,6 +148,7 @@ def squash_mount_check(rootfolder, subdir, context): ) @click.option("--enable", metavar="TYPE", multiple=True, help='Enable targets of type TYPE (e.g. "nightly")') @click.option("--only-nightly", is_flag=True, help="Only install the nightly targets") +@click.option("--only-native-aarch64", is_flag=True, help="Only install the Native Aarch64 targets") @click.option( "--cache", metavar="DIR", @@ -196,6 +197,7 @@ def cli( dry_run: bool, enable: List[str], only_nightly: bool, + only_native_aarch64: bool, cache: Optional[Path], yaml_dir: Path, allow_unsafe_ssl: bool, @@ -224,6 +226,7 @@ def cli( dry_run=dry_run, is_nightly_enabled="nightly" in enable, only_nightly=only_nightly, + only_native_aarch64=only_native_aarch64, cache=cache, yaml_dir=yaml_dir, allow_unsafe_ssl=allow_unsafe_ssl, diff --git a/bin/lib/installable/installable.py b/bin/lib/installable/installable.py index 43452d6ba..6d91ed263 100644 --- a/bin/lib/installable/installable.py +++ b/bin/lib/installable/installable.py @@ -109,6 +109,9 @@ def should_install(self) -> bool: if self.install_context.only_nightly and not self.nightly_like: return False + if self.install_context.only_native_aarch64 and self.config_get("if", "") != "native_aarch64": + return False + return self.install_always or not self.is_installed() def should_build(self): diff --git a/bin/lib/installation_context.py b/bin/lib/installation_context.py index 134a52cb7..d730f1fe0 100644 --- a/bin/lib/installation_context.py +++ b/bin/lib/installation_context.py @@ -43,6 +43,7 @@ def __init__( dry_run: bool, is_nightly_enabled: bool, only_nightly: bool, + only_native_aarch64: bool, cache: Optional[Path], yaml_dir: Path, allow_unsafe_ssl: bool, @@ -58,6 +59,7 @@ def __init__( self.dry_run = dry_run self.is_nightly_enabled = is_nightly_enabled self.only_nightly = only_nightly + self.only_native_aarch64 = only_native_aarch64 retry_strategy = requests.adapters.Retry( total=10, backoff_factor=1, diff --git a/bin/yaml/cpp.yaml b/bin/yaml/cpp.yaml index 63d3963da..b18f0fe6d 100644 --- a/bin/yaml/cpp.yaml +++ b/bin/yaml/cpp.yaml @@ -1302,3 +1302,17 @@ compilers: - name: 4.9.4 tag: v2.6 name_no_dots: 494 + native_aarch64: + if: native_aarch64 + armofficial: + type: script + dir: "{subdir}/arm-clang-{name}" + check_file: "arm-linux-compiler-23.10_Ubuntu-22.04/llvm-bin/clang++" + subdir: native_aarch64 + script: | + tar -xf "archive.tar" --strip-components=1 + arm-compiler-for-linux_23.10_Ubuntu-22.04/arm-compiler-for-linux_23.10_Ubuntu-22.04.sh -a -i "{destination}/{dir}" + targets: + - name: 23.10 + fetch: + - https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/23-10/arm-compiler-for-linux_23.10_Ubuntu-22.04_aarch64.tar archive.tar From 2337698bdf8522b7715596bf604b118d39678ecf Mon Sep 17 00:00:00 2001 From: partouf Date: Mon, 8 Apr 2024 19:46:46 +0200 Subject: [PATCH 2/3] fix tests --- bin/test/installable/git_test.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/test/installable/git_test.py b/bin/test/installable/git_test.py index efa25129d..9494ae7c0 100644 --- a/bin/test/installable/git_test.py +++ b/bin/test/installable/git_test.py @@ -28,6 +28,7 @@ def _ensure_no_global_config(): def fake_context_fixture(): ctx = mock.Mock(spec=InstallationContext) ctx.only_nightly = False + ctx.only_native_aarch64 = False return ctx @@ -35,6 +36,7 @@ def fake_context_fixture(): def fake_context_nightly_fixture(): ctx = mock.Mock(spec=InstallationContext) ctx.only_nightly = True + ctx.only_native_aarch64 = False return ctx @@ -100,7 +102,7 @@ def previously_installed_ghi_ficture(fake_context, tmp_path, fake_remote_repo, s domainrepo="", repo=fake_remote_repo, check_file="fake-none", - method="nightlyclone", + method="nightlyclone" ), ) # Fake out an installation at prior_version From 3374bf5760573fd6168afe4a400963d4d4c92c01 Mon Sep 17 00:00:00 2001 From: partouf Date: Mon, 8 Apr 2024 22:05:44 +0200 Subject: [PATCH 3/3] reformat --- bin/test/installable/git_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/test/installable/git_test.py b/bin/test/installable/git_test.py index 9494ae7c0..813e9dab7 100644 --- a/bin/test/installable/git_test.py +++ b/bin/test/installable/git_test.py @@ -102,7 +102,7 @@ def previously_installed_ghi_ficture(fake_context, tmp_path, fake_remote_repo, s domainrepo="", repo=fake_remote_repo, check_file="fake-none", - method="nightlyclone" + method="nightlyclone", ), ) # Fake out an installation at prior_version