Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flutter-buid: Parameterize Android builds for easier debug release switch in mirror repos #8907

Merged
merged 1 commit into from
Jul 31, 2024

Conversation

basilgello
Copy link
Contributor

@basilgello basilgello commented Jul 31, 2024

No description provided.

@rustdesk
Copy link
Owner

rustdesk commented Jul 31, 2024

I do not want to publish debug versions in our release to confuse users. Please disable it in our release. Users who want it can build themself with the CI.

@basilgello basilgello force-pushed the backupable-apks branch 2 times, most recently from cb614b0 to af8a19f Compare July 31, 2024 10:09
@basilgello basilgello closed this Jul 31, 2024
@basilgello
Copy link
Contributor Author

I understand that, but maybe make separate release like nightly-backupable and write something like:

These builds provide backup and restore functionality using ADB but are less secure than release builds! Use them if you really need backup and restore functionality or automated provisioning of RustDesk Android app!

@basilgello
Copy link
Contributor Author

B&R is really needed :(

@basilgello
Copy link
Contributor Author

@rustdesk ^^

@rustdesk
Copy link
Owner

rustdesk commented Jul 31, 2024

These are adavanced users, building CI is not hard for them.

@basilgello
Copy link
Contributor Author

Yep but maintaining the repo is :) TBH I am not sure Github actions allows to pick only android action from whole flutter build to reproduce official bukld (certs apart ofc)

@basilgello
Copy link
Contributor Author

Maybe (as bare minimum) keep these signed debug builds as artifacts but not let them go in release?

@rustdesk
Copy link
Owner

You can add a secret variable to turn it on. then user can turn it on to build on their repo.

As @rustdesk noted debug builds are no-go in official RD repo
but this change makes it possible to filter jobs only relevant to
Android from flutter-build.yml to build only Android in a separate
mirror of Rustdesk.

Signed-off-by: Vasyl Gello <vasek.gello@gmail.com>
@basilgello basilgello reopened this Jul 31, 2024
@basilgello basilgello changed the title Add debuggable Android builds that can be backed up flutter-buid: Parameterize Android builds for easier debug release switch in mirror repos Jul 31, 2024
@basilgello
Copy link
Contributor Author

@rustdesk OK I dropped debug builds completely but I would like to have the parameterized build matrix merged because I figured how to transform vanilla flutter-build.yml to keep only Android-related jobs omitting others. I will set specific repo and instructions tonight :)

@basilgello
Copy link
Contributor Author

basilgello commented Jul 31, 2024

TL;DR: It is possible to estabilish the mirror of Rustdesk repo, set up GH action to create a separate yaml that contains only Android-related action definitions and trigger it with CI.

@rustdesk rustdesk merged commit cb6a6aa into rustdesk:master Jul 31, 2024
16 checks passed
@rustdesk
Copy link
Owner

rustdesk commented Aug 1, 2024

armv7 android failed, :(

@basilgello
Copy link
Contributor Author

Likely a flake, if it bangs 2nd time I will check :)

@rustdesk
Copy link
Owner

rustdesk commented Aug 1, 2024

I retried, still failed

@rustdesk
Copy link
Owner

rustdesk commented Aug 1, 2024

Just retried again, seems working.

@rustdesk
Copy link
Owner

rustdesk commented Aug 2, 2024

@basilgello
Copy link
Contributor Author

Can it be GHA runner cache issue? Because I explicitly set another CI and have got this first and then healed

@basilgello
Copy link
Contributor Author

basilgello commented Aug 2, 2024

@rustdesk I found the source of flake.. it is ndk's r27 (clang 18) not playing well with CMake 3.30 (vcpkg still wants 3.29 so idk where did it get from):

2024-08-02T09:12:01.3228042Z CMake Error at /usr/local/lib/android/sdk/ndk/27.0.12077973/build/cmake/flags.cmake:46 (if):
2024-08-02T09:12:01.3255182Z ##[error]  if given arguments:
2024-08-02T09:12:01.3255830Z
2024-08-02T09:12:01.3256071Z     "hwaddress" "IN_LIST" "ANDROID_SANITIZE"
2024-08-02T09:12:01.3256080Z
2024-08-02T09:12:01.3256257Z   Unknown arguments specified
2024-08-02T09:12:01.3256440Z Call Stack (most recent call first):
2024-08-02T09:12:01.3256995Z   /usr/local/share/cmake-3.30/Modules/Platform/Android-Clang.cmake:23 (include)
2024-08-02T09:12:01.3257472Z   /usr/local/share/cmake-3.30/Modules/Platform/Android-Clang-C.cmake:1 (include)
2024-08-02T09:12:01.3257918Z   /usr/local/share/cmake-3.30/Modules/CMakeCInformation.cmake:48 (include)
2024-08-02T09:12:01.3258085Z   CMakeLists.txt:7 (project)

Also vcpkg did save built libs in cache but never used them to speed up subsequent builds thanks to counter-intuitive doNotCache: false needed in each run-vcpkg action invocation.

Will PR the fix after I understand what to do.

@basilgello
Copy link
Contributor Author

android/ndk#2032

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants