diff --git a/.github/workflows/c_actions.yml b/.github/workflows/c_actions.yml index 4cc3d5f..4cff949 100644 --- a/.github/workflows/c_actions.yml +++ b/.github/workflows/c_actions.yml @@ -65,26 +65,11 @@ jobs: SPINN_COMMON_INSTALL_DIR: ${{ github.workspace }}/spinn_common_install FEC_INSTALL_DIR: ${{ github.workspace }}/fec_install SPYNNAKER_INSTALL_DIR: ${{ github.workspace }}/spynnaker_install - C_LOGS_DICT: ${{ github.workspace }}/python_models8/model_binaries/logs.sqlite3 CFLAGS: -fdiagnostics-color=always run: | make -C spinnaker_tools install make -C spinn_common install - make -C SpiNNFrontEndCommon/c_common - make -C sPyNNaker/neural_modelling - make -C sPyNNaker/neural_modelling install - make -C c_models - - - name: Build SpiNNaker C code globally - env: - SPINN_DIRS: ${{ github.workspace }}/spinn_dirs - C_LOGS_DICT: ${{ github.workspace }}/python_models8/model_binaries/logs.sqlite3 - CFLAGS: -fdiagnostics-color=always - run: | - make -C spinnaker_tools install - make -C spinn_common install - make -C SpiNNFrontEndCommon/c_common - make -C sPyNNaker/neural_modelling + make -C SpiNNFrontEndCommon/c_common install make -C sPyNNaker/neural_modelling install make -C c_models @@ -92,8 +77,10 @@ jobs: run: make clean; make SPYNNAKER_DEBUG=DEBUG working-directory: c_models env: - SPINN_DIRS: ${{ github.workspace }}/spinn_dirs - C_LOGS_DICT: ${{ github.workspace }}/python_models8/model_binaries/logs.sqlite3 + SPINN_INSTALL_DIR: ${{ github.workspace }}/spinnaker_tools_install + SPINN_COMMON_INSTALL_DIR: ${{ github.workspace }}/spinn_common_install + FEC_INSTALL_DIR: ${{ github.workspace }}/fec_install + SPYNNAKER_INSTALL_DIR: ${{ github.workspace }}/spynnaker_install CFLAGS: -fdiagnostics-color=always # To be added: Documentation building diff --git a/c_models/Makefile b/c_models/Makefile index 3431bd6..1a9b5ba 100644 --- a/c_models/Makefile +++ b/c_models/Makefile @@ -1,7 +1,14 @@ +MAKEFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) +CURRENT_DIR := $(abspath $(dir $(MAKEFILE_PATH))) +APP_OUTPUT_DIR := $(CURRENT_DIR)/../python_models8/model_binaries/ + DIRS = makefiles all: $(DIRS) for d in $(DIRS); do $(MAKE) -C $$d || exit $$?; done clean: $(DIRS) + $(RM) $(APP_OUTPUT_DIR)logs*.sqlite3 + $(RM) $(APP_OUTPUT_DIR)*.aplx + $(RM) -r $(CURRENT_DIR)/modified_src for d in $(DIRS); do $(MAKE) -C $$d clean || exit $$?; done diff --git a/c_models/makefiles/extra.mk b/c_models/makefiles/extra.mk index 78e57f8..da2d051 100644 --- a/c_models/makefiles/extra.mk +++ b/c_models/makefiles/extra.mk @@ -1,4 +1,5 @@ -SPYNNAKER_INSTALL_DIR := $(strip $(if $(SPYNNAKER_INSTALL_DIR), $(SPYNNAKER_INSTALL_DIR), $(if $(SPINN_DIRS), $(SPINN_DIRS)/spynnaker_install, $(error SPYNNAKER_INSTALL_DIR or SPINN_DIRS is not set. Please define SPYNNAKER_INSTALL_DIR or SPINN_DIRS)))) +CUR_DIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))) +SPYNNAKER_INSTALL_DIR := $(strip $(if $(SPYNNAKER_INSTALL_DIR), $(SPYNNAKER_INSTALL_DIR), $(abspath $(CUR_DIR)/../../../sPyNNaker/neural_modelling))) # Work out the top-level project folder MAKEFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) @@ -9,6 +10,9 @@ BUILD_DIR := $(EXTRA_MODELS_DIR)c_models/build/$(APP)/ # This is where the output .aplx files will go APP_OUTPUT_DIR := $(EXTRA_MODELS_DIR)python_models8/model_binaries/ +# key for the database in this APP_OUTPUT_DIR +# If you change APP_OUTPUT_DIR please use a lower case letter +DATABASE_KEY = N # This is where the extra source files are located EXTRA_SRC_DIR := $(EXTRA_MODELS_DIR)c_models/src diff --git a/c_models/makefiles/extra_neuron.mk b/c_models/makefiles/extra_neuron.mk index f5de65c..52494a5 100644 --- a/c_models/makefiles/extra_neuron.mk +++ b/c_models/makefiles/extra_neuron.mk @@ -1,4 +1,5 @@ -SPYNNAKER_INSTALL_DIR := $(strip $(if $(SPYNNAKER_INSTALL_DIR), $(SPYNNAKER_INSTALL_DIR), $(if $(SPINN_DIRS), $(SPINN_DIRS)/spynnaker_install, $(error SPYNNAKER_INSTALL_DIR or SPINN_DIRS is not set. Please define SPYNNAKER_INSTALL_DIR or SPINN_DIRS)))) +CUR_DIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))) +SPYNNAKER_INSTALL_DIR := $(strip $(if $(SPYNNAKER_INSTALL_DIR), $(SPYNNAKER_INSTALL_DIR), $(abspath $(CUR_DIR)/../../../sPyNNaker/neural_modelling))) # Work out the top-level project folder MAKEFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) @@ -9,6 +10,9 @@ BUILD_DIR := $(EXTRA_MODELS_DIR)c_models/build/$(APP)/ # This is where the output .aplx files will go APP_OUTPUT_DIR := $(EXTRA_MODELS_DIR)python_models8/model_binaries/ +# key for the database in this APP_OUTPUT_DIR +# If you change APP_OUTPUT_DIR please use a lower case letter +DATABASE_KEY = N # This is where the extra source files are located EXTRA_SRC_DIR := $(EXTRA_MODELS_DIR)c_models/src diff --git a/c_models/makefiles/extra_synapse.mk b/c_models/makefiles/extra_synapse.mk index c6e5773..fd8817c 100644 --- a/c_models/makefiles/extra_synapse.mk +++ b/c_models/makefiles/extra_synapse.mk @@ -1,4 +1,5 @@ -SPYNNAKER_INSTALL_DIR := $(strip $(if $(SPYNNAKER_INSTALL_DIR), $(SPYNNAKER_INSTALL_DIR), $(if $(SPINN_DIRS), $(SPINN_DIRS)/spynnaker_install, $(error SPYNNAKER_INSTALL_DIR or SPINN_DIRS is not set. Please define SPYNNAKER_INSTALL_DIR or SPINN_DIRS)))) +CUR_DIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))) +SPYNNAKER_INSTALL_DIR := $(strip $(if $(SPYNNAKER_INSTALL_DIR), $(SPYNNAKER_INSTALL_DIR), $(abspath $(CUR_DIR)/../../../sPyNNaker/neural_modelling))) # Work out the top-level project folder MAKEFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) @@ -9,6 +10,9 @@ BUILD_DIR := $(EXTRA_MODELS_DIR)c_models/build/$(APP)/ # This is where the output .aplx files will go APP_OUTPUT_DIR := $(EXTRA_MODELS_DIR)python_models8/model_binaries/ +# key for the database in this APP_OUTPUT_DIR +# If you change APP_OUTPUT_DIR please use a lower case letter +DATABASE_KEY = N # This is where the extra source files are located EXTRA_SRC_DIR := $(EXTRA_MODELS_DIR)c_models/src diff --git a/python_models8/model_binaries/.gitignore b/python_models8/model_binaries/.gitignore new file mode 100644 index 0000000..06d3c95 --- /dev/null +++ b/python_models8/model_binaries/.gitignore @@ -0,0 +1,2 @@ +*.aplx +logs*.sqlite3 \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index 4018f34..7a5b5e9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -54,7 +54,7 @@ include = [options.package_data] * = *.aplx - *.dict + logs*.sqlite3 [options.extras_require]