Skip to content

Commit

Permalink
Merge branch 'dev' into dev-aws-extender-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
britzl committed Nov 29, 2023
2 parents 436dee3 + b9d8ff8 commit 199cfa9
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 7 deletions.
5 changes: 4 additions & 1 deletion server/docker-base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@ RUN \
./llvm.sh ${CLANG_VERSION} && \
rm llvm.sh

ENV PATH=/usr/lib/llvm-${CLANG_VERSION}/bin:$PATH
ENV CLANG_17_HOME=/usr/lib/llvm-${CLANG_VERSION}
# Possibly get the "-resource-dir" from clang++ -### empty.cpp
ENV CLANG_17_RESOURCE_DIR=/usr/lib/llvm-${CLANG_VERSION}/lib/clang/${CLANG_VERSION}
ENV PATH=${CLANG_17_HOME}/bin:$PATH

#
# EMSCRIPTEN
Expand Down
19 changes: 18 additions & 1 deletion server/scripts/start-test-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ CONTAINER=extender

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

PORT=9000
BUILD_ENV=""
RUN_ENV=""
if [ "${DM_PACKAGES_URL}" != "" ]; then
Expand All @@ -22,6 +23,21 @@ fi

echo "Using BUILD_ENV: ${BUILD_ENV}"
echo "Using RUN_ENV: ${RUN_ENV}"
echo "Using PORT: ${PORT}"


URL=http://localhost:${PORT}

function check_server() {
if curl -s --head --request GET ${URL} | grep "200 OK" > /dev/null; then
echo "ERROR: ${URL} is already occupied!"
exit 1
fi
}

# fail early
check_server


docker build ${BUILD_ENV} -t extender-base ${DIR}/../docker-base

Expand All @@ -32,4 +48,5 @@ if [ "$GITHUB_ACTION" != "" ]; then
chmod -R a+xrw ${DIR}/../test-data || true
fi

docker run -d --rm --name ${CONTAINER} -p 9000:9000 ${RUN_ENV} -v ${DIR}/../test-data/sdk:/var/extender/sdk extender/extender

docker run -d --rm --name ${CONTAINER} -p ${PORT}:${PORT} ${RUN_ENV} -v ${DIR}/../test-data/sdk:/var/extender/sdk extender/extender
15 changes: 10 additions & 5 deletions server/src/main/java/com/defold/extender/Extender.java
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,7 @@ public boolean accept(File pathname) {
}

private List<File> buildExtensionInternal(File manifest, Map<String, Object> manifestContext, List<File> srcDirs, File libraryOut) throws IOException, InterruptedException, ExtenderException {
LOGGER.info("buildExtension");
LOGGER.info("buildExtensionInternal");

File extDir = manifest.getParentFile();

Expand Down Expand Up @@ -2480,14 +2480,19 @@ List<File> build() throws ExtenderException {

outputFiles.addAll(buildManifests(platform));

// TODO: Thread this step
if (platform.endsWith("android")) {
outputFiles.addAll(buildAndroid(platform));
}
if (shouldBuildLibrary())
{
outputFiles.addAll(buildLibraries());
}
else
{
// TODO: Thread this step
if (platform.endsWith("android")) {
outputFiles.addAll(buildAndroid(platform));
}

outputFiles.addAll(buildEngine());
}
outputFiles.addAll(buildPipelinePlugin());
File log = writeLog();
if (log.exists()) {
Expand Down

0 comments on commit 199cfa9

Please sign in to comment.