diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..efc40b7 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,46 @@ +# this workflow will run ci +name: ci +on: + push: + branches: + - alpha + - beta + - master + workflow_dispatch: +env: + zzzz1234: 1 +jobs: + job1: + strategy: + matrix: + architecture: + # - arm64 + - x64 + # - x86 + os: + - macos-latest + - ubuntu-latest + # - windows-latest +# base - .github/workflows/ci.yml - beg + env: + CI_MATRIX_NAME: > + ${{ matrix.architecture }} + ${{ matrix.os }} + CI_WORKFLOW_NAME: > + ${{ github.workflow }} + - ${{ github.event_name }} + - ${{ github.event.inputs.workflow_dispatch_name }} + - ${{ github.ref_name }} + name: > + ${{ matrix.architecture }} + ${{ matrix.os }} + runs-on: ${{ matrix.os }} + steps: + - run: echo "$(date -u +"%Y-%m-%d %TZ") - ${{ env.CI_WORKFLOW_NAME }}" # " + # disable autocrlf in windows + - run: git config --global core.autocrlf false + # https://github.com/actions/checkout + - uses: actions/checkout@v3 + # run nodejs coverages and tests + - run: sh ./ci.sh +# base - .github/workflows/ci.yml - end diff --git a/.gitignore b/.gitignore index d9baa7c..1d559f3 100644 --- a/.gitignore +++ b/.gitignore @@ -6,17 +6,6 @@ ipch Debug Release -/bin/fanndoubled.dll -/bin/fanndoubled.lib -/bin/fannfixedd.dll -/bin/fannfixedd.lib -/bin/fannfloatd.dll -/bin/fannfloatd.lib -/bin/simple_train_doubled.exe -/bin/simple_train_floatd.exe -/bin/xor_test_fixedd.exe -/bin/xor_test_floatd.exe -/bin/xor_traind.exe Makefile CMakeFiles CMakeCache.txt @@ -27,14 +16,6 @@ fann-config.cmake fann.pc install_manifest.txt *~ -/bin/cascade_traind.exe -/bin/momentumsd.exe -/bin/mushroomd.exe -/bin/robotd.exe -/bin/scaling_testd.exe -/bin/scaling_traind.exe -/bin/steepness_traind.exe -/bin/xor_cpp_sampled.exe *.sln *.suo *.filters @@ -55,3 +36,6 @@ cascade_train2.net mushroom_float.net robot_float.net scaling.net + +/VS2010/.vs/ +/bin/ diff --git a/CMakeLists.txt b/CMakeLists.txt index 12ea06c..abc5a64 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ IF(BIICODE) # Initializes block variables INIT_BIICODE_BLOCK() - + # Output folder for binaries SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../bin/fann/examples) SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_SOURCE_DIR}/../bin/fann/examples) @@ -18,11 +18,11 @@ IF(BIICODE) LIST(FIND BII_BLOCK_EXES examples_parallel_train examples_present) SET(examples_present (NOT ${examples_present} EQUAL "-1")) # Depending on examples IF(${examples_present} AND NOT WIN32 AND NOT APPLE) # Linux doesn't have GetTickCount - LIST(REMOVE_ITEM BII_BLOCK_EXES examples_parallel_train) + LIST(REMOVE_ITEM BII_BLOCK_EXES examples_parallel_train) ENDIF() ADD_BIICODE_TARGETS() - + IF(${examples_present}) # This example needs CPP11 ACTIVATE_CPP11(lasote_fann_examples_xor_sample) @@ -61,6 +61,11 @@ IF(NOT COMPILER_SUPPORTS_CXX11) 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.") ENDIF() +if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + # ugly-hack - fix [-Werror,-Wdeprecated-copy] in macos + add_compile_options(-Wno-deprecated) +endif() + list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules) set (FANN_VERSION_MAJOR 2) @@ -82,7 +87,7 @@ configure_file (cmake/fann.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/fann.pc @ONLY) install (FILES ${CMAKE_CURRENT_BINARY_DIR}/fann.pc DESTINATION ${PKGCONFIG_INSTALL_DIR}) -ADD_SUBDIRECTORY( src ) +ADD_SUBDIRECTORY( src ) ################# cpack ################ @@ -95,7 +100,7 @@ SET(CPACK_PACKAGE_VERSION_MINOR "${FANN_VERSION_MINOR}") SET(CPACK_PACKAGE_VERSION_PATCH "${FANN_VERSION_PATCH}") SET(CPACK_GENERATOR "TGZ;ZIP") SET(CPACK_SOURCE_GENERATOR "TGZ;ZIP") -SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Steffen Nissen") +SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Steffen Nissen") SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}") IF(WIN32 AND NOT UNIX) # There is a bug in NSI that does not handle full unix paths properly. Make diff --git a/ci.sh b/ci.sh new file mode 100644 index 0000000..9c9e092 --- /dev/null +++ b/ci.sh @@ -0,0 +1,13 @@ +(set -e + # windows + case "$(uname)" in + MINGW*) + # cmd "/C ci.bat" + exit + ;; + esac + # linux and darwin + cmake . + make + ./tests/fann_tests +)