File tree Expand file tree Collapse file tree 4 files changed +40
-12
lines changed Expand file tree Collapse file tree 4 files changed +40
-12
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ export EMSDK_NOTTY=0
6262export EMSDK_VERBOSE=0
6363
6464# temp fix for oom on CI (Error: Process completed with exit code 143.)
65- export EMSDK_NUM_CORES=1
65+ export EMSDK_NUM_CORES=${EMSDK_NUM_CORES :- 1}
6666
6767# for shared modules
6868export PYDK_PYTHON_HOST_PLATFORM=wasm32-${WASM_FLAVOUR} -emscripten
Original file line number Diff line number Diff line change 11#! /bin/bash
22reset
33
4+ if [ $UID -ne 0 ]; then
5+ echo " not UID 0, assuming not docker"
6+ else
7+ echo " UID 0, assuming docker debian:stable"
8+ apt-get update && apt-get --yes install build-essential clang autoconf wget curl lz4 lsb-release zlib1g-dev libssl-dev git
9+ fi
10+
411[ -f ../config ] && . ../config
512
613# TODO: check how dbg tools work with default settings
2128 . /etc/lsb-release
2229 export PLATFORM=linux
2330else
24- # or not
25- export DISTRIB_ID=$( $SYS_PYTHON -E -c " print(__import__('sysconfig').get_config_var('HOST_GNU_TYPE'))" )
31+ if [ -f /etc/os-release ]
32+ then
33+ . /etc/os-release
34+ export DISTRIB_ID=" ${ID}${VERSION_ID} "
35+ else
36+ # or not
37+ export DISTRIB_ID=$( $SYS_PYTHON -E -c " print(__import__('sysconfig').get_config_var('HOST_GNU_TYPE'))" )
38+ fi
2639 export PLATFORM=$( $SYS_PYTHON -E -c " print(__import__('sys').platform)" )
2740 echo no /etc/lsb-release found, please identify platform $PLATFORM : \" ${DISTRIB_ID} -${DISTRIB_RELEASE} \" or hit enter to continue
2841 read
@@ -336,13 +349,13 @@ END
336349 ${SDKROOT} /lang/nimsdk.sh
337350 fi
338351
339- mkdir -p /tmp/sdk
352+ mkdir -p /tmp/sdk/dist
340353 # pack extra build scripts
341354 pushd /
342355 tar -cpPRz \
343356 ${SDKROOT} /scripts/emsdk-extra.sh \
344357 ${SDKROOT} /scripts/emsdk-fetch.sh \
345- ${SDKROOT} /sources.extra/* > /tmp/sdk/sdk-extra.tar.gz
358+ ${SDKROOT} /sources.extra/* > /tmp/sdk/dist/ sdk-extra.tar.gz
346359
347360 # pack sdl as minimal prebuilt tar, and use lz4 compression on it
348361 . ${SDKROOT} /scripts/pack-sdk.sh
Original file line number Diff line number Diff line change 11#! /bin/bash
22reset
33
4+ if [ $UID -ne 0 ]; then
5+ echo " not UID 0, assuming not docker"
6+ else
7+ echo " UID 0, assuming docker debian:stable"
8+ apt-get update && apt-get --yes install build-essential clang autoconf wget curl lz4 lsb-release zlib1g-dev libssl-dev git
9+ fi
10+
411[ -f ../config ] && . ../config
512
613# TODO: check how dbg tools work with default settings
2128 . /etc/lsb-release
2229 export PLATFORM=linux
2330else
24- # or not
25- export DISTRIB_ID=$( $SYS_PYTHON -E -c " print(__import__('sysconfig').get_config_var('HOST_GNU_TYPE'))" )
31+ if [ -f /etc/os-release ]
32+ then
33+ . /etc/os-release
34+ export DISTRIB_ID=" ${ID}${VERSION_ID} "
35+ else
36+ # or not
37+ export DISTRIB_ID=$( $SYS_PYTHON -E -c " print(__import__('sysconfig').get_config_var('HOST_GNU_TYPE'))" )
38+ fi
2639 export PLATFORM=$( $SYS_PYTHON -E -c " print(__import__('sys').platform)" )
2740 echo no /etc/lsb-release found, please identify platform $PLATFORM : \" ${DISTRIB_ID} -${DISTRIB_RELEASE} \" or hit enter to continue
2841 read
@@ -336,13 +349,13 @@ END
336349 ${SDKROOT} /lang/nimsdk.sh
337350 fi
338351
339- mkdir -p /tmp/sdk
352+ mkdir -p /tmp/sdk/dist
340353 # pack extra build scripts
341354 pushd /
342355 tar -cpPRz \
343356 ${SDKROOT} /scripts/emsdk-extra.sh \
344357 ${SDKROOT} /scripts/emsdk-fetch.sh \
345- ${SDKROOT} /sources.extra/* > /tmp/sdk/sdk-extra.tar.gz
358+ ${SDKROOT} /sources.extra/* > /tmp/sdk/dist/ sdk-extra.tar.gz
346359
347360 # pack sdl as minimal prebuilt tar, and use lz4 compression on it
348361 . ${SDKROOT} /scripts/pack-sdk.sh
Original file line number Diff line number Diff line change @@ -21,8 +21,10 @@ tar -cpPR \
2121 ${SDKROOT} /native \
2222 ${SDKROOT} /bun \
2323 > /tmp/sdk/python${PYBUILD} -${TAG} -sdk-${CIVER} .tar
24- lz4 -c --favor-decSpeed --best /tmp/sdk/python${PYBUILD} -${TAG} -sdk-${CIVER} .tar \
25- > /tmp/sdk/python${PYBUILD} -${TAG} -sdk-${CIVER} .tar.lz4
26- rm /tmp/sdk/python${PYBUILD} -${TAG} -sdk-${CIVER} .tar
24+ if lz4 -c --favor-decSpeed --best /tmp/sdk/dist/python${PYBUILD} -${TAG} -sdk-${CIVER} .tar \
25+ > /tmp/sdk/dist/python${PYBUILD} -${TAG} -sdk-${CIVER} .tar.lz4
26+ then
27+ rm /tmp/sdk/python${PYBUILD} -${TAG} -sdk-${CIVER} .tar
28+ fi
2729echo " done" 1>&2
2830popd
You can’t perform that action at this time.
0 commit comments