Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
alta
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
5
Issues
5
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alta
alta
Commits
63e446a6
Commit
63e446a6
authored
Jul 01, 2018
by
Laurent Belcour
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CI] Update the AppVeyor and Travis script to incorporate both scons and cmake builds.
parent
12d5ab6e
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
97 additions
and
46 deletions
+97
-46
.appveyor.yml
.appveyor.yml
+53
-17
.travis.yml
.travis.yml
+37
-24
setpath.sh
setpath.sh
+1
-0
sources/python/wrapper_data.h
sources/python/wrapper_data.h
+5
-4
sources/python/wrapper_vec.h
sources/python/wrapper_vec.h
+1
-1
No files found.
.appveyor.yml
View file @
63e446a6
os
:
-
Visual Studio
201
5
-
Visual Studio
201
7
build
:
verbosity
:
detailed
environment
:
matrix
:
-
builder
:
cmake
-
builder
:
scons
init
:
-
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
install
:
-
SET "PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
-
python --version
...
...
@@ -12,10 +20,17 @@ install:
-
pip install -U wheel
-
pip install scons==2.4.1
-
cinst nsis.portable
-
hg clone https://bitbucket.org/eigen/eigen external\eigen3
-
cd external\eigen3
-
mkdir build & cd build
-
cmake .. -DCMAKE_INSTALL_PREFIX="..\..\build" -DCMAKE_BUILD_TYPE=Release -G "NMake Makefiles"
-
nmake install
-
cd ..\..\..\
-
dir
before_build
:
# BOOST Python require x86 compilation
-
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
#
- call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
#- call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86
# Build script
...
...
@@ -30,23 +45,33 @@ build_script:
#- dir C:\Python27\libs
#- dir C:\Libraries\boost_1_63_0
#- dir C:\Libraries\boost_1_63_0\lib64-msvc-14.0
-
scons --cfg=./configs/scons/config-windows-appveyor.py
-
appveyor PushArtifact config.log
-
if "%builder%" == "scons" (
scons --cfg=./configs/scons/config-windows-appveyor.py &
appveyor PushArtifact config.log
)
# Install CERES
-
cd external
-
git clone https://ceres-solver.googlesource.com/ceres-solver
-
cd ceres-solver
-
mkdir build-ceres
-
cd build-ceres
-
cmake .. -DBUILD_SHARED_LIBS=ON -DMINIGLOG=ON -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF -DCMAKE_INSTALL_PREFIX="..\..\build" -DEIGEN_INCLUDE_DIR="..\..\build\include" -DCMAKE_BUILD_TYPE=Release -G "NMake Makefiles"
-
nmake install
-
cd ..\..\..
# - cd external
# - git clone https://ceres-solver.googlesource.com/ceres-solver
# - cd ceres-solver
# - mkdir build-ceres
# - cd build-ceres
# - cmake .. -DBUILD_SHARED_LIBS=ON -DMINIGLOG=ON -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF -DCMAKE_INSTALL_PREFIX="..\..\build" -DEIGEN_INCLUDE_DIR="..\..\build\include" -DCMAKE_BUILD_TYPE=Release -G "NMake Makefiles"
# - nmake install
# - cd ..\..\..
# - dir
# Rebuild with CERES and Python
-
scons --cfg=./configs/scons/config-windows-appveyor.py
#- scons --cfg=./configs/scons/config-windows-appveyor.py python
-
appveyor PushArtifact config.log
-
if "%builder%" == "scons" (
scons --cfg=./configs/scons/config-windows-appveyor.py &
appveyor PushArtifact config.log
) else (
mkdir build &
cd build &
cmake .. -DEIGEN3_INCLUDE_DIR="external/build/include/eigen3" -DCMAKE_BUILD_TYPE=Release -G "NMake Makefiles" &
nmake &
cd ..
)
# Generate product
-
makensis sources\scripts\installer.nsi
...
...
@@ -57,11 +82,22 @@ build_script:
#
test_script
:
-
./setpath.bat
-
scons --cfg=./configs/scons/config-windows-appveyor.py tests
#- scons --cfg=./configs/scons/config-windows-appveyor.py python tests
-
if "%builder%" == "scons" (
scons --cfg=./configs/scons/config-windows-appveyor.py tests
) else
cd build &
nmake test &
cd ..
)
artifacts
:
-
path
:
sources\scripts\ALTA.exe
name
:
ALTA
-
path
:
config.log
name
:
Log
on_failure
:
-
ls
-
if "%builder%" == "cmake" (
more Testing\Temporary\LastText.log
)
.travis.yml
View file @
63e446a6
language
:
cpp
matrix
:
include
:
-
os
:
linux
dist
:
trusty
sudo
:
required
addons
:
env
:
-
builder=scons
-
builder=cmake
os
:
-
linux
-
osx
dist
:
trusty
sudo
:
required
addons
:
apt
:
sources
:
-
ubuntu-toolchain-r-test
...
...
@@ -12,25 +16,34 @@ matrix:
-
g++-6
-
cmake
-
libboost-python-dev
-
os
:
osx
before_install
:
-
brew update
-
brew install scons
-
libeigen3-dev
before_install
:
-
OMP_NUM_THREADS=2
-
eval "${MATRIX_EVAL}"
#- sudo apt-get update -qq -y
#- sudo apt-get install -qq -y libopenexr-dev cmake libboost-python-dev libnlopt-dev coinor-libipopt-dev liblapack-dev libblas-dev libgfortran-4.8-dev
-
echo "${builder}"
-
if [ ${TRAVIS_OS_NAME} = 'osx' ]; then
brew update;
brew install scons eigen;
fi
script
:
-
git submodule init
-
git submodule update
-
scons
-
scons tests
#- scons tests python -i
-
if [ ${builder} = 'scons' ]; then
scons;
scons tests;
else
mkdir build;
cd build;
cmake ..;
make -i;
make test;
fi
after_failure
:
-
cat config.log
-
if [ ${builder} = 'scons' ]; then
cat config.log;
else
cat Testing/Temporary/LastTest.log
fi
setpath.sh
View file @
63e446a6
...
...
@@ -27,3 +27,4 @@ export ALTA_PLUGIN_PATH="$builddir/plugins"
export
LD_LIBRARY_PATH
=
"
$LD_LIBRARY_PATH
:
$builddir
/plugins:
$external
"
export
PATH
=
"
$PATH
:
$builddir
/softs:
$scripts
"
export
PYTHONPATH
=
"
$PYTHONPATH
:
$builddir
/python"
export
JUPYTER_PATH
=
"
$JUPYTER_PATH
:
$builddir
/python"
sources/python/wrapper_data.h
View file @
63e446a6
...
...
@@ -51,6 +51,7 @@ inline void register_data(py::module& m) {
.
def
(
"size"
,
&
data
::
size
)
.
def
(
"get"
,
&
data
::
get
)
.
def
(
"set"
,
&
data
::
set
)
.
def
(
"value"
,
&
data
::
value
)
.
def
(
"save"
,
&
data
::
save
)
.
def
(
"parametrization"
,
&
data
::
parametrization
);
m
.
def
(
"get_data"
,
get_data
);
...
...
sources/python/wrapper_vec.h
View file @
63e446a6
...
...
@@ -63,7 +63,7 @@ inline void register_vec(py::module& m) {
}))
.
def
(
"__add__"
,
&
vec_add
)
.
def
(
"__sub__"
,
&
vec_sub
)
.
def
(
"__len__"
,
&
vec
::
size
)
//
.def("__len__", &vec::size)
.
def
(
"__getitem__"
,
[](
const
vec
&
s
,
unsigned
int
i
)
{
if
(
i
>=
s
.
size
())
throw
py
::
index_error
();
return
s
[
i
];
...
...
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