Do not use base_deps when building releases.
Initially we were building all our dependencies in release. This was simply made by always compiling project using autotool or cmake in release. As our project are using meson/qmake, all the dependencies are build in release. However, with recent port to Windows github CI, we have two problems: - We have moved almost all buildsystem to meson - On Windows, we cannot mix debug and release build. So, when doing a release, do not use base dependencies cache. This will extend the release workflow as we need to build everything but at least we should build everything correctly.
This commit is contained in:
parent
c17c2f274c
commit
b4bc9dbec9
|
@ -15,6 +15,7 @@ from common import (
|
||||||
HOME,
|
HOME,
|
||||||
COMPILE_CONFIG,
|
COMPILE_CONFIG,
|
||||||
OS_NAME,
|
OS_NAME,
|
||||||
|
MAKE_RELEASE,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -32,17 +33,21 @@ def download_base_archive(base_name):
|
||||||
return file_path
|
return file_path
|
||||||
|
|
||||||
|
|
||||||
|
def get_archive_name():
|
||||||
ARCHIVE_NAME_TEMPLATE = "base_deps_{os}_{config}_{version}.tar.gz"
|
ARCHIVE_NAME_TEMPLATE = "base_deps_{os}_{config}_{version}.tar.gz"
|
||||||
|
|
||||||
if COMPILE_CONFIG == "flatpak":
|
if COMPILE_CONFIG == "flatpak":
|
||||||
base_dep_archive_name = "base_deps_flatpak.tar.gz"
|
return "base_deps_flatpak.tar.gz"
|
||||||
else:
|
|
||||||
base_dep_archive_name = ARCHIVE_NAME_TEMPLATE.format(
|
return ARCHIVE_NAME_TEMPLATE.format(
|
||||||
os=OS_NAME,
|
os=OS_NAME,
|
||||||
config=COMPILE_CONFIG,
|
config=COMPILE_CONFIG,
|
||||||
version=base_deps_meta_version,
|
version=base_deps_meta_version,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
base_dep_archive_name = get_archive_name()
|
||||||
print_message("Getting archive {}", base_dep_archive_name)
|
print_message("Getting archive {}", base_dep_archive_name)
|
||||||
try:
|
try:
|
||||||
local_filename = download_base_archive(base_dep_archive_name)
|
local_filename = download_base_archive(base_dep_archive_name)
|
||||||
|
@ -58,3 +63,10 @@ except URLError:
|
||||||
archive_file = make_deps_archive(name=base_dep_archive_name, full=True)
|
archive_file = make_deps_archive(name=base_dep_archive_name, full=True)
|
||||||
upload(archive_file, "ci@tmp.kiwix.org:30022", "/data/tmp/ci")
|
upload(archive_file, "ci@tmp.kiwix.org:30022", "/data/tmp/ci")
|
||||||
os.remove(str(archive_file))
|
os.remove(str(archive_file))
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
if MAKE_RELEASE:
|
||||||
|
print_message("We are building release. Don't download deps archive.")
|
||||||
|
else:
|
||||||
|
main()
|
||||||
|
|
Loading…
Reference in New Issue