Add a build script for users. FTL can be build by simply running "./build.sh"

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2020-05-26 22:27:18 +02:00
parent 0ac8b92a39
commit c709665c1a
4 changed files with 30 additions and 4 deletions
+11 -1
View File
@@ -1,7 +1,17 @@
#!/bin/bash
# Pi-hole: A black hole for Internet advertisements
# (c) 2020 Pi-hole, LLC (https://pi-hole.net)
# Network-wide ad blocking via your own hardware.
#
# FTL Engine
# Build script for Circle CI
#
# This file is copyright under the latest version of the EUPL.
# Please see LICENSE file for your rights under this license.
rm -rf cmake/ && \
mkdir cmake && \
cd cmake && \
cmake -DSTATIC="${1}" .. && \
cmake --build . -- GIT_BRANCH="${2}" GIT_TAG="${3}" CIRCLE_JOB="${4}" -j 4
cmake --build . -- GIT_BRANCH="${2}" GIT_TAG="${3}" CIRCLE_JOB="${4}" -j 4 && \
mv pihole-FTL ../
-1
View File
@@ -14,7 +14,6 @@ version: 2
BRANCH=$([ -z "$CIRCLE_TAG" ] && echo "$CIRCLE_BRANCH" || echo "master")
[[ $CIRCLE_JOB == *"qemu"* ]] && DOCKERIFNEEDED="docker run --rm -v $(pwd):/workspace -w /workspace pihole/ftl-build:arm-qemu "
$DOCKERIFNEEDED bash .circleci/build-CI.sh "${STATIC}" "${BRANCH}" "${CIRCLE_TAG}" "${CIRCLE_JOB}"
cp cmake/pihole-FTL .
- run:
name: "Binary checks"
command: bash test/arch_test.sh
Executable
+17
View File
@@ -0,0 +1,17 @@
#!/bin/bash
# Pi-hole: A black hole for Internet advertisements
# (c) 2020 Pi-hole, LLC (https://pi-hole.net)
# Network-wide ad blocking via your own hardware.
#
# FTL Engine
# Build script for FTL
#
# This file is copyright under the latest version of the EUPL.
# Please see LICENSE file for your rights under this license.
rm -rf cmake/ && \
mkdir cmake && \
cd cmake && \
cmake .. && \
cmake --build . -- -j $(nproc) && \
cp pihole-FTL ../
+2 -2
View File
@@ -59,8 +59,8 @@ if(NOT DEFINED GIT_TAG)
endif()
# If CIRCLE_JOB is unset (local compilation), ask uname -m and add locally compiled comment
if(DEFINED ENV{CIRCLE_JOB})
set(FTL_ARCH "$ENV{CIRCLE_JOB} (compiled on CI)")
if(DEFINED CIRCLE_JOB)
set(FTL_ARCH "${CIRCLE_JOB} (compiled on CI)")
else()
execute_process(
COMMAND uname -m