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

Make a status-go nix package #7918

Merged
merged 3 commits into from Apr 9, 2019

Conversation

@PombeirP
Copy link
Member

commented Apr 5, 2019

fixes https://www.pivotaltracker.com/story/show/164984148

Summary:

This PR adds a Nix recipe to build status-go (and by extension gomobile, which I expect to upstream to nixpkgs). The resulting status-go package contains:

  • mobile libraries and headers
  • desktop libraries for Linux and macOS
  • desktop command line tools (statusd, bootnode, etc)
    It is missing the Windows library since that requires a cross-compiler that currently lives in Conan. I hope to make a follow-up PR to either use Conan in Nix to build it in this recipe, or get rid of Conan entirely.

It also updates gradle and uses the Nix package for it, so one less download in the build process.

Review notes (optional):

I recommend reviewing the PR commit by commit, since they are organized by subject and will make it easier to review.

I've moved the Nix recipes from /scripts/lib/setup/nix to /nix for ease of use and visibility.

Testing notes (optional):

Platforms (optional)

  • Android
  • iOS
  • macOS
  • Linux
  • Windows

Areas that maybe impacted (optional)

Functional

  • 1-1 chats
  • wallet / transactions
  • dapps / app browsing
  • mailservers

status: ready

@PombeirP PombeirP self-assigned this Apr 5, 2019

@status-github-bot status-github-bot bot added this to REVIEW in Pipeline for QA Apr 5, 2019

@status-im-auto

This comment has been minimized.

Copy link
Member

commented Apr 5, 2019

Jenkins Builds

Click to see older builds (143)
Commit #️⃣ Finished (UTC) Duration Platform Result
144f97c #1 2019-04-05 10:11:56 ~13 min macos 📄 log
✔️ 144f97c #1 2019-04-05 10:16:26 ~18 min ios 📦 ipa
144f97c #1 2019-04-05 10:18:33 ~20 min linux 📄 log
✔️ 144f97c #1 2019-04-05 10:23:27 ~25 min android-e2e 📦 apk
✔️ 144f97c #1 2019-04-05 10:23:54 ~25 min windows 📦 exe
08fd02d #2 2019-04-05 11:14:37 ~24 sec android-e2e 📄 log
08fd02d #2 2019-04-05 11:14:46 ~33 sec android 📄 log
✔️ 08fd02d #2 2019-04-05 11:29:38 ~15 min macos 📦 dmg
✔️ 08fd02d #2 2019-04-05 11:32:34 ~18 min ios 📦 ipa
✔️ 08fd02d #2 2019-04-05 11:36:33 ~22 min windows 📦 exe
✔️ 08fd02d #2 2019-04-05 11:37:22 ~23 min linux 📦 App
b47dd33 #3 2019-04-05 11:46:21 ~28 sec android-e2e 📄 log
b47dd33 #3 2019-04-05 11:46:21 ~27 sec android 📄 log
✔️ b47dd33 #3 2019-04-05 11:59:48 ~13 min macos 📦 dmg
e2398b5 #5 2019-04-05 12:01:12 ~2 min linux 📄 log
e2398b5 #5 2019-04-05 12:01:23 ~2 min windows 📄 log
✔️ a68b2c1 #6 2019-04-05 12:20:25 ~13 min macos 📦 dmg
✔️ a68b2c1 #6 2019-04-05 12:24:41 ~17 min ios 📦 ipa
a68b2c1 #6 2019-04-05 12:25:37 ~18 min windows 📄 log
✔️ a68b2c1 #6 2019-04-05 12:27:52 ~20 min linux 📦 App
✔️ a68b2c1 #6 2019-04-05 12:33:54 ~26 min android 📦 apk
a68b2c1 #7 2019-04-05 12:58:10 ~22 sec android-e2e 📄 log
18fc272 #7 2019-04-05 14:25:03 ~30 sec macos 📄 log
18fc272 #7 2019-04-05 14:25:08 ~37 sec ios 📄 log
18fc272 #8 2019-04-05 14:25:41 ~1 min android-e2e 📄 log
18fc272 #7 2019-04-05 14:25:42 ~1 min android 📄 log
18fc272 #7 2019-04-05 14:26:31 ~1 min linux 📄 log
18fc272 #7 2019-04-05 14:26:34 ~2 min windows 📄 log
5295716 #9 2019-04-05 14:50:50 ~19 sec macos 📄 log
5295716 #9 2019-04-05 14:50:54 ~25 sec ios 📄 log
61235dd #10 2019-04-05 15:10:06 ~26 sec ios 📄 log
61235dd #10 2019-04-05 15:10:10 ~28 sec macos 📄 log
✔️ 06e70dc #11 2019-04-05 15:31:57 ~17 min macos 📦 dmg
✔️ 06e70dc #11 2019-04-05 15:36:09 ~21 min ios 📦 ipa
✔️ 06e70dc #11 2019-04-05 15:46:40 ~32 min linux 📦 App
✔️ 06e70dc #11 2019-04-05 15:47:49 ~33 min windows 📦 exe
✔️ 49db58b #12 2019-04-05 16:29:12 ~14 min macos 📦 dmg
✔️ a2e2a4c #13 2019-04-05 16:44:41 ~15 min macos 📦 dmg
✔️ a2e2a4c #13 2019-04-05 16:48:14 ~19 min ios 📦 ipa
✔️ a2e2a4c #13 2019-04-05 16:52:51 ~23 min windows 📦 exe
✔️ a2e2a4c #13 2019-04-05 16:53:30 ~24 min linux 📦 App
✔️ a2e2a4c #15 2019-04-05 16:57:48 ~28 min android-e2e 📦 apk
✔️ 79871b6 #14 2019-04-05 17:24:33 ~17 min macos 📦 dmg
✔️ 79871b6 #14 2019-04-05 17:29:02 ~21 min ios 📦 ipa
✔️ 79871b6 #14 2019-04-05 17:39:36 ~32 min linux 📦 App
✔️ 79871b6 #16 2019-04-05 17:40:21 ~33 min android-e2e 📦 apk
✔️ 79871b6 #14 2019-04-05 17:43:55 ~36 min windows 📦 exe
✔️ 79871b6 #15 2019-04-05 17:46:15 ~38 min android 📦 apk
✔️ d649f4c #15 2019-04-05 18:22:54 ~18 min ios 📦 ipa
✔️ d649f4c #15 2019-04-05 18:23:26 ~18 min macos 📦 dmg
✔️ d649f4c #15 2019-04-05 18:26:15 ~21 min linux 📦 App
✔️ d649f4c #17 2019-04-05 18:27:11 ~22 min android-e2e 📦 apk
✔️ d649f4c #15 2019-04-05 18:30:34 ~25 min windows 📦 exe
✔️ d649f4c #16 2019-04-05 18:31:42 ~27 min android 📦 apk
✔️ 6e4ec85 #16 2019-04-06 08:03:40 ~13 min macos 📦 dmg
✔️ 6e4ec85 #16 2019-04-06 08:07:58 ~18 min ios 📦 ipa
✔️ 6e4ec85 #16 2019-04-06 08:13:39 ~23 min windows 📦 exe
✔️ 6e4ec85 #18 2019-04-06 08:13:57 ~24 min android-e2e 📦 apk
✔️ 6e4ec85 #16 2019-04-06 08:14:28 ~24 min linux 📦 App
✔️ 6e4ec85 #17 2019-04-06 08:16:51 ~27 min android 📦 apk
ddf1e07 #17 2019-04-06 08:38:16 ~1 min macos 📄 log
✔️ ddf1e07 #17 2019-04-06 08:55:21 ~18 min ios 📦 ipa
✔️ ddf1e07 #17 2019-04-06 08:58:28 ~21 min linux 📦 App
✔️ ddf1e07 #17 2019-04-06 08:59:04 ~21 min windows 📦 exe
✔️ ddf1e07 #19 2019-04-06 08:59:42 ~22 min android-e2e 📦 apk
✔️ ddf1e07 #18 2019-04-06 09:04:00 ~26 min android 📦 apk
✔️ bef328e #19 2019-04-06 09:21:47 ~12 min macos 📦 dmg
✔️ bef328e #18 2019-04-06 09:29:19 ~20 min ios 📦 ipa
✔️ bef328e #20 2019-04-06 09:32:01 ~22 min android-e2e 📦 apk
✔️ bef328e #19 2019-04-06 09:38:40 ~29 min android 📦 apk
✔️ bef328e #18 2019-04-06 09:42:16 ~33 min windows 📦 exe
✔️ bef328e #18 2019-04-06 09:44:42 ~35 min linux 📦 App
✔️ 89a3f4a #20 2019-04-06 21:55:02 ~13 min macos 📦 dmg
✔️ 89a3f4a #19 2019-04-06 21:59:40 ~18 min ios 📦 ipa
89a3f4a #19 2019-04-06 22:01:15 ~20 min windows 📄 log
✔️ 89a3f4a #19 2019-04-06 22:02:20 ~21 min linux 📦 App
✔️ 89a3f4a #20 2019-04-06 22:02:47 ~21 min android 📦 apk
✔️ 89a3f4a #21 2019-04-06 22:14:49 ~33 min android-e2e 📦 apk
ea22e0a #20 2019-04-06 22:31:04 ~24 sec ios 📄 log
ea22e0a #21 2019-04-06 22:31:09 ~27 sec macos 📄 log
ea22e0a #20 2019-04-06 23:05:12 ~34 min windows 📄 log
✔️ ea22e0a #21 2019-04-06 23:06:36 ~35 min android 📦 apk
✔️ ea22e0a #20 2019-04-06 23:07:32 ~36 min linux 📦 App
edc36b3 #21 2019-04-08 08:52:57 ~19 sec ios 📄 log
edc36b3 #22 2019-04-08 08:53:05 ~25 sec macos 📄 log
edc36b3 #21 2019-04-08 09:26:54 ~34 min windows 📄 log
✔️ edc36b3 #21 2019-04-08 09:29:56 ~37 min linux 📦 App
8659240 #23 2019-04-08 09:32:12 ~15 min macos 📄 log
8659240 #24 2019-04-08 09:37:00 ~16 sec macos 📄 log
✔️ 8659240 #22 2019-04-08 09:38:43 ~21 min ios 📦 ipa
✔️ 8659240 #22 2019-04-08 09:59:25 ~42 min linux 📦 App
✔️ 8659240 #23 2019-04-08 10:02:47 ~46 min android 📦 apk
8659240 #22 2019-04-08 10:07:02 ~50 min windows 📄 log
fde439b #23 2019-04-08 10:04:27 ~7 min ios 📄 log
✔️ fde439b #25 2019-04-08 10:10:57 ~13 min macos 📦 dmg
fde439b #23 2019-04-08 10:54:08 ~56 min windows 📄 log
✔️ fde439b #23 2019-04-08 10:55:51 ~58 min linux 📦 App
✔️ fde439b #24 2019-04-08 10:59:51 ~1 hr 2 min android 📦 apk
✔️ fde439b #25 2019-04-08 11:00:17 ~1 hr 2 min android-e2e 📦 apk
fde439b #24 2019-04-08 11:21:41 ~6 min ios 📄 log
4ba87fa #25 2019-04-08 11:38:33 ~7 min ios 📄 log
✔️ 4ba87fa #26 2019-04-08 11:43:01 ~12 min macos 📦 dmg
✔️ 4ba87fa #25 2019-04-08 12:10:16 ~39 min android 📦 apk
✔️ 4ba87fa #24 2019-04-08 12:15:05 ~44 min windows 📦 exe
✔️ 4ba87fa #27 2019-04-08 13:33:44 ~1 hr 13 min android-e2e 📦 apk
88e067b #26 2019-04-08 13:50:58 ~7 min ios 📄 log
✔️ 3cf2b1b #28 2019-04-08 14:08:36 ~12 min macos 📦 dmg
✔️ 3cf2b1b #27 2019-04-08 14:12:58 ~17 min ios 📦 ipa
✔️ 65f81d8 #29 2019-04-08 14:30:41 ~15 min macos 📦 dmg
✔️ 65f81d8 #28 2019-04-08 14:33:56 ~18 min ios 📦 ipa
✔️ 65f81d8 #30 2019-04-08 14:45:11 ~29 min android-e2e 📦 apk
✔️ 65f81d8 #28 2019-04-08 14:46:58 ~31 min linux 📦 App
✔️ 65f81d8 #27 2019-04-08 14:48:03 ~32 min windows 📦 exe
✔️ 65f81d8 #30 2019-04-08 16:19:21 ~53 min android 📦 apk
✔️ 181dc28 #31 2019-04-08 17:42:32 ~14 min macos 📦 dmg
✔️ 181dc28 #30 2019-04-08 17:47:46 ~19 min ios 📦 ipa
✔️ 181dc28 #30 2019-04-08 17:52:23 ~23 min linux 📦 App
✔️ 181dc28 #29 2019-04-08 17:53:16 ~24 min windows 📦 exe
✔️ 181dc28 #32 2019-04-08 17:57:17 ~28 min android-e2e 📦 apk
324ab7d #31 2019-04-08 20:47:35 ~9 min ios 📄 log
✔️ 324ab7d #32 2019-04-08 20:52:07 ~14 min macos 📦 dmg
324ab7d #33 2019-04-08 21:05:34 ~27 min android-e2e 📄 log
✔️ 324ab7d #31 2019-04-08 21:05:42 ~27 min linux 📦 App
✔️ 324ab7d #30 2019-04-08 21:06:32 ~28 min windows 📦 exe
✔️ 6078d9f #33 2019-04-08 21:36:44 ~13 min macos 📦 dmg
✔️ 6078d9f #32 2019-04-08 21:40:57 ~18 min ios 📦 ipa
✔️ 6078d9f #34 2019-04-08 21:45:38 ~22 min android 📦 apk
✔️ 6078d9f #32 2019-04-08 21:50:18 ~27 min linux 📦 App
6078d9f #34 2019-04-08 21:51:43 ~28 min android-e2e 📄 log
✔️ 6078d9f #31 2019-04-08 21:53:19 ~30 min windows 📦 exe
6078d9f #35 2019-04-09 07:28:15 ~20 min android-e2e 📄 log
✔️ 6078d9f #36 2019-04-09 07:51:14 ~20 min android-e2e 📦 apk
f668cef #33 2019-04-09 08:32:03 ~41 sec ios 📄 log
f668cef #34 2019-04-09 08:32:18 ~54 sec macos 📄 log
✔️ bb1397f #35 2019-04-09 08:56:01 ~17 min macos 📦 dmg
✔️ bb1397f #34 2019-04-09 09:00:33 ~22 min ios 📦 ipa
✔️ bb1397f #34 2019-04-09 09:09:58 ~31 min linux 📦 App
✔️ bb1397f #33 2019-04-09 09:10:12 ~31 min windows 📦 exe
bb1397f #38 2019-04-09 09:10:14 ~31 min android-e2e 📄 log
✔️ bb1397f #37 2019-04-09 09:47:00 ~34 min android 📦 apk
bb1397f #40 2019-04-09 11:12:23 ~20 min android-e2e 📄 log
bb1397f #41 2019-04-09 11:36:34 ~21 min android-e2e 📄 log
✔️ bb1397f #42 2019-04-09 11:59:48 ~20 min android-e2e 📦 apk
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 5873286 #36 2019-04-09 12:29:07 ~16 min macos 📦 dmg
✔️ 5873286 #35 2019-04-09 12:30:38 ~17 min ios 📦 ipa
✔️ 5873286 #38 2019-04-09 12:35:29 ~22 min android 📦 apk
✔️ 5873286 #35 2019-04-09 12:40:48 ~28 min linux 📦 App
✔️ 5873286 #34 2019-04-09 12:42:31 ~29 min windows 📦 exe
ea837ff #44 2019-04-09 12:38:41 ~24 min android-e2e 📄 log

@PombeirP PombeirP force-pushed the feature/nix-status-go branch 5 times, most recently from e2398b5 to a68b2c1 Apr 5, 2019

@status-github-bot status-github-bot bot moved this from REVIEW to CONTRIBUTOR in Pipeline for QA Apr 5, 2019

@mandrigin

This comment has been minimized.

Copy link
Contributor

commented Apr 5, 2019

wow, wow, wow!

@PombeirP PombeirP force-pushed the feature/nix-status-go branch from a68b2c1 to 18fc272 Apr 5, 2019

@PombeirP PombeirP requested review from vkjr, mandrigin and jakubgs Apr 5, 2019

@PombeirP PombeirP force-pushed the feature/nix-status-go branch 2 times, most recently from f946dd5 to 5295716 Apr 5, 2019

Show resolved Hide resolved android/app/BUCK Outdated
Show resolved Hide resolved ios/StatusIm/main.m Outdated
Show resolved Hide resolved ios/StatusIm/AppDelegate.h Outdated
@mandrigin
Copy link
Contributor

left a comment

I glanced through it and saw some suspicious changes, will need to look closer though

@PombeirP PombeirP force-pushed the feature/nix-status-go branch 2 times, most recently from 61235dd to 06e70dc Apr 5, 2019

@jakubgs
Copy link
Member

left a comment

I love how much stuff this PR removes.

Show resolved Hide resolved Makefile Outdated
Show resolved Hide resolved modules/react-native-status/android/build.gradle
Show resolved Hide resolved modules/react-native-status/desktop/CMakeLists.txt
Show resolved Hide resolved nix/mobile/default.nix
Show resolved Hide resolved scripts/build-desktop.sh Outdated
Show resolved Hide resolved android/gradlew.bat

@PombeirP PombeirP force-pushed the feature/nix-status-go branch from 06e70dc to 49db58b Apr 5, 2019

@PombeirP PombeirP marked this pull request as ready for review Apr 5, 2019

@PombeirP PombeirP force-pushed the feature/nix-status-go branch from 49db58b to a2e2a4c Apr 5, 2019

Show resolved Hide resolved nix/status-go/default.nix Outdated
@mandrigin
Copy link
Contributor

left a comment

a few smaller things, but that's a great step forward in unification of our buildsystem!

@churik

This comment has been minimized.

Copy link
Member

commented Apr 8, 2019

@PombeirP testing is still in progress, so far:
#7826 is reproducible again on fresh install.
So I can't start Status app after fresh install on Windows.
Can you take a look?

@PombeirP

This comment has been minimized.

Copy link
Member Author

commented Apr 8, 2019

Looking.

@PombeirP

This comment has been minimized.

Copy link
Member Author

commented Apr 8, 2019

Missing ending backslash in path :-) The next Windows build should be fixed.

@PombeirP PombeirP force-pushed the feature/nix-status-go branch 3 times, most recently from 324ab7d to 6078d9f Apr 8, 2019

@PombeirP

This comment has been minimized.

Copy link
Member Author

commented Apr 9, 2019

OK, all builds passing now after some transient issues in the CI server.

@churik

This comment has been minimized.

Copy link
Member

commented Apr 9, 2019

Thank you @PombeirP! Looking at them now.

@jakubgs

jakubgs approved these changes Apr 9, 2019

Copy link
Member

left a comment

Can't wait for this to get merged.

@PombeirP

This comment has been minimized.

Copy link
Member Author

commented Apr 9, 2019

Added minor fixup commit to adhere to changes requested for upstream PR in nixpkgs.

@churik

This comment has been minimized.

Copy link
Member

commented Apr 9, 2019

@PombeirP what builds / areas can be affected?

@PombeirP PombeirP force-pushed the feature/nix-status-go branch from f668cef to bb1397f Apr 9, 2019

@PombeirP

This comment has been minimized.

Copy link
Member Author

commented Apr 9, 2019

@PombeirP what builds / areas can be affected?

None, this is just slightly different Nix syntax, but with same output.

@PombeirP

This comment has been minimized.

Copy link
Member Author

commented Apr 9, 2019

I'd say if we want to be completely sure, it's enough to test that status-go is usable on the upcoming iOS build (e.g. we can login)

@churik

This comment has been minimized.

Copy link
Member

commented Apr 9, 2019

Tested on builds with bb1397f (Mac OSx, IOS):

  • installing
  • restoring account
  • log in and join public chat

Tested on builds with f668cef (on Windows 10 Home, Linux Ubuntu 18.04, Mac OSx, IOS 11.4, Android 8) randomly:

  • fresh install;
  • upgrade from latest nightly (desktop);
  • chatting in 1-1, public, group chats;
  • adding stickers;
  • sending transactions from chat and wallet;
  • sign transaction for DApp (test DApp);
  • adding custom mailserver \ switching to custom mailserver;
  • switching off \ on bootnodes, changing networks;
  • open links from chat;
  • updating profile info;
  • PNs;
  • sync;
  • compatibility (can send \receive messages) with 0.11.0 release.

Did I miss anything @PombeirP ?
If no, I can say that it is ready to merge once android_e2e build is completed.

@PombeirP

This comment has been minimized.

Copy link
Member Author

commented Apr 9, 2019

@churik looks pretty complete, thanks!

PombeirP added some commits Mar 25, 2019

@PombeirP

This comment has been minimized.

Copy link
Member Author

commented Apr 9, 2019

OK, all builds green, will merge.

@churik churik added the Tested - OK label Apr 9, 2019

@churik churik moved this from IN TESTING to MERGE in Pipeline for QA Apr 9, 2019

@PombeirP PombeirP force-pushed the feature/nix-status-go branch from bb1397f to 5873286 Apr 9, 2019

Remove usages of `nix show-derivation` in build-desktop.sh for purity
Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>

@PombeirP PombeirP force-pushed the feature/nix-status-go branch from 5873286 to ea837ff Apr 9, 2019

@PombeirP PombeirP merged commit ea837ff into develop Apr 9, 2019

9 of 11 checks passed

security/snyk - modules/react-native-status/package.json (Status-im) Test in progress
packages-check-bot No changes to dependencies
Details
GPG All commits have a verified GPG signature
WIP Ready for review
Details
security/snyk - Gemfile.lock (Status-im) No manifest changes detected
security/snyk - android/app/build.gradle (Status-im) No manifest changes detected
security/snyk - android/build.gradle (Status-im) No manifest changes detected
security/snyk - modules/react-native-desktop-linking/package.json (Status-im) No manifest changes detected
security/snyk - modules/react-native-desktop-notification/package.json (Status-im) No manifest changes detected
security/snyk - test/appium/requirements.txt (Status-im) No manifest changes detected
security/snyk - test/desktop_sikuli/requirements.txt (Status-im) No manifest changes detected

Pipeline for QA automation moved this from MERGE to DONE Apr 9, 2019

@delete-merged-branch delete-merged-branch bot deleted the feature/nix-status-go branch Apr 9, 2019

@PombeirP PombeirP added the nix label Apr 12, 2019

@status-github-bot

This comment has been minimized.

Copy link

commented May 11, 2019

Pull Request Checklist

  • Have you updated the documentation, if impacted (e.g. docs.status.im)?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.