Eros-FE icon indicating copy to clipboard operation
Eros-FE copied to clipboard

Configuring the CI/CD

Open Gigas002 opened this issue 3 years ago • 3 comments

Hello! I'm trying to create the CI/CD for this project right now in my fork with following builds:

  1. iOS/.ipa -- builds, but without .ipa artifact. Looking for a way to solve this atm
  2. macos/.dmg -- builds and deploys without issues
  3. windows/.exe -- builds and deploys without issues
  4. android/.apk -- unbuildable
  5. test -- fails

Here's my ci.yml file if you're interested in details, and here are all the logs.

While I'm not sure if .ipa could be built without personal macos pc, it builds and I think it's kind of enough for a bare minimum right now. I'm looking for a way to publish the .ipa still, but not very optimistic about it.

Tests are being run with flutter test command, and some of them are failing. I'm running it on macos-latest runner, but probably it's designed to run with something else or another command?

But the main question is .apk building. For a reference, I tried to build it on both windows-latest and ubuntu-latest runners with java version 16.0.2 (Am I guessing right, that we can't use latest or at least latest-lts java version because of gradle compatibility, which is currently 7.0.4 in the project?) with the following commands (took parts of code from your scripts):

rm lib/config/config.dart
mv lib/config/config.dart.sample lib/config/config.dart
cd scripts/ && source para.sh && cd ../
flutter build apk

CI fails on build with the following error:

Running Gradle task 'assembleRelease'...                        

FAILURE: Build failed with an exception.

* Where:
Build file '/home/runner/work/FEhViewer/FEhViewer/android/app/build.gradle' line: 63

* What went wrong:
A problem occurred evaluating project ':app'.
> path may not be null or empty string. path='null'

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org/

BUILD FAILED in 2m 22s
Running Gradle task 'assembleRelease'...                          143.6s
Gradle task assembleRelease failed with exit code 1
Error: Process completed with exit code 1.

Do you have any idea on why is this happening? I'm sorry, that I'm not experienced in building with flutter and for android and can be missing something obvious...

Gigas002 avatar Aug 22 '22 05:08 Gigas002

Upd on build for iOS. Ah, sorry, I've overlooked the build results. Even though it says Codesigning disabled with --no-codesign, skipping IPA, I still somehow get the .ipa in the end (thanks to reid and zip scripts I guess? Though I couldn't run dsym properly, is it crucial?).

Gigas002 avatar Aug 22 '22 11:08 Gigas002

Upd 2. Building for android on windows (not CI) fails due the same error as in OP.

Gigas002 avatar Aug 24 '22 10:08 Gigas002

Upd 3. Managed to build .apk, with commenting package signing in gradle props. I guess there's two ways to work around this:

  1. Comment package signing completely (do we really need this, since app is not distributed through google store?)
  2. Implement new configuration for CI/CD

Gigas002 avatar Aug 30 '22 02:08 Gigas002