forked from nodejs/unofficial-builds
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add armv7l and arm64 bionic based cross compiled builds
- Loading branch information
1 parent
35c710e
commit 74fd9ac
Showing
8 changed files
with
165 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
FROM ubuntu:18.04 | ||
|
||
ARG GID=1000 | ||
ARG UID=1000 | ||
|
||
RUN addgroup --gid $GID node \ | ||
&& adduser --gid $GID --uid $UID --disabled-password --gecos node node | ||
|
||
RUN apt-get update \ | ||
&& apt-get dist-upgrade -y \ | ||
&& apt-get update \ | ||
&& apt-get install -y \ | ||
git \ | ||
curl \ | ||
gcc-8 \ | ||
g++-8 \ | ||
gcc-8-aarch64-linux-gnu \ | ||
g++-8-aarch64-linux-gnu \ | ||
binutils-aarch64-linux-gnu \ | ||
make \ | ||
python3 \ | ||
python3-distutils \ | ||
ccache \ | ||
xz-utils | ||
|
||
COPY --chown=node:node run.sh /home/node/run.sh | ||
|
||
VOLUME /home/node/.ccache | ||
VOLUME /out | ||
VOLUME /home/node/node.tar.xz | ||
|
||
USER node | ||
|
||
ENTRYPOINT [ "/home/node/run.sh" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
set -x | ||
|
||
release_urlbase="$1" | ||
disttype="$2" | ||
customtag="$3" | ||
datestring="$4" | ||
commit="$5" | ||
fullversion="$6" | ||
source_url="$7" | ||
config_flags= | ||
|
||
cd /home/node | ||
|
||
tar -xf node.tar.xz | ||
cd "node-${fullversion}" | ||
|
||
export CC_host="ccache gcc-8" | ||
export CXX_host="ccache g++-8" | ||
export CC="ccache aarch64-linux-gnu-gcc-8" | ||
export CXX="ccache aarch64-linux-gnu-g++-8" | ||
|
||
make -j$(getconf _NPROCESSORS_ONLN) binary V= \ | ||
DESTCPU="arm64" \ | ||
ARCH="arm64" \ | ||
VARIATION="" \ | ||
DISTTYPE="$disttype" \ | ||
CUSTOMTAG="$customtag" \ | ||
DATESTRING="$datestring" \ | ||
COMMIT="$commit" \ | ||
RELEASE_URLBASE="$release_urlbase" \ | ||
CONFIG_FLAGS="$config_flags" | ||
|
||
mv node-*.tar.?z /out/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash -xe | ||
|
||
__dirname=$1 | ||
fullversion=$2 | ||
|
||
. ${__dirname}/_decode_version.sh | ||
|
||
decode "$fullversion" | ||
|
||
test "$major" -ge "18" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
FROM ubuntu:18.04 | ||
|
||
ARG GID=1000 | ||
ARG UID=1000 | ||
|
||
RUN addgroup --gid $GID node \ | ||
&& adduser --gid $GID --uid $UID --disabled-password --gecos node node | ||
|
||
RUN apt-get update \ | ||
&& apt-get dist-upgrade -y \ | ||
&& apt-get update \ | ||
&& apt-get install -y \ | ||
git \ | ||
curl \ | ||
gcc-8 \ | ||
g++-8 \ | ||
gcc-8-arm-linux-gnueabihf \ | ||
g++-8-arm-linux-gnueabihf \ | ||
binutils-arm-linux-gnueabihf \ | ||
make \ | ||
python3 \ | ||
python3-distutils \ | ||
ccache \ | ||
xz-utils | ||
|
||
COPY --chown=node:node run.sh /home/node/run.sh | ||
|
||
VOLUME /home/node/.ccache | ||
VOLUME /out | ||
VOLUME /home/node/node.tar.xz | ||
|
||
USER node | ||
|
||
ENTRYPOINT [ "/home/node/run.sh" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
set -x | ||
|
||
release_urlbase="$1" | ||
disttype="$2" | ||
customtag="$3" | ||
datestring="$4" | ||
commit="$5" | ||
fullversion="$6" | ||
source_url="$7" | ||
config_flags= | ||
|
||
cd /home/node | ||
|
||
tar -xf node.tar.xz | ||
cd "node-${fullversion}" | ||
|
||
export CC_host="ccache gcc-8 -m32" | ||
export CXX_host="ccache g++-8 -m32" | ||
export CC="ccache arm-linux-gnueabihf-gcc-8" | ||
export CXX="ccache arm-linux-gnueabihf-g++-8" | ||
|
||
make -j$(getconf _NPROCESSORS_ONLN) binary V= \ | ||
DESTCPU="arm" \ | ||
ARCH="armv7l" \ | ||
VARIATION="" \ | ||
DISTTYPE="$disttype" \ | ||
CUSTOMTAG="$customtag" \ | ||
DATESTRING="$datestring" \ | ||
COMMIT="$commit" \ | ||
RELEASE_URLBASE="$release_urlbase" \ | ||
CONFIG_FLAGS="$config_flags" | ||
|
||
mv node-*.tar.?z /out/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash -xe | ||
|
||
__dirname=$1 | ||
fullversion=$2 | ||
|
||
. ${__dirname}/_decode_version.sh | ||
|
||
decode "$fullversion" | ||
|
||
test "$major" -ge "18" |