Skip to content

Commit

Permalink
Add a build script for users. FTL can be build by simply running "./b…
Browse files Browse the repository at this point in the history
…uild.sh"

Signed-off-by: DL6ER <dl6er@dl6er.de>
  • Loading branch information
DL6ER committed May 26, 2020
1 parent 0ac8b92 commit c709665
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 4 deletions.
12 changes: 11 additions & 1 deletion .circleci/build-CI.sh
Original file line number Diff line number Diff line change
@@ -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 change: 0 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 17 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -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 ../
4 changes: 2 additions & 2 deletions src/gen_version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c709665

Please sign in to comment.