Skip to content

Instantly share code, notes, and snippets.

@ide
Created September 19, 2017 23:52
Show Gist options
  • Save ide/65b90ea1b83f178ed7e9260d3ddf1e2a to your computer and use it in GitHub Desktop.
Save ide/65b90ea1b83f178ed7e9260d3ddf1e2a to your computer and use it in GitHub Desktop.
Patch for React Native Android CI
commit 99e5c8f1b47abe252039335a6bcc40708b2a25ea
Author: James Ide <ide@jameside.com>
Date: Tue Sep 19 15:45:36 2017 -0700
[ci] Don't set /dev/shm as the temp dir in CircleCI
CircleCI doesn't let us map objects under /dev/shm from within the Docker container so another directory instead when running in CircleCI. This change shouldn't impact FB's internal CI.
diff --git a/ReactAndroid/DEFS b/ReactAndroid/DEFS
index f1754c8e3..9c268a4cd 100644
--- a/ReactAndroid/DEFS
+++ b/ReactAndroid/DEFS
@@ -86,7 +86,7 @@ def rn_robolectric_test(name, srcs, vm_args = None, *args, **kwargs):
'-XX:MaxPermSize=620m',
'-Drobolectric.offline=true',
]
- if os.path.isdir("/dev/shm"):
+ if os.path.isdir("/dev/shm") and not os.environ['CIRCLECI']:
extra_vm_args.append('-Djava.io.tmpdir=/dev/shm')
else:
extra_vm_args.append(
@@ -110,4 +110,4 @@ def rn_robolectric_test(name, srcs, vm_args = None, *args, **kwargs):
original_cxx_library = cxx_library
def cxx_library(allow_jni_merging=None, **kwargs):
- original_cxx_library(**kwargs)
\ No newline at end of file
+ original_cxx_library(**kwargs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment