Skip to content

Commit

Permalink
Retesting build on github actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
arobenko committed Sep 17, 2024
1 parent ff0d51e commit 072096b
Show file tree
Hide file tree
Showing 9 changed files with 97 additions and 25 deletions.
9 changes: 7 additions & 2 deletions script/env_dev_clang.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
#!/bin/bash

export CC=clang
export CXX=clang++
if [ -z "${CC}" ]; then
export CC=clang
fi

if [ -z "${CXX}" ]; then
export CXX=clang++
fi

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source ${SCRIPT_DIR}/env_dev.sh "$@"
9 changes: 7 additions & 2 deletions script/env_dev_size_gcc.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
#!/bin/bash

export CC=gcc
export CXX=g++
if [ -z "${CC}" ]; then
export CC=gcc
fi

if [ -z "${CXX}" ]; then
export CXX=g++
fi

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source ${SCRIPT_DIR}/env_dev_size.sh "$@"
Expand Down
29 changes: 29 additions & 0 deletions script/full_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash

if [ -z "${CC}" -o -z "$CXX" ]; then
echo "ERROR: Compilers are not provided"
exit 1
fi

if [ -z "${COMMON_BUILD_TYPE}" ]; then
echo "ERROR: Build type not provided"
exit 1
fi

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
ROOT_DIR=$( dirname ${SCRIPT_DIR} )
export BUILD_DIR="${ROOT_DIR}/build.full.${CC}.${COMMON_BUILD_TYPE}"
export COMMON_INSTALL_DIR=${BUILD_DIR}/install
export EXTERNALS_DIR=${ROOT_DIR}/externals
mkdir -p ${BUILD_DIR}

${SCRIPT_DIR}/prepare_externals.sh

source ${SCRIPT_DIR}/env_dev.sh "$@"

procs=$(nproc)
if [ -n "${procs}" ]; then
procs_param="--parallel ${procs}"
fi

cmake --build ${BUILD_DIR} --config ${COMMON_BUILD_TYPE} --target install ${procs_param}
16 changes: 1 addition & 15 deletions script/full_debug_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,6 @@ if [ -z "${CC}" -o -z "$CXX" ]; then
fi

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
ROOT_DIR=$( dirname ${SCRIPT_DIR} )
export BUILD_DIR="${ROOT_DIR}/build.full.${CC}"
export COMMON_INSTALL_DIR=${BUILD_DIR}/install
export COMMON_BUILD_TYPE=Debug
export EXTERNALS_DIR=${ROOT_DIR}/externals
mkdir -p ${BUILD_DIR}
exec ${SCRIPT_DIR}/full_build.sh

${SCRIPT_DIR}/prepare_externals.sh

source ${SCRIPT_DIR}/env_dev.sh "$@"

procs=$(nproc)
if [ -n "${procs}" ]; then
procs_param="--parallel ${procs}"
fi

cmake --build ${BUILD_DIR} --config ${COMMON_BUILD_TYPE} --target install ${procs_param}
11 changes: 8 additions & 3 deletions script/full_debug_build_clang.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
#!/bin/bash

export CC=clang
export CXX=clang++
if [ -z "${CC}" ]; then
export CC=clang
fi

if [ -z "${CXX}" ]; then
export CXX=clang++
fi

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
${SCRIPT_DIR}/full_debug_build.sh "$@"
exec ${SCRIPT_DIR}/full_debug_build.sh "$@"

11 changes: 8 additions & 3 deletions script/full_debug_build_gcc.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
#!/bin/bash

export CC=gcc
export CXX=g++
if [ -z "${CC}" ]; then
export CC=gcc
fi

if [ -z "${CXX}" ]; then
export CXX=g++
fi

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
${SCRIPT_DIR}/full_debug_build.sh "$@"
exec ${SCRIPT_DIR}/full_debug_build.sh "$@"

11 changes: 11 additions & 0 deletions script/full_release_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

if [ -z "${CC}" -o -z "$CXX" ]; then
echo "ERROR: Compilers are not provided"
exit 1
fi

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
export COMMON_BUILD_TYPE=Release
exec ${SCRIPT_DIR}/full_build.sh

13 changes: 13 additions & 0 deletions script/full_release_build_clang.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

if [ -z "${CC}" ]; then
export CC=clang
fi

if [ -z "${CXX}" ]; then
export CXX=clang++
fi

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
exec ${SCRIPT_DIR}/full_release_build.sh "$@"

13 changes: 13 additions & 0 deletions script/full_release_build_gcc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

if [ -z "${CC}" ]; then
export CC=gcc
fi

if [ -z "${CXX}" ]; then
export CXX=g++
fi

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
exec ${SCRIPT_DIR}/full_release_build.sh "$@"

0 comments on commit 072096b

Please sign in to comment.