Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
acgl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ACGL
acgl
Commits
cbfd4f79
There was a problem fetching the pipeline summary.
Commit
cbfd4f79
authored
9 years ago
by
Philip Trettner
Browse files
Options
Downloads
Patches
Plain Diff
Added GitLab CI scripts
parent
dba195d5
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitignore
+2
-2
2 additions, 2 deletions
.gitignore
.gitlab-ci.yml
+19
-0
19 additions, 0 deletions
.gitlab-ci.yml
CI/ci-linux.sh
+140
-0
140 additions, 0 deletions
CI/ci-linux.sh
with
161 additions
and
2 deletions
.gitignore
+
2
−
2
View file @
cbfd4f79
...
...
@@ -25,6 +25,7 @@ lib/*
# build files
#
build/*
ci-build-*
*.o
#
...
...
@@ -43,4 +44,3 @@ Makefile
.directory
.DS_Store
Thumbs.db
This diff is collapsed.
Click to expand it.
.gitlab-ci.yml
0 → 100644
+
19
−
0
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
This diff is collapsed.
Click to expand it.
CI/ci-linux.sh
0 → 100755
+
140
−
0
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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment