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

CD changes for ARM release #160

Merged
merged 29 commits into from
Mar 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
bb3bf49
Added cross-compile script for CD
Mar 4, 2020
68a8101
Added cross-compile codebuild buildspec
Mar 4, 2020
3aea01a
Checkout submodules in CD
Mar 4, 2020
ff0385a
change commit
Mar 4, 2020
011fe7f
submodule update on manylinux builds
Mar 4, 2020
66d5a93
Fixed path to codebuild cross compile script
Mar 4, 2020
b6d3b5a
Added arch to target
Mar 4, 2020
2de59c3
Fixed cross compile script args
Mar 4, 2020
23e86a2
Use freebsd channel for builder for cross compiles
Mar 4, 2020
0aa21ae
Added freebsd config
Mar 5, 2020
3e35b83
Array, not scalar
Mar 5, 2020
5c66234
force docker to start on cross-compile arm targets
Mar 5, 2020
e15c824
force JAVA_HOME on freebsd
Mar 5, 2020
3f5dd7b
Added s2n for freebsd
Mar 5, 2020
2cae006
try harder to find java without JAVA_HOME
Mar 5, 2020
1c8f154
freebsd needs libcrypto too
Mar 5, 2020
1721f40
Fixed syntax error in json
Mar 5, 2020
9c54ef6
Fixed search for jni.h
Mar 5, 2020
8b22d30
Fixed search for jni.h
Mar 5, 2020
e07b43a
Fixed search for jni.h
Mar 5, 2020
149f541
Use canonical armv8 instead of arm64
Mar 5, 2020
c2688eb
Debugging jenkins
Mar 5, 2020
98413cc
Fixed path to lib on unix
Mar 5, 2020
d389d6d
fixed the wrong script
Mar 5, 2020
a6c0c42
Use default Find JNI script
Mar 5, 2020
18d023c
Debug JDK search on mac
Mar 5, 2020
da77f44
Re-worked the order of search to avoid miscalculated false positives
Mar 5, 2020
435bd98
Fixed the case where we could loop infinitely because symlinks
Mar 5, 2020
4ad36b7
Updated to v0.5.1 of builder
Mar 5, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 23 additions & 17 deletions .builder/jdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
URLs = {
'linux-armv6': 'https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jdk_arm_linux_hotspot_8u232b09.tar.gz',
'linux-armv7': 'https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jdk_arm_linux_hotspot_8u232b09.tar.gz',
'linux-arm64': 'https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u242-b08/OpenJDK8U-jdk_aarch64_linux_hotspot_jdk8u242-b08.tar.gz',
'linux-armv8': 'https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u242-b08/OpenJDK8U-jdk_aarch64_linux_hotspot_jdk8u242-b08.tar.gz',
'linux-x64': 'https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u242-b08/OpenJDK8U-jdk_x64_linux_hotspot_8u242b08.tar.gz',
'windows-x64': 'https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u242-b08/OpenJDK8U-jdk_x64_windows_hotspot_8u242b08.zip',
'windows-x86': 'https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u242-b08/OpenJDK8U-jdk_x86-32_windows_hotspot_8u242b08.zip',
Expand Down Expand Up @@ -53,34 +53,40 @@ def install(self, env):
if not env.toolchain.cross_compile:
javac_path = util.where('javac')
if javac_path:
javac_path = javac_path.replace(
os.pathsep + 'bin' + os.pathsep + '.+$', '')
javac_path = javac_path.replace('/bin/javac', '')
prefixes = [javac_path, os.environ.get('JAVA_HOME', None)]
required_files = [
['include/jni.h'],
['lib/**/libjvm.so', '**/lib/**/libjvm.so'],
['lib/**/libjvm.so', '**/lib/**/libjvm.so',
'lib/**/jvm.dll', '**/lib/**/jvm.dll'],
]
found = 0
for prefix in prefixes:
if not prefix:
continue
for paths in required_files:
for path in paths:

for paths in required_files:
path_found = False
for path in paths:
for prefix in prefixes:
if not prefix:
continue
full_path = os.path.join(prefix, path)
if glob.glob(full_path, recursive=True):
found += 1
path_found = True
break
if path_found:
break

if found >= len(required_files):
print('Found existing JDK8 at {}'.format(prefix))
self.path = prefix
env.variables['java_home'] = self.path
self.installed = True
return
if found >= len(required_files):
print('Found existing JDK8 at {}'.format(prefix))
self.path = prefix
env.variables['java_home'] = self.path
self.installed = True
return

target = '{}-{}'.format(env.spec.target, env.spec.arch)
if target not in URLs:
raise EnvironmentError('No pre-built binaries for {} are available, please install JDK8 or greater and set JAVA_HOME'.format(target))
raise EnvironmentError(
'No pre-built binaries for {} are available, please install JDK8 or greater and set JAVA_HOME'.format(target))

install_dir = os.path.join(env.deps_dir, self.name.lower())
# If path is going to be relative, it has to be relative to the source directory
Expand Down Expand Up @@ -114,7 +120,7 @@ def install(self, env):
self.path = jdk_home
if env.toolchain.cross_compile:
self.path = str(Path(os.path.join(install_dir, jdk_home)
).relative_to(env.source_dir))
).relative_to(env.source_dir))

env.variables['java_home'] = self.path
self.installed = True
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- '!master'

env:
BUILDER_VERSION: v0.5.0
BUILDER_VERSION: v0.5.1
BUILDER_HOST: https://d19elf31gohf1l.cloudfront.net
PACKAGE_NAME: aws-crt-java
LINUX_BASE_IMAGE: ubuntu-16-x64
Expand Down
26 changes: 26 additions & 0 deletions builder.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
],
"architectures": {
"armv6": {
"pkg_setup": [
"service docker start"
],
"!packages": [],
"!build_steps": [
"build"
Expand All @@ -54,6 +57,9 @@
]
},
"armv7": {
"pkg_setup": [
"service docker start"
],
"!packages": [],
"!build_steps": [
"build"
Expand All @@ -67,6 +73,9 @@
]
},
"arm64": {
"pkg_setup": [
"service docker start"
],
"!packages": [],
"!build_steps": [
"build"
Expand All @@ -80,6 +89,23 @@
]
}
}
},
"freebsd": {
"imports": [
"s2n"
],
"packages": [
"openjdk8"
],
"!build_env": {
"JAVA_HOME": "/usr/local/openjdk8"
},
"!build_steps": [
"mvn -B compile -Dlibcrypto.path={libcrypto_path}"
],
"!test_steps": [
"mvn -B test -Dlibcrypto.path={libcrypto_path}"
]
}
}
}
Loading