Skip to content

Commit 08331c2

Browse files
committed
Conflicts
2 parents 9607553 + f631e2f commit 08331c2

32 files changed

Lines changed: 993 additions & 41 deletions

.travis.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
os:
2+
- osx
3+
- linux
4+
5+
osx_image: xcode9.2
6+
sudo: required
7+
services:
8+
- docker
9+
10+
language: cpp
11+
12+
branches:
13+
only:
14+
- master
15+
- stable
16+
17+
env: # Don't forget to pass env to docker in run_in_docker.sh
18+
- CONDA_PY=27
19+
- CONDA_PY=35
20+
- CONDA_PY=36
21+
22+
script:
23+
./travis/main.sh

CMakeLists.txt

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ include(FindPythonLibs)
99
set(Boost_USE_STATIC_LIBS OFF) # only find static libs
1010
set(Boost_USE_MULTITHREADED ON)
1111
set(Boost_USE_STATIC_RUNTIME OFF)
12-
find_package(Boost COMPONENTS date_time system filesystem python3 serialization)
12+
find_package(Boost COMPONENTS
13+
date_time
14+
system
15+
filesystem
16+
python3
17+
serialization)
1318
if(Boost_FOUND)
1419
include_directories(${Boost_INCLUDE_DIRS})
1520
endif()
@@ -36,15 +41,17 @@ set(SOURCE_FILES
3641
src/Population.cpp
3742
src/Population.h
3843
src/PythonBindings.cpp
39-
src/PythonBindings.h
4044
src/Random.cpp
4145
src/Random.h
4246
src/Species.cpp
4347
src/Species.h
4448
src/Substrate.cpp
4549
src/Substrate.h
4650
src/Utils.cpp
47-
src/Utils.h src/Traits.h src/Traits.cpp)
51+
src/Utils.h
52+
src/Traits.h
53+
src/Traits.cpp)
54+
4855

4956
add_executable(MultiNEAT ${SOURCE_FILES})
50-
target_link_libraries(MultiNEAT ${Boost_LIBRARIES} ${PYTHON_LIBRARIES} pthread)
57+
target_link_libraries(MultiNEAT ${Boost_LIBRARIES} ${PYTHON_LIBRARIES} pthread)

MultiNEAT.cbp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@
6464
<Unit filename="src/Population.cpp" />
6565
<Unit filename="src/Population.h" />
6666
<Unit filename="src/PythonBindings.cpp" />
67-
<Unit filename="src/PythonBindings.h" />
6867
<Unit filename="src/Random.cpp" />
6968
<Unit filename="src/Random.h" />
7069
<Unit filename="src/Species.cpp" />

MultiNEAT.project

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
<File Name="src/Population.cpp"/>
4646
<File Name="src/Population.h"/>
4747
<File Name="src/PythonBindings.cpp"/>
48-
<File Name="src/PythonBindings.h"/>
4948
<File Name="src/Random.cpp"/>
5049
<File Name="src/Random.h"/>
5150
<File Name="src/Species.cpp"/>

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ GNU Lesser General Public License v3.0
2121

2222
#### To compile
2323

24-
* Set the required system (boost or cython) by setting an evironment variable with name MN_BUILD.
24+
* Set the required system (boost or cython) by setting an environment variable with name MN_BUILD.
2525
Example in Linux:
2626
```bash
27-
export MN_BUILD=cython
27+
export MN_BUILD=boost
2828
```
2929

3030
* then, the usual:

_MultiNEAT.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@ cdef class Species:
950950
del self.thisptr
951951

952952
def __repr__(self):
953-
return 'ID {} Age {}'.format(self.thisptr.ID(), self.thisptr.Age())
953+
return 'ID {} AgeGens {}'.format(self.thisptr.ID(), self.thisptr.AgeGens())
954954

955955
def GetBestFitness(self):
956956
return self.thisptr.GetBestFitness()
@@ -1193,4 +1193,4 @@ cdef Parameters buildParams(cmn.Parameters& par):
11931193
del tPar.thisptr
11941194
tPar.thisptr = &par
11951195
tPar.borrowed = True
1196-
return tPar
1196+
return tPar

appveyor.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
image: Visual Studio 2017
2+
3+
# We always use a 64-bit machine, but can build x86 distributions
4+
# with the TARGET_ARCH variable.
5+
platform:
6+
- x64
7+
8+
environment:
9+
fast_finish: true
10+
11+
matrix:
12+
# Unfortunately, compiler/SDK configuration for 64 bit builds depends on
13+
# python version. Right now conda build does not configure the SDK, and
14+
# the appveyor setup only sets up the SDK once, so separate by python
15+
# versions.
16+
- TARGET_ARCH: "x64"
17+
CONDA_PY: "35"
18+
MINICONDA: "C:\\Miniconda%CONDA_PY%-%TARGET_ARCH%"
19+
- TARGET_ARCH: "x86"
20+
CONDA_PY: "35"
21+
MINICONDA: "C:\\Miniconda%CONDA_PY%"
22+
23+
- TARGET_ARCH: "x64"
24+
CONDA_PY: "36"
25+
MINICONDA: "C:\\Miniconda%CONDA_PY%-%TARGET_ARCH%"
26+
- TARGET_ARCH: "x86"
27+
CONDA_PY: "36"
28+
MINICONDA: "C:\\Miniconda%CONDA_PY%"
29+
30+
init:
31+
- "ECHO %MINICONDA%"
32+
33+
install:
34+
- "%MINICONDA%\\Scripts\\Activate.bat"
35+
- conda config --set always_yes yes --set changeps1 no
36+
- conda update -q conda
37+
- conda info -a
38+
- conda install anaconda-client conda-build
39+
- yes | anaconda login --username %CONDA_LOGIN_USERNAME% --password %CONDA_LOGIN_PASSWORD% --hostname MultiNEAT-APPVYR-WIN-BUILD-%APPVEYOR_BUILD_NUMBER%-%CONDA_PY%-%TARGET_ARCH%
40+
- conda config --set anaconda_upload %CONDA_UPLOAD%
41+
42+
build: false
43+
44+
test_script:
45+
- "%MINICONDA%\\Scripts\\Activate.bat"
46+
- conda build conda/ -c defaults -c conda-forge
47+
48+
skip_commits:
49+
files:
50+
- docs/*
51+
- travis/*
52+
- .travis.yml

conda/bld.bat

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@ECHO ON
2+
3+
REM Make sure to use proper python from conda
4+
REM set PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\
5+
6+
set MN_BUILD=boost
7+
8+
python %SRC_DIR%/setup.py build_ext
9+
python %SRC_DIR%/setup.py install

conda/build.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
3+
# set -x
4+
set -e
5+
6+
export MN_BUILD=boost
7+
8+
SOURCE_CODE_DIR=${SRC_DIR:-$(dirname $0)/..}
9+
10+
python ${SOURCE_CODE_DIR}/setup.py build_ext
11+
python ${SOURCE_CODE_DIR}/setup.py install

conda/conda_build_config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
python:
2+
- 2.7 # [not win]
3+
- 3.5
4+
- 3.6

0 commit comments

Comments
 (0)