-
-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
1 parent
c17c2f2
commit b4bc9db
Showing
1 changed file
with
31 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ | |
HOME, | ||
COMPILE_CONFIG, | ||
OS_NAME, | ||
MAKE_RELEASE, | ||
) | ||
|
||
|
||
|
@@ -32,29 +33,40 @@ def download_base_archive(base_name): | |
return file_path | ||
|
||
|
||
ARCHIVE_NAME_TEMPLATE = "base_deps_{os}_{config}_{version}.tar.gz" | ||
def get_archive_name(): | ||
ARCHIVE_NAME_TEMPLATE = "base_deps_{os}_{config}_{version}.tar.gz" | ||
|
||
if COMPILE_CONFIG == "flatpak": | ||
base_dep_archive_name = "base_deps_flatpak.tar.gz" | ||
else: | ||
base_dep_archive_name = ARCHIVE_NAME_TEMPLATE.format( | ||
if COMPILE_CONFIG == "flatpak": | ||
return "base_deps_flatpak.tar.gz" | ||
|
||
return ARCHIVE_NAME_TEMPLATE.format( | ||
os=OS_NAME, | ||
config=COMPILE_CONFIG, | ||
version=base_deps_meta_version, | ||
) | ||
|
||
print_message("Getting archive {}", base_dep_archive_name) | ||
try: | ||
local_filename = download_base_archive(base_dep_archive_name) | ||
with tarfile.open(local_filename) as f: | ||
f.extractall(str(HOME)) | ||
os.remove(str(local_filename)) | ||
except URLError: | ||
if COMPILE_CONFIG == "flatpak": | ||
print_message("Cannot get archive. Move on") | ||
|
||
def main(): | ||
base_dep_archive_name = get_archive_name() | ||
print_message("Getting archive {}", base_dep_archive_name) | ||
try: | ||
local_filename = download_base_archive(base_dep_archive_name) | ||
with tarfile.open(local_filename) as f: | ||
f.extractall(str(HOME)) | ||
os.remove(str(local_filename)) | ||
except URLError: | ||
if COMPILE_CONFIG == "flatpak": | ||
print_message("Cannot get archive. Move on") | ||
else: | ||
print_message("Cannot get archive. Build dependencies") | ||
run_kiwix_build("alldependencies", config=COMPILE_CONFIG) | ||
archive_file = make_deps_archive(name=base_dep_archive_name, full=True) | ||
upload(archive_file, "[email protected]:30022", "/data/tmp/ci") | ||
os.remove(str(archive_file)) | ||
|
||
|
||
if __name__ == "__main__": | ||
if MAKE_RELEASE: | ||
print_message("We are building release. Don't download deps archive.") | ||
else: | ||
print_message("Cannot get archive. Build dependencies") | ||
run_kiwix_build("alldependencies", config=COMPILE_CONFIG) | ||
archive_file = make_deps_archive(name=base_dep_archive_name, full=True) | ||
upload(archive_file, "[email protected]:30022", "/data/tmp/ci") | ||
os.remove(str(archive_file)) | ||
main() |