From 0dc60761b759a057e364b2cfaee507e5ffa1fe41 Mon Sep 17 00:00:00 2001 From: sparklyballs Date: Thu, 30 Nov 2017 05:00:07 +0000 Subject: [PATCH 1/3] use cpu core routine --- Dockerfile | 18 ++++++++++++++++-- README.md | 1 + 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index c3fa36f..87e57f3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -67,7 +67,20 @@ apk add --no-cache \ cd /tmp/spatialindex && \ cmake . \ -DCMAKE_INSTALL_PREFIX=/usr && \ - make && \ +# attempt to set number of cores available for make to use + set -ex && \ + CPU_CORES=$( < /proc/cpuinfo grep -c processor ) || echo "failed cpu look up" && \ + if echo $CPU_CORES | grep -E -q '^[0-9]+$'; then \ + : ;\ + if [ "$CPU_CORES" -gt 7 ]; then \ + CPU_CORES=$(( CPU_CORES - 3 )); \ + elif [ "$CPU_CORES" -gt 5 ]; then \ + CPU_CORES=$(( CPU_CORES - 2 )); \ + elif [ "$CPU_CORES" -gt 3 ]; then \ + CPU_CORES=$(( CPU_CORES - 1 )); fi \ + else CPU_CORES="1"; fi && \ + + make -j $CPU_CORES && \ make install && \ # compile minetestserver @@ -88,7 +101,8 @@ apk add --no-cache \ -DENABLE_SOUND=0 \ -DENABLE_SYSTEM_GMP=1 \ -DRUN_IN_PLACE=0 && \ - make && \ + make -j $CPU_CORES && \ + set +ex && \ make install && \ # copy games to temporary folder diff --git a/README.md b/README.md index d21f95b..f3fcadc 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,7 @@ You can find the world maps, mods folder and config files in /config/.minetest. ## Versions ++ **30.11.17:** Use cpu core counting routine to speed up build time. + **26.05.2017:** Rebase to alpine 3.6. + **14.02.2017:** Rebase to alpine 3.5. + **25.11.2016:** Rebase to alpine linux, move to main repo. From 4fa83bcc3e9ab99ec53d68a282c6be615a28d894 Mon Sep 17 00:00:00 2001 From: sparklyballs Date: Thu, 30 Nov 2017 05:03:20 +0000 Subject: [PATCH 2/3] consistency with date format changelog --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index f3fcadc..37c8d04 100644 --- a/README.md +++ b/README.md @@ -77,11 +77,11 @@ You can find the world maps, mods folder and config files in /config/.minetest. ## Versions + **30.11.17:** Use cpu core counting routine to speed up build time. -+ **26.05.2017:** Rebase to alpine 3.6. -+ **14.02.2017:** Rebase to alpine 3.5. -+ **25.11.2016:** Rebase to alpine linux, move to main repo. -+ **27.02.2016:** Bump to latest version. -+ **19.02.2016:** Change port to UDP, thanks to slashopt for pointing this out. -+ **15.02.2016:** Make minetest app a service. -+ **01-02-2016:** Add lua-socket dependency. -+ **06.11.2015:** Initial Release. ++ **26.05.17:** Rebase to alpine 3.6. ++ **14.02.17:** Rebase to alpine 3.5. ++ **25.11.16:** Rebase to alpine linux, move to main repo. ++ **27.02.16:** Bump to latest version. ++ **19.02.16:** Change port to UDP, thanks to slashopt for pointing this out. ++ **15.02.16:** Make minetest app a service. ++ **01-02-16:** Add lua-socket dependency. ++ **06.11.15:** Initial Release. From 857e2d4fdc6a40d2ed39c511820d283dfbb24ac4 Mon Sep 17 00:00:00 2001 From: sparklyballs Date: Thu, 30 Nov 2017 08:41:10 +0000 Subject: [PATCH 3/3] dashes to dots --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 37c8d04..4bd1645 100644 --- a/README.md +++ b/README.md @@ -83,5 +83,5 @@ You can find the world maps, mods folder and config files in /config/.minetest. + **27.02.16:** Bump to latest version. + **19.02.16:** Change port to UDP, thanks to slashopt for pointing this out. + **15.02.16:** Make minetest app a service. -+ **01-02-16:** Add lua-socket dependency. ++ **01.02.16:** Add lua-socket dependency. + **06.11.15:** Initial Release.