Skip to content

Conversation

maflcko
Copy link
Member

@maflcko maflcko commented Mar 28, 2021

Currently the Android task has several issues:

  • It is missing a cache instruction, thus failing the build on Cirrus CI
  • It is running the depends build twice

Fix those issues

@icota
Copy link
Contributor

icota commented Mar 28, 2021

tACK 04254c7

Thanks again @MarcoFalke

@ryanofsky
Copy link
Contributor

Code review ACK faf847f. Thanks for fixing this! It was affecting some of my prs (#17227 (comment)).

In the future since the build system is pretty obscure it would be really helpful if commit messages didn't just say what was changing but also gave some hint why changes were being made.

  • faaee1a ci: Set DEPENDS_DIR when setting BASE_ROOT_DIR (1/6)
    • Change seems great, but is it changing behavior or is it just cleanup? Is there something motivating it or a reason it was written the opposite way previously?
  • fa7d6ea ci: Build depends only once for Android build (2/6)
    • Again change seems good, but what is it? It seems like it should make things faster, but is just an optimization or also a bug fix?
  • fae8916 ci: Bump Android cross-build to Ubuntu Focal (3/6)
    • Is this a bugfix? Just cleanup?
  • fa768ac cirrus: Only cache releases when needed (4/6)
    • Bugfix? Cleanup? Optimization?
  • faf847f cirrus: Add missing depends_sources_cache to Android task (5/6)

@hebasto
Copy link
Member

hebasto commented Mar 28, 2021

@MarcoFalke

Are you going to keep the latest "cirrus: temp" commit (04254c7)?

@maflcko
Copy link
Member Author

maflcko commented Mar 28, 2021

no

Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approach ACK 04254c7

MarcoFalke added 5 commits March 28, 2021 20:04
The depends dir can not be overwritten by a FILE_ENV file. Also, a FILE_ENV file
might depend on the DEPENDS_DIR value. Thus, set it before reading FILE_ENV.

This commit does not change behavior, but is required for later commits.

Can be reviewed with --color-moved=dimmed-zebra
Depends is currently built twice for the Android build. For example, the
same task building it twice:

* https://cirrus-ci.com/task/6673185279049728?logs=ci#L3418 (aarch64-linux-android)
* https://cirrus-ci.com/task/6673185279049728?logs=ci#L3422 (x86_64-pc-linux-gnu, 4 lines later)
This does not change behavior, but bumping to Focal now means it doesn't
have to be done later when Bionic is no longer used and EOL.
This does not change behavior, but removes unneeded and empty cache
instructions for tasks that don't need them.
This cache entry is required for completeness. The file
src/Makefile.qt.include needs it in this line:
 QT_BASE_PATH = $(shell find ../depends/sources/ -maxdepth 1 -type f -regex ".*qtbase.*\.tar.xz")

This cache entry is tied to the depends_built_cache cache entry. Either
both are present and cached, or neither of them is. Otherwise, the build
will fail.
@maflcko
Copy link
Member Author

maflcko commented Mar 28, 2021

Added text to commit bodies

@ryanofsky
Copy link
Contributor

Code review ACK fa52d7d. Only change since last review is adding descriptions and changing new RUN_UNIT_TESTS line from true to false. (I assume that change doesn't do anything because even though prior default was true, it's a cross compiled build and enabling unit tests would have no effect.)

I'm still not clear if building depends twice before commit 2/5 "ci: Build depends only once for Android build" (fac577d) was actually causing problems or just a messy and unnecessary thing to do. But maybe it's not known. In any case the new descriptions are clear and very helpful!

Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK fa52d7d, I have reviewed the code and it looks OK, I agree it can be merged after passing CI.

@hebasto
Copy link
Member

hebasto commented Mar 28, 2021

Maybe also optimize SDK cache:

--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -33,8 +33,6 @@ global_task_template: &GLOBAL_TASK_TEMPLATE
     folder: "/tmp/ccache_dir"
   depends_built_cache:
     folder: "/tmp/cirrus-ci-build/depends/built"
-  depends_sdk_cache:
-    folder: "/tmp/cirrus-ci-build/depends/sdk-sources"
   ci_script:
     - ./ci/test_run_all.sh
 
@@ -161,6 +159,8 @@ task:
 
 task:
   name: 'macOS 10.14 [gui, no tests] [focal]'
+  depends_sdk_cache:
+    folder: "/tmp/cirrus-ci-build/depends/sdk-sources"
   << : *GLOBAL_TASK_TEMPLATE
   container:
     image: ubuntu:focal
@@ -185,6 +185,8 @@ task:
   name: 'ARM64 Android APK [focal]'
   depends_sources_cache:
     folder: "/tmp/cirrus-ci-build/depends/sources"
+  depends_sdk_cache:
+    folder: "/tmp/cirrus-ci-build/depends/sdk-sources"
   << : *GLOBAL_TASK_TEMPLATE
   container:
     image: ubuntu:focal

?

@fanquake fanquake merged commit de4d3ba into bitcoin:master Mar 29, 2021
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Mar 29, 2021
@maflcko maflcko deleted the 2103-ciAndroid branch March 29, 2021 05:33
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Aug 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants