Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 25 additions & 11 deletions .github/workflows/c_actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ jobs:
with:
python-version: 3.12

- name: Set environment variables
run: |
echo "SPINN_DIRS=$PWD/spinnaker_tools" >> $GITHUB_ENV
echo "NEURAL_MODELLING_DIRS=$PWD/sPyNNaker/neural_modelling" >> $GITHUB_ENV

- name: Checkout SpiNNaker C Dependencies
uses: SpiNNakerManchester/SupportScripts/actions/install-spinn-deps@main
with:
Expand All @@ -64,22 +59,41 @@ jobs:
with:
base-dir: c_models/src

- name: Build SpiNNaker C dependencies
- name: Build SpiNNaker C code
env:
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
C_LOGS_DICT: ${{ github.workspace }}/python_models8/model_binaries/logs.sqlite3
CFLAGS: -fdiagnostics-color=always
run: |
make -C $SPINN_DIRS
make -C spinnaker_tools install
make -C spinn_common install
make -C SpiNNFrontEndCommon/c_common install
make -C SpiNNFrontEndCommon/c_common
make -C sPyNNaker/neural_modelling
make -C sPyNNaker/neural_modelling install
make -C c_models

- name: Build C code
run: make
working-directory: 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 sPyNNaker/neural_modelling install
make -C c_models

- name: Build C code in DEBUG mode
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
CFLAGS: -fdiagnostics-color=always

# To be added: Documentation building
Expand Down
4 changes: 0 additions & 4 deletions c_models/makefiles/Makefile.common

This file was deleted.

45 changes: 18 additions & 27 deletions c_models/makefiles/extra.mk
Original file line number Diff line number Diff line change
@@ -1,33 +1,24 @@
ifndef NEURAL_MODELLING_DIRS
$(error NEURAL_MODELLING_DIRS is not set. Please define NEURAL_MODELLING_DIRS (possibly by running "source setup" in the neural_modelling folder within the sPyNNaker source folder))
endif
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))))

# ----------------------------------------------------------------------
# Compute the absolute path to the directory containing this file.
#
EXTRA_MAKEFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
# Work out the top-level project folder
MAKEFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
EXTRA_MODELS_DIR := $(abspath $(dir $(MAKEFILE_PATH))/../../)/

# ----------------------------------------------------------------------
# Make sure that APP_OUTPUT_DIR points to where you want the .aplx files to go.
#
APP_OUTPUT_DIR := $(abspath $(dir $(EXTRA_MAKEFILE_PATH))../../python_models8/model_binaries/)
# This is where the building will happen
BUILD_DIR := $(EXTRA_MODELS_DIR)c_models/build/$(APP)/

# ----------------------------------------------------------------------
# Make sure EXTRA_SRC_DIR points to the source directory where your unmodified
# files are found.
#
EXTRA_SRC_DIR := $(abspath $(dir $(EXTRA_MAKEFILE_PATH))/../src/)
# This is where the output .aplx files will go
APP_OUTPUT_DIR := $(EXTRA_MODELS_DIR)python_models8/model_binaries/

# ----------------------------------------------------------------------
# Add EXTRA_SRC_DIR to the SOURCE_DIRS to ensure that it gets used correctly
SOURCE_DIRS += $(EXTRA_SRC_DIR)
CFLAGS += -I$(EXTRA_SRC_DIR)
# This is where the extra source files are located
EXTRA_SRC_DIR := $(EXTRA_MODELS_DIR)c_models/src

# ----------------------------------------------------------------------
# Make sure each neuron model has a unique build directory.
#
BUILD_DIR := $(abspath $(dir $(EXTRA_MAKEFILE_PATH))/../build/$(APP))/
# This location will be used to hold source files after log conversion
# which saves instruction space on the SpiNNaker machine
EXTRA_MODIFIED_DIR := $(EXTRA_MODELS_DIR)c_models/modified_src/

# ----------------------------------------------------------------------
# Import the main Makefile
include $(NEURAL_MODELLING_DIRS)/makefiles/neuron/neural_build.mk
# This simply maps the source directory to the modified source directory
SOURCE_DIRS += $(EXTRA_SRC_DIR):$(EXTRA_MODIFIED_DIR)

# Import the main neural build Makefile
include $(SPYNNAKER_INSTALL_DIR)/make/neural_build.mk
45 changes: 18 additions & 27 deletions c_models/makefiles/extra_neuron.mk
Original file line number Diff line number Diff line change
@@ -1,33 +1,24 @@
ifndef NEURAL_MODELLING_DIRS
$(error NEURAL_MODELLING_DIRS is not set. Please define NEURAL_MODELLING_DIRS (possibly by running "source setup" in the neural_modelling folder within the sPyNNaker source folder))
endif
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))))

# ----------------------------------------------------------------------
# Compute the absolute path to the directory containing this file.
#
EXTRA_MAKEFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
# Work out the top-level project folder
MAKEFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
EXTRA_MODELS_DIR := $(abspath $(dir $(MAKEFILE_PATH))/../../)/

# ----------------------------------------------------------------------
# Make sure that APP_OUTPUT_DIR points to where you want the .aplx files to go.
#
APP_OUTPUT_DIR := $(abspath $(dir $(EXTRA_MAKEFILE_PATH))../../python_models8/model_binaries/)
# This is where the building will happen
BUILD_DIR := $(EXTRA_MODELS_DIR)c_models/build/$(APP)/

# ----------------------------------------------------------------------
# Make sure EXTRA_SRC_DIR points to the source directory where your unmodified
# files are found.
#
EXTRA_SRC_DIR := $(abspath $(dir $(EXTRA_MAKEFILE_PATH))/../src/)
# This is where the output .aplx files will go
APP_OUTPUT_DIR := $(EXTRA_MODELS_DIR)python_models8/model_binaries/

# ----------------------------------------------------------------------
# Add EXTRA_SRC_DIR to the SOURCE_DIRS to ensure that it gets used correctly
SOURCE_DIRS += $(EXTRA_SRC_DIR)
CFLAGS += -I$(EXTRA_SRC_DIR)
# This is where the extra source files are located
EXTRA_SRC_DIR := $(EXTRA_MODELS_DIR)c_models/src

# ----------------------------------------------------------------------
# Make sure each neuron model has a unique build directory.
#
BUILD_DIR := $(abspath $(dir $(EXTRA_MAKEFILE_PATH))/../build/$(APP))/
# This location will be used to hold source files after log conversion
# which saves instruction space on the SpiNNaker machine
EXTRA_MODIFIED_DIR := $(EXTRA_MODELS_DIR)c_models/modified_src/

# ----------------------------------------------------------------------
# Import the main Makefile
include $(NEURAL_MODELLING_DIRS)/makefiles/neuron_only/neuron_build.mk
# This simply maps the source directory to the modified source directory
SOURCE_DIRS += $(EXTRA_SRC_DIR):$(EXTRA_MODIFIED_DIR)

# Import the main neural build Makefile
include $(SPYNNAKER_INSTALL_DIR)/make/neuron_only_build.mk
45 changes: 18 additions & 27 deletions c_models/makefiles/extra_synapse.mk
Original file line number Diff line number Diff line change
@@ -1,33 +1,24 @@
ifndef NEURAL_MODELLING_DIRS
$(error NEURAL_MODELLING_DIRS is not set. Please define NEURAL_MODELLING_DIRS (possibly by running "source setup" in the neural_modelling folder within the sPyNNaker source folder))
endif
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))))

# ----------------------------------------------------------------------
# Compute the absolute path to the directory containing this file.
#
EXTRA_MAKEFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
# Work out the top-level project folder
MAKEFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
EXTRA_MODELS_DIR := $(abspath $(dir $(MAKEFILE_PATH))/../../)/

# ----------------------------------------------------------------------
# Make sure that APP_OUTPUT_DIR points to where you want the .aplx files to go.
#
APP_OUTPUT_DIR := $(abspath $(dir $(EXTRA_MAKEFILE_PATH))../../python_models8/model_binaries/)
# This is where the building will happen
BUILD_DIR := $(EXTRA_MODELS_DIR)c_models/build/$(APP)/

# ----------------------------------------------------------------------
# Make sure EXTRA_SRC_DIR points to the source directory where your unmodified
# files are found.
#
EXTRA_SRC_DIR := $(abspath $(dir $(EXTRA_MAKEFILE_PATH))/../src/)
# This is where the output .aplx files will go
APP_OUTPUT_DIR := $(EXTRA_MODELS_DIR)python_models8/model_binaries/

# ----------------------------------------------------------------------
# Add EXTRA_SRC_DIR to the SOURCE_DIRS to ensure that it gets used correctly
SOURCE_DIRS += $(EXTRA_SRC_DIR)
CFLAGS += -I$(EXTRA_SRC_DIR)
# This is where the extra source files are located
EXTRA_SRC_DIR := $(EXTRA_MODELS_DIR)c_models/src

# ----------------------------------------------------------------------
# Make sure each neuron model has a unique build directory.
#
BUILD_DIR := $(abspath $(dir $(EXTRA_MAKEFILE_PATH))/../build/$(APP))/
# This location will be used to hold source files after log conversion
# which saves instruction space on the SpiNNaker machine
EXTRA_MODIFIED_DIR := $(EXTRA_MODELS_DIR)c_models/modified_src/

# ----------------------------------------------------------------------
# Import the main Makefile
include $(NEURAL_MODELLING_DIRS)/makefiles/synapse_only/synapse_build.mk
# This simply maps the source directory to the modified source directory
SOURCE_DIRS += $(EXTRA_SRC_DIR):$(EXTRA_MODIFIED_DIR)

# Import the main neural build Makefile
include $(SPYNNAKER_INSTALL_DIR)/make/synapse_build.mk
Loading