Skip to content

Commit 65e6e80

Browse files
author
Pedro Pombeiro
committed
Create Nix package for building status-go
1 parent be2b2a1 commit 65e6e80

53 files changed

Lines changed: 474 additions & 341 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ doo-index.html
8686

8787
# Status
8888
Statusgo.framework
89-
status-go-local.aar
9089
status-dev-cli
9190

9291
#ios

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ project.xcworkspace
3535
# Atom
3636
.tags*
3737

38+
# VS Code
39+
.vscode/ipch/
40+
3841
# node.js
3942
#
4043
node_modules/
@@ -94,9 +97,6 @@ doo-index.html
9497

9598
# Status
9699
Statusgo.framework
97-
status-go-local.aar
98-
status-dev-cli
99-
status-go-*.zip
100100

101101
#ios
102102
ios/Pods

Makefile

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,16 @@ HELP_FUN = \
2626
print "\n"; \
2727
}
2828

29-
__toolversion = $(shell $(GIT_ROOT)/scripts/toolversion $(1))
29+
export NIX_CONF_DIR = $(PWD)/nix
3030

3131
# Main targets
3232

3333
clean: ##@prepare Remove all output folders
3434
git clean -dxf -f
3535

36+
clean-nix: ##@prepare Remove complete nix setup
37+
sudo rm -rf /nix ~/.cache/nix
38+
3639
setup: ##@prepare Install all the requirements for status-react
3740
@./scripts/setup
3841

@@ -47,11 +50,9 @@ ifndef IN_NIX_SHELL
4750
echo "Configuring Nix shell..."; \
4851
if ! command -v "nix" >/dev/null 2>&1; then \
4952
. ~/.nix-profile/etc/profile.d/nix.sh; \
50-
NIX_CONF_DIR=$(PWD)/scripts/lib/setup/nix \
5153
nix-shell; \
5254
else \
53-
NIX_CONF_DIR=$(PWD)/scripts/lib/setup/nix \
54-
nix-shell; \
55+
nix-shell; \
5556
fi \
5657
else \
5758
echo "Please run 'make setup' first"; \
@@ -93,21 +94,13 @@ prod-build: _ensure-in-nix-shell
9394
lein prod-build
9495

9596
prod-build-android: _ensure-in-nix-shell
96-
rm ./modules/react-native-status/android/libs/status-im/status-go/local/status-go-local.aar 2> /dev/null || true
9797
scripts/prepare-for-platform.sh android
9898
lein prod-build-android
9999

100100
prod-build-ios: _ensure-in-nix-shell
101-
rm -r ./modules/react-native-status/ios/RCTStatus/Statusgo.framework/ 2> /dev/null || true
102101
scripts/prepare-for-platform.sh ios
103102
lein prod-build-ios
104103

105-
full-prod-build: _ensure-in-nix-shell ##@build build prod for both Android and iOS
106-
./scripts/bundle-status-go.sh ios android
107-
$(MAKE) prod-build
108-
rm -r ./modules/react-native-status/ios/RCTStatus/Statusgo.framework/ 2> /dev/null || true
109-
rm ./modules/react-native-status/android/libs/status-im/status-go/local/status-go-local.aar 2> /dev/null
110-
111104
prod-build-desktop: _ensure-in-nix-shell
112105
git clean -qdxf -f ./index.desktop.js desktop/
113106
scripts/prepare-for-platform.sh desktop

STATUS_GO_OWNER

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
status-im

STATUS_GO_SHA256

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1iixi6f6r3rqb671x3xzki8cibrbhrr312sh32vd13np9hcdwf0w

STATUS_GO_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.23.0-beta.10
1+
v0.23.0-beta.10

android/app/jni/Application.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
APP_ABI := armeabi-v7a arm64-v8a x86 x86_64
22
APP_PLATFORM := android-18
3-
APP_STL := gnustl_static
4-
NDK_TOOLCHAIN_VERSION=4.9
3+
APP_STL := c++_static
4+
NDK_TOOLCHAIN_VERSION=clang

android/build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,8 @@ allprojects {
4646
google()
4747
jcenter()
4848
maven { url "$rootDir/../node_modules/react-native/android" }
49-
maven { url "$rootDir/../modules/react-native-status/android/libs" }
5049
// for geth, function, and status-go
51-
flatDir { dirs "libs", "${rootDir}/app/libs" }
50+
flatDir { dirs "libs", "${System.env.STATUS_GO_LIBDIR}/android" }
5251
maven { url "https://jitpack.io" }
5352
}
5453
}

ci/Jenkinsfile.android

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ pipeline {
22
agent {
33
docker {
44
label 'linux'
5-
image 'statusteam/nix:jenkins-1.0.0-158e62e1'
5+
image 'statusteam/nix:jenkins-1.0.0-150d5721'
66
args (
77
"-v /home/jenkins/tmp:/var/tmp:rw "+
88
"-v /home/jenkins/status-im.keystore:/tmp/status-im.keystore:ro"
@@ -13,7 +13,7 @@ pipeline {
1313
options {
1414
timestamps()
1515
/* Prevent Jenkins jobs from running forever */
16-
timeout(time: 35, unit: 'MINUTES')
16+
timeout(time: 45, unit: 'MINUTES')
1717
/* Limit builds retained */
1818
buildDiscarder(logRotator(
1919
numToKeepStr: '10',
@@ -41,7 +41,7 @@ pipeline {
4141
/* since we are mounting it we need to specify location */
4242
STATUS_RELEASE_STORE_FILE = '/tmp/status-im.keystore'
4343
/* bundle cache is sensitive to being used by different ruby versions */
44-
BUNDLE_PATH = "/tmp/bundle"
44+
BUNDLE_PATH = "/var/tmp/bundle-${EXECUTOR_NUMBER}"
4545
/* We use EXECUTOR_NUMBER to avoid multiple instances clashing */
4646
LEIN_HOME = "/var/tmp/lein-${EXECUTOR_NUMBER}"
4747
YARN_CACHE_FOLDER = "/var/tmp/yarn-${EXECUTOR_NUMBER}"

ci/Jenkinsfile.ios

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pipeline {
2727
LANG = 'en_US.UTF-8'
2828
LANGUAGE = 'en_US.UTF-8'
2929
LC_ALL = 'en_US.UTF-8'
30-
NIX_CONF_DIR = "${env.WORKSPACE}/scripts/lib/setup/nix"
30+
NIX_CONF_DIR = "${env.WORKSPACE}/nix"
3131
FASTLANE_DISABLE_COLORS=1
3232
REALM_DISABLE_ANALYTICS=1
3333
BUNDLE_PATH = "${HOME}/.bundle"

0 commit comments

Comments
 (0)