Thread (51 messages) 51 messages, 6 authors, 2019-03-26

Re: [PATCH v4 2/2] ci: Introduce travis builds for github repositories

From: Honnappa Nagarahalli <hidden>
Date: 2019-02-07 17:16:40

<snip>
quoted hunk ↗ jump to hunk
diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh new file mode 100755 index
000000000..9c6af2ead
--- /dev/null
+++ b/.ci/linux-build.sh
@@ -0,0 +1,88 @@
+#!/bin/bash
+
+# check for whether we're clang or gcc
+# setup the right options depending on the environment variables # run
+the build
+
+# Just used for the 'classic' configuration system (ie: make)
+set_conf() {
+    echo "[BUILT WITH $2 SET TO $3]"
+    c="$1/.config"
+    shift
+
+    if grep -q "$1" "$c"; then
+        sed -i "s:^$1=.*$:$1=$2:g" $c
+    else
+        echo $1=$2 >> "$c"
+    fi
+}
+
+BUILD_ARCH="x86_64-native-linuxapp-"
+
+if [ "${AARCH64}" == "1" ]; then
+    # convert the arch specifier
+    BUILD_ARCH="arm64-armv8a-linuxapp-"
+    ARM64_TOOL="linaro-arm-tool"
My apologies, I think I was not clear on my comments earlier. ARM64_TOOL should be changed to AARCH64_TOOL
+    export PATH=$PATH:$(pwd)/${ARM64_TOOL}/bin
Change to AARCH64_TOOL
+fi
+
+
+if [ "${NINJABUILD}" == "1" ]; then
+    OPTS=""
+
+    DEF_LIB="static"
+    if [ "${SHARED}" == "1" ]; then
+        DEF_LIB="shared"
+    fi
<snip>
quoted hunk ↗ jump to hunk
diff --git a/.ci/linux-setup.sh b/.ci/linux-setup.sh new file mode 100755 index
000000000..15183165b
--- /dev/null
+++ b/.ci/linux-setup.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+python3.5 -m pip install --upgrade meson --user
+
+echo "AARCH64 is [ ${AARCH64} ]"
+
+if [ "${AARCH64}" == "1" ]; then
+    # need to build & install libnuma
+    # This will only be minimal support for now.
+
ARM64_TOOL_URL='https://releases.linaro.org/components/toolchain/binary
Change to AARCH64_TOOL_URL
es/latest-7/aarch64-linux-gnu/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-
linux-gnu.tar.xz'
+    ARM64_TOOL="linaro-arm-tool"
Change to AARCH64_TOOL
+    NUMA_GIT_URL="https://github.com/numactl/numactl.git"
+
+    wget -O "${ARM64_TOOL}.tar.xz" "${ARM64_TOOL_URL}"
+    tar -xf "${ARM64_TOOL}.tar.xz"
+    mv gcc-linaro* "${ARM64_TOOL}"
+    export PATH=$PATH:$(pwd)/${ARM64_TOOL}/bin
Change to AARCH64_TOOL and AARCH64_TOOL_URL
+    git clone "${NUMA_GIT_URL}"
+    cd numactl
+    git checkout v2.0.11
+    ./autogen.sh
+    autoconf -i
+    mkdir numa_bin
+    ./configure --host=aarch64-linux-gnu CC=aarch64-linux-gnu-gcc \
+                --prefix=$(pwd)/numa_bin
+    make install # install numa
+    cd ..
+    cp numactl/numa_bin/include/numa*.h "${ARM64_TOOL}/aarch64-linux-
gnu/libc/usr/include/"
+    cp numactl/numa_bin/lib/libnuma.* "${ARM64_TOOL}/aarch64-linux-
gnu/lib64/"
+    cp numactl/numa_bin/lib/libnuma.* "${ARM64_TOOL}/lib/"
Change to AARCH64_TOOL

Otherwise,
Reviewed-by: Honnappa Nagarahalli <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help