Skip to content

Commit fa736fe

Browse files
authored
Merge pull request #2085 from numbbo/release
To be released as v2.6
2 parents 11ce3cc + e157ff6 commit fa736fe

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+7041
-2344
lines changed

.circleci/config.yml

+26-6
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515
command: apt-get update -qy
1616
- run:
1717
name: Set time zone
18-
command: ln -fs /usr/share/zoneinfo/Europe/Paris /etc/localtime
18+
command: ln -fs /usr/share/zoneinfo/Europe/Paris /etc/localtime
1919
- run:
2020
name: Install python-dev with apt-get
21-
command: DEBIAN_FRONTEND="noninteractive" apt-get install -y python3-dev
21+
command: DEBIAN_FRONTEND=noninteractive apt-get install -y python3-dev
2222
- run:
2323
name: Install pip with apt-get
2424
command: apt-get install -y python3-pip
@@ -28,6 +28,15 @@ jobs:
2828
- run:
2929
name: Install git with apt-get
3030
command: apt-get install -y git
31+
- run:
32+
name: Install cargo with apt-get
33+
command: apt-get install -y rust-all
34+
- run:
35+
name: Install libclang for bindgen with apt-get
36+
command: apt-get install -y libclang-dev
37+
- run:
38+
name: Install bindgen with cargo
39+
command: cargo install bindgen
3140
# - run:
3241
# name: Install tkinter with apt-get
3342
# command: apt-get install -y python3-tk
@@ -40,10 +49,10 @@ jobs:
4049
command: ln -s /usr/bin/python3 /usr/bin/python
4150
- run:
4251
name: Install coco python
43-
command: python3 do.py run-python
52+
command: python3 do.py run-python install-user
4453
- run:
4554
name: Install coco post-processing
46-
command: python3 do.py install-postprocessing
55+
command: python3 do.py install-postprocessing install-user
4756
- run:
4857
name: Run the example experiment
4958
command: |
@@ -83,11 +92,11 @@ jobs:
8392
no_output_timeout: 1800
8493
- run:
8594
name: Run coco pre-processing tests
86-
command: python3 do.py test-preprocessing
95+
command: python3 do.py test-preprocessing install-user
8796
no_output_timeout: 1800
8897
- run:
8998
name: Run coco post-processing tests
90-
command: python3 do.py test-postprocessing
99+
command: python3 do.py test-postprocessing install-user
91100
no_output_timeout: 5400
92101
- run:
93102
name: Run coco C
@@ -96,6 +105,17 @@ jobs:
96105
name: Run coco C tests
97106
command: python do.py test-c
98107
no_output_timeout: 1800
108+
- run:
109+
name: Run coco Rust
110+
command: |
111+
export PATH=~/.cargo/bin:$PATH
112+
python do.py run-rust
113+
- run:
114+
name: Run coco Rust tests
115+
command: |
116+
export PATH=~/.cargo/bin:$PATH
117+
python do.py test-rust
118+
no_output_timeout: 1800
99119
- run:
100120
name: Run regression test
101121
command: python do.py test-suites

.github/workflows/cmake.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: CMake
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
pull_request:
7+
branches: [ master, development ]
8+
9+
env:
10+
BUILD_TYPE: Release
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
19+
- name: Build C amalgamation
20+
run: python ${{github.workspace}}/do.py build-c
21+
22+
- name: Configure CMake
23+
run: cmake -S ${{github.workspace}}/code-experiments/build/c/ -B ${{github.workspace}}/code-experiments/build/c/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
24+
25+
- name: Build
26+
run: cmake --build ${{github.workspace}}/code-experiments/build/c/build --config ${{env.BUILD_TYPE}}

LICENSE

+1
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,5 @@ We acknowledge in particular:
5151
* the MinUnit code used as the basis for the implementation in
5252
``code-experiments/test/unit-test/minunit_c89.h``, distributed under
5353
the terms of the MIT Licence.
54+
* the Rust code by Leopold Luley in `code-experiments/build/rust/`, distributed unter the terms of both the MIT License and the Apache 2.0 License.
5455

README.md

+20-35
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Languages currently available to connect a solver to the benchmarks are
1919
- `Java`
2020
- `MATLAB/Octave`
2121
- `Python`
22+
- `Rust`
2223

2324
Code for others might be available in branched code.
2425
Contributions to link further languages (including a better
@@ -32,7 +33,7 @@ from using the platform:
3233
![General COCO Structure](coco.png)
3334

3435
For more general information:
35-
- read our benchmarking guidelines introduction [COCO: A Platform for Comparing Continuous Optimizers in a Black-Box Setting (pdf)]((https://www.tandfonline.com/eprint/DQPF7YXFJVMTQBH8NKR8/pdf?target=10.1080/10556788.2020.1808977)) or at [arXiv](https://arxiv.org/abs/1603.08785).
36+
- read our benchmarking guidelines introduction [COCO: A Platform for Comparing Continuous Optimizers in a Black-Box Setting (pdf)](https://www.tandfonline.com/eprint/DQPF7YXFJVMTQBH8NKR8/pdf?target=10.1080/10556788.2020.1808977) or at [arXiv](https://arxiv.org/abs/1603.08785).
3637
- read the [COCO experimental setup](http://numbbo.github.io/coco-doc/experimental-setup) description
3738
- see the [`bbob-biobj` and `bbob-biobj-ext` COCO multi-objective functions testbed](http://numbbo.github.io/coco-doc/bbob-biobj/functions) documentation and the [specificities of the performance assessment for the bi-objective testbeds](http://numbbo.github.io/coco-doc/bbob-biobj/perf-assessment).
3839
- consult the [BBOB workshops series](http://numbbo.github.io/workshops),
@@ -69,7 +70,8 @@ _Additional_ requirements for running an algorithm in a specific language.
6970

7071
* **C**: `make`, such as GNU make (when using [GNU make for Windows](http://gnuwin32.sourceforge.net/packages/make.htm), make sure that your ``CC`` environment variable is set to `gcc` by potentially typing `set CC=gcc` if you see an error).
7172
* **Java**: `gcc` and any Java Development Kit (JDK), such that `javac` and `javah` are accessible
72-
(i.e. in the system path).
73+
(i.e. in the system path).
74+
* **Rust**: For details, take a look at the [Rust Readme](./code-experiments/build/rust/README.md)
7375
* **MATLAB**: at least MATLAB 2008, for details, see [here](./code-experiments/build/matlab/README.md)
7476
* **Python on Windows with MinGW**: Python 2.7 and the Microsoft compiler package for Python 2.7
7577
containing VC9, available [here](https://www.microsoft.com/en-us/download/details.aspx?id=44266).
@@ -609,8 +611,8 @@ year = 2021
609611
}
610612
```
611613
612-
Links and Documentation <a name="Links"></a>
613-
-----------------------
614+
Links About the Workshops and Data <a name="Links"></a>
615+
----------------------------------
614616
* The [_BBOB workshop series_](http://numbbo.github.io/workshops), which uses the
615617
NumBBO/Coco framework extensively, can be tracked
616618
[here](http://numbbo.github.io/workshops "BBOB Workshops")
@@ -623,23 +625,6 @@ Links and Documentation <a name="Links"></a>
623625
found at https://numbbo.github.io/ppdata-archive
624626
* Stay informed about the BBOB workshop series and releases of the NumBBO/Coco software
625627
by registering via [this form](https://docs.google.com/forms/d/1GS48SXGjapUu6WY6Zt-Ma5HCl2izq4ydT7sMa5ujUDI)
626-
* Read about the basic principles behind the Coco platform in [COCO: A Platform for Comparing Continuous Optimizers in a Black-Box Setting (pdf)](https://www.tandfonline.com/eprint/DQPF7YXFJVMTQBH8NKR8/pdf?target=10.1080/10556788.2020.1808977) or at [arXiv](https://arxiv.org/abs/1603.08785).
627-
* For details on the experimental set-up to carry out the benchmarking
628-
please refer to http://numbbo.github.io/coco-doc/experimental-setup/.
629-
* More detailed documentation of the existing benchmark suites can be found here:
630-
- for the **`bbob`** problem suite at https://numbbo.github.io/gforge/downloads/download16.00/bbobdocfunctions.pdf
631-
with the experimental setup at http://coco.lri.fr/downloads/download15.03/bbobdocexperiment.pdf
632-
- for the **`bbob-biobj`** and **`bbob-biobj-ext`** problem suites
633-
at http://numbbo.github.io/coco-doc/bbob-biobj/functions
634-
- for the **`bbob-largescale`** problem suite
635-
at https://arxiv.org/pdf/1903.06396.pdf
636-
- for the **`bbob-mixint`** and **`bbob-biobj-mixint`** problem suites, we refer to
637-
https://hal.inria.fr/hal-02067932/document and to
638-
https://numbbo.github.io/gforge/preliminary-bbob-mixint-documentation/bbob-mixint-doc.pdf
639-
* Online documentation of the NumBBO/Coco API (i.e. for the ANSI C code) is available at
640-
http://numbbo.github.io/coco-doc/C
641-
* More detailed documentation on how the performance assessement is done can
642-
be found at http://numbbo.github.io/coco-doc/perf-assessment/.
643628
* Downloading this repository
644629
- via the above green "Clone or Download" button or
645630
- by typing `git clone https://github.com/numbbo/coco.git` or
@@ -650,30 +635,30 @@ Comprehensive List of Documentations <a name="Documentations"></a>
650635
* General introduction: [COCO: A Platform for Comparing Continuous Optimizers in a Black-Box Setting (pdf)](https://www.tandfonline.com/eprint/DQPF7YXFJVMTQBH8NKR8/pdf?target=10.1080/10556788.2020.1808977) or at [arXiv](https://arxiv.org/abs/1603.08785)
651636
* Experimental setup: http://numbbo.github.io/coco-doc/experimental-setup/
652637
* Testbeds
653-
- bbob: https://numbbo.github.io/gforge/downloads/download16.00/bbobdocfunctions.pdf
654-
- bbob-biobj: http://numbbo.github.io/coco-doc/bbob-biobj/functions/
655-
- bbob-biobj-ext: http://numbbo.github.io/coco-doc/bbob-biobj/functions/
656-
- bbob-noisy (only in old code basis): http://coco.lri.fr/downloads/download15.03/bbobdocnoisyfunctions.pdf
657-
- bbob-largescale: https://arxiv.org/pdf/1903.06396.pdf
658-
- bbob-mixint and bbob-biobj-mixint: https://hal.inria.fr/hal-02067932/document and
659-
https://numbbo.github.io/gforge/preliminary-bbob-mixint-documentation/bbob-mixint-doc.pdf
660-
- bbob-constrained (in progress): http://numbbo.github.io/coco-doc/bbob-constrained/functions/
638+
- `bbob`: https://numbbo.github.io/gforge/downloads/download16.00/bbobdocfunctions.pdf
639+
- `bbob-biobj`: http://numbbo.github.io/coco-doc/bbob-biobj/functions/
640+
- `bbob-biobj-ext`: http://numbbo.github.io/coco-doc/bbob-biobj/functions/
641+
- `bbob-noisy` (only in old code basis): http://coco.lri.fr/downloads/download15.03/bbobdocnoisyfunctions.pdf
642+
- `bbob-largescale`: https://arxiv.org/pdf/1903.06396.pdf
643+
- `bbob-mixint`: https://hal.inria.fr/hal-02067932/document
644+
- `bbob-biobj-mixint`: https://numbbo.github.io/gforge/preliminary-bbob-mixint-documentation/bbob-mixint-doc.pdf
645+
- `bbob-constrained` (in progress): http://numbbo.github.io/coco-doc/bbob-constrained
661646
662-
663647
* Performance assessment: http://numbbo.github.io/coco-doc/perf-assessment/
664648
* Performance assessment for biobjective testbeds: http://numbbo.github.io/coco-doc/bbob-biobj/perf-assessment/
665649
666650
* APIs
667651
- ``C`` experiments code: http://numbbo.github.io/coco-doc/C
668-
- Python experiments code (module `cocoex`): https://numbbo.github.io/gforge/apidocs-cocoex/cocoex.html
669-
- Python short [beginners example experiment](code-experiments/build/python/example_experiment_for_beginners.py)
670-
- Python `example_experiment2.py`: https://numbbo.github.io/gforge/apidocs-example_experiment/example_experiment2.html
671-
- Postprocessing code (module `cocopp`): https://numbbo.github.io/gforge/apidocs-cocopp/cocopp.html
652+
- Python experiments code (module `cocoex`): https://numbbo.github.io/coco-doc/apidocs/cocoex
653+
- Python [short experiment code example for beginners](code-experiments/build/python/example_experiment_for_beginners.py)
654+
- Python [`example_experiment2.py`](https://github.com/numbbo/coco/blob/master/code-experiments/build/python/example_experiment2.py): https://numbbo.github.io/coco-doc/apidocs/example
655+
- Postprocessing code (module `cocopp`): https://numbbo.github.io/coco-doc/apidocs/cocopp
672656
673657
* Somewhat outdated documents:
658+
- Former home page: https://web.archive.org/web/20210504150230/https://coco.gforge.inria.fr/
674659
- Full description of the platform: http://coco.lri.fr/COCOdoc/
675660
- Experimental setup before 2016: http://coco.lri.fr/downloads/download15.03/bbobdocexperiment.pdf
676661
- Old framework software documentation: http://coco.lri.fr/downloads/download15.03/bbobdocsoftware.pdf
677662
678-
* Some examples of [results](https://github.com/numbbo/coco/wiki/COCO-Wiki-Home).
663+
* Some examples of [results](https://github.com/numbbo/coco/wiki/).
679664
+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
cmake_minimum_required(VERSION 3.19)
2+
project(ExampleExperiment
3+
DESCRIPTION "Example COCO experiment"
4+
LANGUAGES C)
5+
6+
find_library(MATH_LIBRARY m)
7+
8+
include(CheckCompilerFlag)
9+
check_compiler_flag(C "-pedantic -Wall -Wextra -Wstrict-prototypes -Wshadow -Wno-sign-compare -Wconversion" CC_HAS_WALL_ETC)
10+
11+
add_library(coco STATIC coco.c coco.h)
12+
target_include_directories(coco PUBLIC .)
13+
if(MATH_LIBRARY)
14+
target_link_libraries(coco PUBLIC ${MATH_LIBRARY})
15+
endif()
16+
# Add warning flags
17+
if (MSVC)
18+
target_compile_options(coco PRIVATE "/W3")
19+
elseif (CC_HAS_WALL_ETC)
20+
target_compile_options(coco PRIVATE -pedantic -Wall -Wextra -Wstrict-prototypes -Wshadow -Wno-sign-compare -Wconversion)
21+
endif()
22+
23+
add_executable(example_experiment example_experiment.c)
24+
target_link_libraries(example_experiment PUBLIC coco)
25+
if(MATH_LIBRARY)
26+
target_link_libraries(example_experiment PUBLIC ${MATH_LIBRARY})
27+
endif()

code-experiments/build/c/Makefile.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
## or installing Cygwin and running GNU make from within Cygwin.
1414

1515
LDFLAGS += -lm
16-
CCFLAGS = -g -ggdb -std=c89 -pedantic -Wall -Wextra -Wstrict-prototypes -Wshadow -Wno-sign-compare -Wconversion
16+
CCFLAGS ?= -g -ggdb -std=c89 -pedantic -Wall -Wextra -Wstrict-prototypes -Wshadow -Wno-sign-compare -Wconversion
1717

1818
########################################################################
1919
## Toplevel targets

code-experiments/build/c/README.md

+19
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,25 @@ the following is lacking:
2323

2424
Instead of `make` and `Makefile` you can use `nmake` and the corresponding `NMakefile`
2525

26+
### CMake
27+
28+
Instead of `make` you can use `cmake` and the corresponding `CMakeLists.txt`:
29+
30+
```
31+
mkdir build
32+
cd build
33+
cmake ../
34+
ninja # or make, depending on your version of CMake
35+
```
36+
37+
### meson
38+
39+
Instead of `make` you can use `meson` and `ninja`:
40+
41+
```
42+
meson setup build
43+
meson compile -C build
44+
```
2645

2746
Getting Started
2847
---------------

code-experiments/build/c/meson.build

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
project('example_experiment', 'c',
2+
default_options: ['warning_level=3', 'buildtype=release']
3+
)
4+
5+
cc = meson.get_compiler('c')
6+
m_dep = cc.find_library('m', required : false)
7+
8+
coco_lib = static_library('coco',
9+
sources: 'coco.c',
10+
dependencies: m_dep
11+
)
12+
13+
executable('example_experiment',
14+
sources: 'example_experiment.c',
15+
link_with: coco_lib,
16+
dependencies: m_dep
17+
)
18+

0 commit comments

Comments
 (0)