Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
acgl
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ACGL
acgl
Commits
cbfd4f79
Commit
cbfd4f79
authored
Jan 14, 2016
by
Philip Trettner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added GitLab CI scripts
parent
dba195d5
Pipeline
#728
passed with stage
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
161 additions
and
2 deletions
+161
-2
.gitignore
.gitignore
+2
-2
.gitlab-ci.yml
.gitlab-ci.yml
+19
-0
ci-linux.sh
CI/ci-linux.sh
+140
-0
No files found.
.gitignore
View file @
cbfd4f79
...
...
@@ -10,7 +10,7 @@ lib/*
#
# binaries:
# (add project specific filenames here)
#
#
#
# IDE files:
...
...
@@ -25,6 +25,7 @@ lib/*
# build files
#
build/*
ci-build-*
*.o
#
...
...
@@ -43,4 +44,3 @@ Makefile
.directory
.DS_Store
Thumbs.db
.gitlab-ci.yml
0 → 100644
View file @
cbfd4f79
gcc-c++11-debug
:
script
:
"
CI/ci-linux.sh
gcc
c++11
debug"
tags
:
-
Linux
clang-c++11-debug
:
script
:
"
CI/ci-linux.sh
clang
c++11
debug"
tags
:
-
Linux
gcc-c++11-release
:
script
:
"
CI/ci-linux.sh
gcc
c++11
release"
tags
:
-
Linux
clang-c++11-release
:
script
:
"
CI/ci-linux.sh
clang
c++11
release"
tags
:
-
Linux
CI/ci-linux.sh
0 → 100755
View file @
cbfd4f79
#!/bin/bash
COMPILER
=
$1
LANGUAGE
=
$2
BUILDTYPE
=
$3
# Exit script on any error
set
-e
# Updating/initializing submodules
git submodule update
--init
--recursive
OPTIONS
=
""
MAKE_OPTIONS
=
""
BUILDPATH
=
"ci-build"
BINPATH
=
""
STARTPATH
=
`
pwd
`
ADDITIONAL_CMAKE_OPTIONS
=
""
TEST_BINARY
=
""
#=====================================
# Compiler Settings:
#=====================================
if
[
"
$COMPILER
"
==
"gcc"
]
;
then
echo
"Building with GCC"
;
BUILDPATH
=
"
$BUILDPATH
-gcc"
OPTIONS
=
"-DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc"
elif
[
"
$COMPILER
"
==
"clang"
]
;
then
echo
"Building with CLANG"
;
OPTIONS
=
"
$OPTIONS
-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang"
BUILDPATH
=
"
$BUILDPATH
-clang"
else
echo
"Unknown compiler:
$COMPILER
"
exit
1
fi
#=====================================
# Language Settings:
#=====================================
if
[
"
$LANGUAGE
"
==
"c++98"
]
;
then
echo
"Building with C++98 is NOT SUPPORTED (yet)!"
;
exit
1
elif
[
"
$LANGUAGE
"
==
"c++11"
]
;
then
echo
"Building with C++11"
;
#OPTIONS="$OPTIONS -DCMAKE_CXX_FLAGS='-std=c++11' "
# option is automatic for now
BUILDPATH
=
"
$BUILDPATH
-cpp11"
else
echo
"Unknown language:
$LANGUAGE
"
exit
1
fi
#=====================================
# Build type Settings:
#=====================================
if
[
"
$BUILDTYPE
"
==
"debug"
]
;
then
echo
"Building in DEBUG"
;
OPTIONS
=
"
$OPTIONS
-DCMAKE_BUILD_TYPE=Debug "
BUILDPATH
=
"
$BUILDPATH
-debug"
BINPATH
=
"bin/Debug"
elif
[
"
$BUILDTYPE
"
==
"release"
]
;
then
echo
"Building in RELEASE"
;
OPTIONS
=
"
$OPTIONS
-DCMAKE_BUILD_TYPE=Release "
BUILDPATH
=
"
$BUILDPATH
-release"
BINPATH
=
"bin/Release"
else
echo
"Unknown build type:
$BUILDTYPE
"
exit
1
fi
#=====================================
# Max Jobs
#=====================================
JOBS
=
`
grep
-c
^processor /proc/cpuinfo
`
JOBS
=
$((
$JOBS
>
8
?
8
:
$JOBS
))
echo
"Building with
$JOBS
jobs"
#=====================================
# Color Settings:
#=====================================
NC
=
'\033[0m'
OUTPUT
=
'\033[0;32m'
WARNING
=
'\033[0;93m'
#=====================================
#=====================================
#=====================================
echo
-e
"
${
OUTPUT
}
"
echo
""
echo
"======================================================================"
echo
"Building
$BUILDPATH
"
echo
" cmake:
$OPTIONS
"
echo
"======================================================================"
echo
-e
"
${
NC
}
"
cd
$STARTPATH
if
[
!
-d
$BUILDPATH
]
;
then
mkdir
$BUILDPATH
fi
cd
$BUILDPATH
cmake
-G
Ninja
$ADDITIONAL_CMAKE_OPTIONS
$OPTIONS
../
#build it
ninja
-j
$JOBS
-l
$JOBS
if
[
-n
"
$TEST_BINARY
"
]
;
then
echo
-e
"
${
OUTPUT
}
"
echo
""
echo
"======================================================================"
echo
"Running Unittests"
echo
"======================================================================"
echo
-e
"
${
NC
}
"
# going to bin/BUILDTYPE
cd
$STARTPATH
cd
$BINPATH
#execute tests
./
$TEST_BINARY
--gtest_color
=
yes
fi
#=====================================
# back to start
cd
$STARTPATH
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment