Skip to content

Commit

Permalink
Merge pull request #447 from defold/update-emsdk-3165
Browse files Browse the repository at this point in the history
Update emscripten to 3.1.65
  • Loading branch information
Jhonnyg authored Sep 11, 2024
2 parents 9d9781e + 9b00dc8 commit d259f03
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/build-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ echo "Emsdk 2.0.11"
DM_PACKAGES_URL=$DM_PACKAGES_URL docker buildx build --secret id=DM_PACKAGES_URL --platform linux/amd64 -t $DOCKER_REGISTRY/extender-emsdk-2011-env:latest -f $SCRIPT_DIR/docker/Dockerfile.emsdk.2011-env $SCRIPT_DIR/docker
echo "Emsdk 3.1.55"
DM_PACKAGES_URL=$DM_PACKAGES_URL docker buildx build --secret id=DM_PACKAGES_URL --platform linux/amd64 -t $DOCKER_REGISTRY/extender-emsdk-3155-env:latest -f $SCRIPT_DIR/docker/Dockerfile.emsdk.3155-env $SCRIPT_DIR/docker
echo "Emsdk 3.1.65"
DM_PACKAGES_URL=$DM_PACKAGES_URL docker buildx build --secret id=DM_PACKAGES_URL --platform linux/amd64 -t $DOCKER_REGISTRY/extender-emsdk-3165-env:latest -f $SCRIPT_DIR/docker/Dockerfile.emsdk.3165-env $SCRIPT_DIR/docker
echo "Android ndk 25"
DM_PACKAGES_URL=$DM_PACKAGES_URL docker buildx build --secret id=DM_PACKAGES_URL --platform linux/amd64 -t $DOCKER_REGISTRY/extender-android-ndk25-env:latest -f $SCRIPT_DIR/docker/Dockerfile.android.ndk25-env $SCRIPT_DIR/docker

Expand All @@ -35,4 +37,4 @@ DM_PACKAGES_URL=$DM_PACKAGES_URL docker buildx build --secret id=DM_PACKAGES_URL
echo "Nssdk images"
DM_PACKAGES_URL=$DM_PACKAGES_URL docker buildx build --secret id=DM_PACKAGES_URL --platform linux/amd64 -t $DOCKER_PRIVATE_REGISTRY/extender-nssdk-1532-env:latest -f $SCRIPT_DIR/docker/Dockerfile.nssdk.1532-env $SCRIPT_DIR/docker
DM_PACKAGES_URL=$DM_PACKAGES_URL docker buildx build --secret id=DM_PACKAGES_URL --platform linux/amd64 -t $DOCKER_PRIVATE_REGISTRY/extender-nssdk-1753-env:latest -f $SCRIPT_DIR/docker/Dockerfile.nssdk.1753-env $SCRIPT_DIR/docker
DM_PACKAGES_URL=$DM_PACKAGES_URL docker buildx build --secret id=DM_PACKAGES_URL --platform linux/amd64 -t $DOCKER_PRIVATE_REGISTRY/extender-nssdk-1832-env:latest -f $SCRIPT_DIR/docker/Dockerfile.nssdk.1832-env $SCRIPT_DIR/docker
DM_PACKAGES_URL=$DM_PACKAGES_URL docker buildx build --secret id=DM_PACKAGES_URL --platform linux/amd64 -t $DOCKER_PRIVATE_REGISTRY/extender-nssdk-1832-env:latest -f $SCRIPT_DIR/docker/Dockerfile.nssdk.1832-env $SCRIPT_DIR/docker
3 changes: 3 additions & 0 deletions server/configs/application-local-dev-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ extender:
emsdk-3155:
url: http://emsdk-3155:9000
instanceId: emsdk-3155
emsdk-3165:
url: http://emsdk-3165:9000
instanceId: emsdk-3165
linux-latest:
url: http://linux:9000
instanceId: linux
Expand Down
43 changes: 43 additions & 0 deletions server/docker/Dockerfile.emsdk.3165-env
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
FROM europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-base-env:1.2.0

# Ubuntu still seem to use python3 3.8 as default version
RUN \
add-apt-repository ppa:deadsnakes/ppa && \
apt-get autoclean && \
apt-get update && \
apt-get clean autoclean autoremove && \
apt-get install -y --no-install-recommends python3.9 && \
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1 && \
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 2 && \
python3 --version

ENV EMSCRIPTEN_SDK_3_1_65=${PLATFORMSDK_DIR}/emsdk-3.1.65
ENV EMSCRIPTEN_HOME_3_1_65=${EMSCRIPTEN_SDK_3_1_65}
ENV EMSCRIPTEN_CACHE_3_1_65=/var/extender/emcache_3_1_65
ENV EMSCRIPTEN_CONFIG_3_1_65=${EMSCRIPTEN_HOME_3_1_65}/.emscripten
ENV EMSCRIPTEN_PYTHON_3_1_65=/usr/bin/python3.9
ENV EMSCRIPTEN_BIN_3_1_65=${EMSCRIPTEN_HOME_3_1_65}/upstream/emscripten
ENV EMSCRIPTEN_PATH_3_1_65=${EMSCRIPTEN_HOME_3_1_65}:${EMSCRIPTEN_HOME_3_1_65}/upstream/bin:${EMSCRIPTEN_HOME_3_1_65}/node/16.20.0_64bit/bin:${EMSCRIPTEN_BIN_3_1_65}

RUN --mount=type=secret,id=DM_PACKAGES_URL,required=true \
mkdir ${EMSCRIPTEN_SDK_3_1_65} && \
wget -q -O - $(cat /run/secrets/DM_PACKAGES_URL)/emsdk-3.1.65-x86_64-linux.tar.gz | tar xz -C ${EMSCRIPTEN_SDK_3_1_65} --strip-components=1

RUN \
${EMSCRIPTEN_HOME_3_1_65}/emsdk activate sdk-3.1.65-64bit && \
EM_CONFIG=$EMSCRIPTEN_CONFIG_3_1_65 EM_CACHE=${EMSCRIPTEN_CACHE_3_1_65} python3 ${EMSCRIPTEN_BIN_3_1_65}/embuilder.py build SYSTEM MINIMAL && \
chmod -R 755 ${EMSCRIPTEN_HOME_3_1_65} && \
chown -R extender: ${EMSCRIPTEN_CACHE_3_1_65}


# We use the same temp directory for both versions.
ENV EMSCRIPTEN_TEMP_DIR=/var/extender/ems_temp
RUN mkdir -p ${EMSCRIPTEN_TEMP_DIR}
RUN chmod -R 755 ${EMSCRIPTEN_TEMP_DIR} && chown extender: ${EMSCRIPTEN_TEMP_DIR}
# The "sed" command below removes the /TEMP_DIR line from the generated configs
# We replace it with a folder of our own
RUN sed '/TEMP_DIR =/d' ${EMSCRIPTEN_CONFIG_3_1_65} && \
echo TEMP_DIR = \'${EMSCRIPTEN_TEMP_DIR}\' >> ${EMSCRIPTEN_CONFIG_3_1_65}

RUN \
update-alternatives --set python3 /usr/bin/python3.8
25 changes: 25 additions & 0 deletions server/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,19 @@ services:
default:
aliases:
- emsdk-3155
emscripten_3165-dev:
image: europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-emsdk-3165-env:latest
extends:
file: common-services.yml
service: remote_builder
command: ["--management.metrics.tags.instance=emsdk-3165-local"]
profiles:
- all
- web
networks:
default:
aliases:
- emsdk-3165
nssdk_1532-dev:
image: europe-west1-docker.pkg.dev/extender-426409/extender-private-registry/extender-nssdk-1532-env:latest
extends:
Expand Down Expand Up @@ -265,6 +278,17 @@ services:
default:
aliases:
- emsdk-3155
emscripten_3165-integration-test:
image: europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-emsdk-3165-env:latest
extends:
file: common-services.yml
service: test_remote_builder
profiles:
- test
networks:
default:
aliases:
- emsdk-3165
win_2019-integration-test:
image: europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-winsdk-2019-env:latest
extends:
Expand Down Expand Up @@ -335,3 +359,4 @@ services:
default:
aliases:
- victoriametrics

0 comments on commit d259f03

Please sign in to comment.