Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
interfaces
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
bioroboticslab
biotracker
interfaces
Commits
61568830
Commit
61568830
authored
5 years ago
by
calrama
Browse files
Options
Downloads
Patches
Plain Diff
Update ci/cd
parent
5b27ffc7
No related branches found
No related tags found
No related merge requests found
Pipeline
#18641
passed
5 years ago
Stage: build
Stage: package
Stage: deploy
Pipeline: utility
#18642
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.py
+83
-0
83 additions, 0 deletions
.gitlab-ci.py
.gitlab-ci.yml
+28
-45
28 additions, 45 deletions
.gitlab-ci.yml
with
111 additions
and
45 deletions
.gitlab-ci.py
0 → 100755
+
83
−
0
View file @
61568830
#! /usr/bin/env python3
from
os
import
environ
as
env
from
platform
import
system
from
subprocess
import
check_call
,
check_output
from
argparse
import
ArgumentParser
def
define
(
key
:
str
,
value
:
str
):
return
[
'
-D
'
,
f
'
{
key
}
=
{
value
}
'
]
def
define_env
(
name
:
str
):
return
define
(
name
,
env
[
name
])
if
name
in
env
else
[]
if
system
()
==
'
Windows
'
:
def
setup_msvc
():
msvc_path
=
'
C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/Common7/Tools
'
lines
=
check_output
(
[
'
cmd
'
,
'
/c
'
,
'
VsDevCmd.bat
'
,
'
-arch=amd64
'
,
f
'
-vcvars_ver=
{
env
[
"
VCVARS_VER
"
]
}
'
,
'
&
'
,
'
set
'
],
cwd
=
msvc_path
).
decode
(
'
utf-8
'
).
splitlines
()
for
line
in
lines
:
split
=
line
.
split
(
'
=
'
)
if
len
(
split
)
!=
2
:
continue
key
,
value
=
split
if
key
in
env
and
env
[
key
]
==
value
:
continue
env
[
key
]
=
value
def
build
(
args
):
if
system
()
==
'
Windows
'
:
setup_msvc
()
command
=
[
'
cmake
'
]
command
+=
[
'
-S
'
,
'
.
'
]
command
+=
[
'
-B
'
,
'
build
'
]
command
+=
[
'
-G
'
,
'
Ninja
'
]
command
+=
define_env
(
'
CMAKE_BUILD_TYPE
'
)
command
+=
define
(
'
CMAKE_SUPPRESS_REGENERATION
'
,
'
ON
'
)
command
+=
define
(
'
CMAKE_SKIP_PACKAGE_ALL_DEPENDENCY
'
,
'
ON
'
)
if
system
()
==
'
Windows
'
:
command
+=
define
(
'
CMAKE_TOOLCHAIN_FILE
'
,
env
[
'
VCPKG_DIR
'
]
+
'
/scripts/buildsystems/vcpkg.cmake
'
)
command
+=
define
(
'
VCPKG_TARGET_TRIPLET
'
,
env
[
'
VCPKG_TRIPLET
'
])
check_call
(
command
)
command
=
[
'
ninja
'
,
'
-C
'
,
'
build
'
]
check_call
(
command
)
def
package
(
args
):
command
=
[
'
ninja
'
,
'
-C
'
,
'
build
'
,
'
package
'
]
check_call
(
command
)
if
__name__
==
'
__main__
'
:
parser
=
ArgumentParser
()
subparsers
=
parser
.
add_subparsers
()
build_parser
=
subparsers
.
add_parser
(
'
build
'
)
build_parser
.
set_defaults
(
task
=
build
)
package_parser
=
subparsers
.
add_parser
(
'
package
'
)
package_parser
.
set_defaults
(
task
=
package
)
args
=
parser
.
parse_args
()
args
.
task
(
args
)
This diff is collapsed.
Click to expand it.
.gitlab-ci.yml
+
28
−
45
View file @
61568830
...
...
@@ -8,9 +8,9 @@ stages:
tags
:
[
linux
,
docker
]
image
:
git.imp.fu-berlin.de:5000/bioroboticslab/robofish/docker:devel-ubuntu18.04
.windows
:
tags
:
[
windows
,
docker
]
image
:
git.imp.fu-berlin.de:5000/bioroboticslab/robofish/docker:devel-windows
.windows
-1809
:
tags
:
[
windows
-1809
,
docker
]
image
:
git.imp.fu-berlin.de:5000/bioroboticslab/robofish/docker:devel-windows
1809
.gcc8
:
&gcc8
...
...
@@ -18,54 +18,40 @@ stages:
CXX
:
g++-8
.msvc15.9
:
&msvc15_9
VSDevEnv -arch=amd64 -vcvars_ver="14.16"
.debug
:
&debug
CMAKE_BUILD_TYPE
:
Debug
VCVARS_VER
:
'
14.16'
.release
:
&release
CMAKE_BUILD_TYPE
:
Release
.debug
:
&debug
CMAKE_BUILD_TYPE
:
Debug
.build ubuntu-18.04
:
extends
:
.ubuntu-18.04
stage
:
build
artifacts
:
paths
:
-
build
expire_in
:
1 day
script
:
-
cmake -Bbuild -H. -DCMAKE_BUILD_TYPE="$CMAKE_BUILD_TYPE" -G Ninja -DCMAKE_SUPPRESS_REGENERATION=ON -DCMAKE_SKIP_PACKAGE_ALL_DEPENDENCY=ON
-
ninja -C build
.build windows
:
extends
:
.windows
.build
:
&build
stage
:
build
artifacts
:
paths
:
-
build
expire_in
:
1 day
before_script
:
-
. $Profile
-
*msvc15_9
script
:
-
cmake -Bbuild "-H." -DCMAKE_BUILD_TYPE="$CMAKE_BUILD_TYPE" -G Ninja -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_DIR/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET="$env:VCPKG_TRIPLET" -DCMAKE_SUPPRESS_REGENERATION=ON -DCMAKE_SKIP_PACKAGE_ALL_DEPENDENCY=ON
-
ninja -C build
script
:
./.gitlab-ci.py build
build ubuntu-18.04
:
extends
:
.build ubuntu-18.04
extends
:
.ubuntu-18.04
<<
:
*build
variables
:
<<
:
[
*gcc8
,
*release
]
build windows
:
extends
:
.build windows
build windows-1809
:
extends
:
.windows-1809
<<
:
*build
variables
:
<<
:
[
*release
]
<<
:
[
*msvc15_9
,
*release
]
build windows[debug]
:
extends
:
.build windows
build windows-1809[debug]
:
extends
:
.windows-1809
<<
:
*build
variables
:
<<
:
[
*debug
]
<<
:
[
*msvc15_9
,
*debug
]
.package
:
&package
...
...
@@ -74,8 +60,7 @@ build windows[debug]:
paths
:
-
build/*.tar.xz
expire_in
:
1 week
script
:
-
ninja -C build package
script
:
./.gitlab-ci.py package
package ubuntu-18.04
:
extends
:
.ubuntu-18.04
...
...
@@ -83,22 +68,20 @@ package ubuntu-18.04:
-
build ubuntu-18.04
<<
:
*package
package windows
:
extends
:
.windows
package windows
-1809
:
extends
:
.windows
-1809
dependencies
:
-
build windows
-
build windows
-1809
<<
:
*package
package windows[debug]
:
extends
:
.windows
package windows
-1809
[debug]
:
extends
:
.windows
-1809
dependencies
:
-
build windows[debug]
-
build windows
-1809
[debug]
<<
:
*package
trigger dependents
:
extends
:
.ubuntu-18.04
trigger robofish/utility
:
stage
:
deploy
script
:
-
. /etc/profile.d/robofish.sh
-
gitlab-trigger-pipeline bioroboticslab%2Fbiotracker%2Futility $CI_JOB_TOKEN master
trigger
:
project
:
bioroboticslab/biotracker/utility
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