Skip to content

Commit 5c539e5

Browse files
author
Isaac Brodsky
authored
Pin specific dockcross version (#92)
* Pin specific dockcross version For #85, know exactly which version of dockcross is being used. * Remove no longer supported target
1 parent ec928e4 commit 5c539e5

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ H3-Java provides bindings to the H3 library, which is written in C. The built ar
5252

5353
| Operating System | Architectures
5454
| ---------------- | -------------
55-
| Linux | x64, x86, ARM64, ARMv5, ARMv7, MIPS, MIPSEL, PPC64LE, s390x
55+
| Linux | x64, x86, ARM64, ARMv5, ARMv7, MIPS, PPC64LE, s390x
5656
| Windows | x64, x86
5757
| Darwin (Mac OSX) | x64, ARM64
5858
| FreeBSD | x64

src/main/c/h3-java/build-h3.sh

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,15 +156,17 @@ if ! command -v docker; then
156156
exit 0
157157
fi
158158

159+
dockcross_tag="20211126-f096312"
160+
159161
# linux-armv6 excluded because of build failure
160-
for image in android-arm android-arm64 linux-arm64 linux-armv5 linux-armv7 linux-mipsel linux-mips linux-s390x \
161-
linux-ppc64le linux-x64 linux-x86 windows-x64 windows-x86; do
162+
for image in android-arm android-arm64 linux-arm64 linux-armv5 linux-armv7 linux-mips linux-s390x \
163+
linux-ppc64le linux-x64 linux-x86 windows-static-x64 windows-static-x86; do
162164

163165
# Setup for using dockcross
164166
BUILD_ROOT=target/h3-java-build-$image
165167
mkdir -p $BUILD_ROOT
166-
docker pull dockcross/$image
167-
docker run --rm dockcross/$image > $BUILD_ROOT/dockcross
168+
docker pull dockcross/$image:$dockcross_tag
169+
docker run --rm dockcross/$image:$dockcross_tag > $BUILD_ROOT/dockcross
168170
chmod +x $BUILD_ROOT/dockcross
169171

170172
# Perform the actual build inside Docker
@@ -173,6 +175,12 @@ for image in android-arm android-arm64 linux-arm64 linux-armv5 linux-armv7 linux
173175
# Copy the built artifact into the source tree so it can be included in the
174176
# built JAR.
175177
OUTPUT_ROOT=src/main/resources/$image
178+
if [ "$image" -eq "windows-static-x64" ]; then
179+
OUTPUT_ROOT=src/main/resources/windows-x64
180+
fi
181+
if [ "$image" -eq "windows-static-x86" ]; then
182+
OUTPUT_ROOT=src/main/resources/windows-x86
183+
fi
176184
mkdir -p $OUTPUT_ROOT
177185
if [ -e $BUILD_ROOT/lib/libh3-java.so ]; then cp $BUILD_ROOT/lib/libh3-java.so $OUTPUT_ROOT ; fi
178186
if [ -e $BUILD_ROOT/lib/libh3-java.dylib ]; then cp $BUILD_ROOT/lib/libh3-java.dylib $OUTPUT_ROOT ; fi

0 commit comments

Comments
 (0)