Skip to content

Commit 0c95d0d

Browse files
committed
Merge branch 'master' of github.com:libfann/fann
2 parents 44bfcee + b591110 commit 0c95d0d

File tree

4 files changed

+72
-24
lines changed

4 files changed

+72
-24
lines changed

.github/workflows/ci.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# this workflow will run ci
2+
name: ci
3+
on:
4+
push:
5+
branches:
6+
- alpha
7+
- beta
8+
- master
9+
workflow_dispatch:
10+
env:
11+
zzzz1234: 1
12+
jobs:
13+
job1:
14+
strategy:
15+
matrix:
16+
architecture:
17+
# - arm64
18+
- x64
19+
# - x86
20+
os:
21+
- macos-latest
22+
- ubuntu-latest
23+
# - windows-latest
24+
# base - .github/workflows/ci.yml - beg
25+
env:
26+
CI_MATRIX_NAME: >
27+
${{ matrix.architecture }}
28+
${{ matrix.os }}
29+
CI_WORKFLOW_NAME: >
30+
${{ github.workflow }}
31+
- ${{ github.event_name }}
32+
- ${{ github.event.inputs.workflow_dispatch_name }}
33+
- ${{ github.ref_name }}
34+
name: >
35+
${{ matrix.architecture }}
36+
${{ matrix.os }}
37+
runs-on: ${{ matrix.os }}
38+
steps:
39+
- run: echo "$(date -u +"%Y-%m-%d %TZ") - ${{ env.CI_WORKFLOW_NAME }}" # "
40+
# disable autocrlf in windows
41+
- run: git config --global core.autocrlf false
42+
# https://github.com/actions/checkout
43+
- uses: actions/checkout@v3
44+
# run nodejs coverages and tests
45+
- run: sh ./ci.sh
46+
# base - .github/workflows/ci.yml - end

.gitignore

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,6 @@
66
ipch
77
Debug
88
Release
9-
/bin/fanndoubled.dll
10-
/bin/fanndoubled.lib
11-
/bin/fannfixedd.dll
12-
/bin/fannfixedd.lib
13-
/bin/fannfloatd.dll
14-
/bin/fannfloatd.lib
15-
/bin/simple_train_doubled.exe
16-
/bin/simple_train_floatd.exe
17-
/bin/xor_test_fixedd.exe
18-
/bin/xor_test_floatd.exe
19-
/bin/xor_traind.exe
209
Makefile
2110
CMakeFiles
2211
CMakeCache.txt
@@ -27,14 +16,6 @@ fann-config.cmake
2716
fann.pc
2817
install_manifest.txt
2918
*~
30-
/bin/cascade_traind.exe
31-
/bin/momentumsd.exe
32-
/bin/mushroomd.exe
33-
/bin/robotd.exe
34-
/bin/scaling_testd.exe
35-
/bin/scaling_traind.exe
36-
/bin/steepness_traind.exe
37-
/bin/xor_cpp_sampled.exe
3819
*.sln
3920
*.suo
4021
*.filters
@@ -55,3 +36,6 @@ cascade_train2.net
5536
mushroom_float.net
5637
robot_float.net
5738
scaling.net
39+
40+
/VS2010/.vs/
41+
/bin/

CMakeLists.txt

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
IF(BIICODE)
22
# Initializes block variables
33
INIT_BIICODE_BLOCK()
4-
4+
55
# Output folder for binaries
66
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../bin/fann/examples)
77
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_SOURCE_DIR}/../bin/fann/examples)
@@ -18,11 +18,11 @@ IF(BIICODE)
1818
LIST(FIND BII_BLOCK_EXES examples_parallel_train examples_present)
1919
SET(examples_present (NOT ${examples_present} EQUAL "-1")) # Depending on examples
2020
IF(${examples_present} AND NOT WIN32 AND NOT APPLE) # Linux doesn't have GetTickCount
21-
LIST(REMOVE_ITEM BII_BLOCK_EXES examples_parallel_train)
21+
LIST(REMOVE_ITEM BII_BLOCK_EXES examples_parallel_train)
2222
ENDIF()
2323

2424
ADD_BIICODE_TARGETS()
25-
25+
2626
IF(${examples_present})
2727
# This example needs CPP11
2828
ACTIVATE_CPP11(lasote_fann_examples_xor_sample)
@@ -61,6 +61,11 @@ IF(NOT COMPILER_SUPPORTS_CXX11)
6161
message(WARNING "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Tests will not be compiled. To enable tests use a compiler that supports C++11.")
6262
ENDIF()
6363

64+
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
65+
# ugly-hack - fix [-Werror,-Wdeprecated-copy] in macos
66+
add_compile_options(-Wno-deprecated)
67+
endif()
68+
6469
list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules)
6570

6671
set (FANN_VERSION_MAJOR 2)
@@ -82,7 +87,7 @@ configure_file (cmake/fann.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/fann.pc @ONLY)
8287

8388
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/fann.pc DESTINATION ${PKGCONFIG_INSTALL_DIR})
8489

85-
ADD_SUBDIRECTORY( src )
90+
ADD_SUBDIRECTORY( src )
8691

8792
################# cpack ################
8893

@@ -95,7 +100,7 @@ SET(CPACK_PACKAGE_VERSION_MINOR "${FANN_VERSION_MINOR}")
95100
SET(CPACK_PACKAGE_VERSION_PATCH "${FANN_VERSION_PATCH}")
96101
SET(CPACK_GENERATOR "TGZ;ZIP")
97102
SET(CPACK_SOURCE_GENERATOR "TGZ;ZIP")
98-
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Steffen Nissen")
103+
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Steffen Nissen")
99104
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}")
100105
IF(WIN32 AND NOT UNIX)
101106
# There is a bug in NSI that does not handle full unix paths properly. Make

ci.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
(set -e
2+
# windows
3+
case "$(uname)" in
4+
MINGW*)
5+
# cmd "/C ci.bat"
6+
exit
7+
;;
8+
esac
9+
# linux and darwin
10+
cmake .
11+
make
12+
./tests/fann_tests
13+
)

0 commit comments

Comments
 (0)