From f9d5e0aa212b42e56d9650022327cb7168a7b441 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Thu, 2 May 2019 14:17:08 +0200 Subject: [PATCH] Use an already made archive for the armhf toolchains instead of git clone. First, we don't need to clone all the git repository, we only need a sub-directory. Secondly, as we the base_deps archives only archive the sub-directory, subsequent run of kiwix-build in the ci will try to do a git update on a non git repository. By making ourselves a tar archive, we simplify the process. The archive on download.kiwix.org has been made with : `tar czf raspberrypy-tools.tar.gz raspberrypi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64` `raspberrypi-tools` being a clone of `https://github.com/raspberrypi/tools` commit sha is 5caa7046982f0539cf5380f94da04b31129ed521 --- kiwixbuild/dependencies/armhf.py | 9 +++++---- kiwixbuild/platforms/armhf.py | 1 + travis/compile_all.py | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/kiwixbuild/dependencies/armhf.py b/kiwixbuild/dependencies/armhf.py index 4ba5200..b79735e 100644 --- a/kiwixbuild/dependencies/armhf.py +++ b/kiwixbuild/dependencies/armhf.py @@ -1,11 +1,12 @@ -from .base import Dependency, GitClone, NoopBuilder +from .base import Dependency, ReleaseDownload, NoopBuilder +from kiwixbuild.utils import Remotefile class armhf_toolchain(Dependency): neutral = True name = 'armhf' - class Source(GitClone): - git_remote = "https://github.com/raspberrypi/tools" - git_dir = "raspberrypi-tools" + class Source(ReleaseDownload): + archive = Remotefile('raspberrypi-tools.tar.gz', + 'e72b35436f2f23f2f7df322d6c318b9be57b21596b5ff0b8936af4ad94e04f2e') Builder = NoopBuilder diff --git a/kiwixbuild/platforms/armhf.py b/kiwixbuild/platforms/armhf.py index 98a1645..ec3b574 100644 --- a/kiwixbuild/platforms/armhf.py +++ b/kiwixbuild/platforms/armhf.py @@ -34,6 +34,7 @@ class ArmhfPlatformInfo(PlatformInfo): @property def root_path(self): return pj(self.tlc_source.source_path, + 'raspberrypi-tools', 'arm-bcm2708', 'gcc-linaro-{}-raspbian-x64'.format(self.arch_full)) diff --git a/travis/compile_all.py b/travis/compile_all.py index 137e0b9..f91440d 100755 --- a/travis/compile_all.py +++ b/travis/compile_all.py @@ -230,9 +230,9 @@ def make_deps_archive(target, full=False): base_deps_versions['pugixml'])] files_to_archive += HOME.glob('BUILD_*/pugixml-{}'.format( base_deps_versions['pugixml'])) - toolchains_subdirs = HOME.glob('**/TOOLCHAINS/*/*') if PLATFORM.startswith('armhf'): - files_to_archive += [SOURCE_DIR/'raspberrypi-tools'] + files_to_archive += (SOURCE_DIR/'armhf').glob('*') + toolchains_subdirs = HOME.glob('**/TOOLCHAINS/*/*') for subdir in toolchains_subdirs: if not subdir.match('tools'): files_to_archive.append(subdir)