Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
glow-samples
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
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
Zhengjiang Hu
glow-samples
Commits
859adc4f
Commit
859adc4f
authored
6 years ago
by
Philip Trettner
Browse files
Options
Downloads
Patches
Plain Diff
enabled CI
parent
04f8f773
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+52
-0
52 additions, 0 deletions
.gitlab-ci.yml
CI/ci-linux.sh
+88
-0
88 additions, 0 deletions
CI/ci-linux.sh
CI/ci-windows-build.bat
+66
-0
66 additions, 0 deletions
CI/ci-windows-build.bat
with
206 additions
and
0 deletions
.gitlab-ci.yml
0 → 100644
+
52
−
0
View file @
859adc4f
stages
:
-
Build
variables
:
GET_SOURCES_ATTEMPTS
:
3
VS2017-x64
:
stage
:
Build
script
:
"
CI
\\
ci-windows-build.bat"
variables
:
GIT_SUBMODULE_STRATEGY
:
recursive
ARCHITECTURE
:
"
x64"
COMPILER
:
"
VS2017"
tags
:
-
VS2017
artifacts
:
paths
:
-
"
*/*-build/Release/*.exe"
VS2015-x64
:
stage
:
Build
script
:
"
CI
\\
ci-windows-build.bat"
variables
:
GIT_SUBMODULE_STRATEGY
:
recursive
ARCHITECTURE
:
"
x64"
COMPILER
:
"
VS2015"
tags
:
-
VS2015
artifacts
:
paths
:
-
"
*/*-build/Release/*.exe"
gcc
:
stage
:
Build
script
:
"
CI/ci-linux.sh
gcc"
variables
:
GIT_SUBMODULE_STRATEGY
:
recursive
tags
:
-
Linux
-
buster
clang
:
stage
:
Build
script
:
"
CI/ci-linux.sh
clang"
variables
:
GIT_SUBMODULE_STRATEGY
:
recursive
tags
:
-
Linux
-
buster
This diff is collapsed.
Click to expand it.
CI/ci-linux.sh
0 → 100755
+
88
−
0
View file @
859adc4f
#!/bin/bash
COMPILER
=
$1
LANGUAGE
=
$2
# Exit script on any error
set
-e
OPTIONS
=
""
MAKE_OPTIONS
=
""
BUILDPATH
=
""
if
[
"
$COMPILER
"
==
"gcc"
]
;
then
echo
"Building with GCC"
;
BUILDPATH
=
"gcc"
# without icecc: no options required
OPTIONS
=
"
$OPTIONS
-DCMAKE_CXX_COMPILER=/usr/lib/icecc/bin/g++ -DCMAKE_C_COMPILER=/usr/lib/icecc/bin/gcc"
MAKE_OPTIONS
=
"-j16"
export
ICECC_CXX
=
/usr/bin/g++
;
export
ICECC_CC
=
/usr/bin/gcc
elif
[
"
$COMPILER
"
==
"clang"
]
;
then
OPTIONS
=
"
$OPTIONS
-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang"
echo
"Building with CLANG"
;
BUILDPATH
=
"clang"
fi
if
[
"
$LANGUAGE
"
==
"C++98"
]
;
then
echo
"Building with C++98"
;
BUILDPATH
=
"
$BUILDPATH
-cpp98"
elif
[
"
$LANGUAGE
"
==
"C++11"
]
;
then
echo
"Building with C++11"
;
OPTIONS
=
"
$OPTIONS
-DCMAKE_CXX_FLAGS='-std=c++11' "
BUILDPATH
=
"
$BUILDPATH
-cpp11"
elif
[
"
$LANGUAGE
"
==
"C++14"
]
;
then
echo
"Building with C++14"
;
OPTIONS
=
"
$OPTIONS
-DCMAKE_CXX_FLAGS='-std=c++14' "
BUILDPATH
=
"
$BUILDPATH
-cpp14"
fi
# enable tests
OPTIONS
=
"
$OPTIONS
-DGLOW_SAMPLES_TESTS=ON "
#=====================================
# Color Settings:
#=====================================
NC
=
'\033[0m'
OUTPUT
=
'\033[0;32m'
WARNING
=
'\033[0;93m'
echo
-e
"
${
OUTPUT
}
"
echo
""
echo
"======================================================================"
echo
"Basic configuration details:"
echo
"======================================================================"
echo
-e
"
${
NC
}
"
echo
"Compiler:
$COMPILER
"
echo
"Options:
$OPTIONS
"
echo
"Language:
$LANGUAGE
"
echo
"Make Options:
$OPTIONS
"
echo
"BuildPath:
$BUILDPATH
"
echo
"Path:
$PATH
"
echo
"Language:
$LANGUAGE
"
echo
-e
"
${
OUTPUT
}
"
echo
""
echo
"========================="
echo
"Building Release versions"
echo
"========================="
echo
-e
"
${
NC
}
"
# Create build dir if it does not exist
if
[
!
-d
build-release-
$BUILDPATH
]
;
then
mkdir
build-release-
$BUILDPATH
fi
cd
build-release-
$BUILDPATH
cmake
-DCMAKE_BUILD_TYPE
=
Release
$OPTIONS
..
make
$MAKE_OPTIONS
# back to root
cd
..
This diff is collapsed.
Click to expand it.
CI/ci-windows-build.bat
0 → 100644
+
66
−
0
View file @
859adc4f
@echo
off
:: clone libraries git (set env variable to GIT_SSH_COMMAND maybe use setx once as this key won't change)
set
GIT_SSH_COMMAND
=
ssh
-i
E
:\\\gitlab\\\id_rsa
:: use 4 threads for parallel compilation of the project
set
CL
=
/MP
4
:: determine VS version and set variables
if
"
%COMPILER%
"
==
"VS2012"
(
set
QT_COMPILERPREFIX
=
msvc2012
set
VS_COMPILERVERSION_LONG
=
11
.0
set
VS_COMPILERVERSION_SHORT
=
11
set
VS_EDITION_YEAR
=
2012
set
VS_EDITION_PATH
=
11
.0
)
if
"
%COMPILER%
"
==
"VS2013"
(
set
QT_COMPILERPREFIX
=
msvc2013
set
VS_COMPILERVERSION_LONG
=
12
.0
set
VS_COMPILERVERSION_SHORT
=
12
set
VS_EDITION_YEAR
=
2013
set
VS_EDITION_PATH
=
12
.0
)
if
"
%COMPILER%
"
==
"VS2015"
(
set
QT_COMPILERPREFIX
=
msvc2015
set
VS_COMPILERVERSION_LONG
=
14
.0
set
VS_COMPILERVERSION_SHORT
=
14
set
VS_EDITION_YEAR
=
2015
set
VS_EDITION_PATH
=
14
.0
)
if
"
%COMPILER%
"
==
"VS2017"
(
set
QT_COMPILERPREFIX
=
msvc2017
set
VS_COMPILERVERSION_LONG
=
15
.0
set
VS_COMPILERVERSION_SHORT
=
15
set
VS_EDITION_YEAR
=
2017
::VS2017 default install path is different from other versions
set
VS_EDITION_PATH
=
\2017\Professional
)
set
BUILD_PLATFORM
=
%COMPILER%
:: determine architecture and set variables
if
"
%ARCHITECTURE%
"
==
"x64"
(
set
ARCHBITS
=
_64
set
ARCH_VS
=
Win64
set
STRING_ARCH
=
64
-Bit
)
else
(
set
ARCHBITS
=
set
ARCH_VS
=
set
STRING_ARCH
=
32
-Bit
)
set
GENERATOR
=
Visual
Studio
%VS_COMPILERVERSION_SHORT%
%VS_EDITION_YEAR%%
ARCH_VS
%
set
VS_PATH
=
"C:\Program Files (x86)\Microsoft Visual Studio
%VS_EDITION_PATH%
\Common7\IDE\devenv.com"
mkdir
"build"
cd
"build"
del
*
.exe
IF
%errorlevel%
NEQ
0
exit
/b
%errorlevel%
"C:\Program Files\CMake\bin\cmake.exe"
-G
"
%GENERATOR%
"
-DCMAKE
_BUILD_TYPE
=
Release
-DTG
_TESTS_GEOMETRY
=
ON
-DTG
_SAMPLES_GRAPHICS
=
OFF
-DTG
_BUILD_TESTS
=
ON
..
IF
%errorlevel%
NEQ
0
exit
/b
%errorlevel%
%VS_PATH%
/Build
"Release"
GlowSamples
.sln
/Project
"ALL_BUILD"
IF
%errorlevel%
NEQ
0
exit
/b
%errorlevel%
echo
"Would run tests now :D"
cd
..
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