Skip to content

Commit

Permalink
Merge pull request #1192 from SpiNNakerManchester/use_build
Browse files Browse the repository at this point in the history
centralised github actions workflows
  • Loading branch information
rowleya authored Jun 4, 2024
2 parents 198e86e + 2461b42 commit 9015218
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 33 deletions.
56 changes: 24 additions & 32 deletions .github/workflows/c_actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,53 +23,36 @@ jobs:
timeout-minutes: 5

steps:
- name: "Prepare: Checkout"
uses: actions/checkout@v4
- name: "Prepare: Checkout SupportScripts"
uses: actions/checkout@v4
- name: Prepare
uses: SpiNNakerManchester/SupportScripts/actions/prepare@main
with:
repository: SpiNNakerManchester/SupportScripts
path: support
python-version: "3.12"
checkout_dependencies: spinnaker_tools spinn_common
install_dependencies: SpiNNUtils
install_module: false
install_check_tools: false
ubuntu_packages: doxygen gcc-arm-none-eabi

- name: "Prepare: Install Ubuntu dependencies"
uses: ./support/actions/apt-get-install
with:
packages: doxygen gcc-arm-none-eabi
- name: "Prepare: Set up Python 3.12"
# Note: Python is needed for spinn_utilities.make_tools when building
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: "Prepare: Set SPINN_DIRS"
- name: "Prepare: Set Environment variables"
run: |
echo "Set SPINN_DIRS to $PWD/spinnaker_tools"
echo "SPINN_DIRS=$PWD/spinnaker_tools" >> $GITHUB_ENV
- name: "Prepare: Checkout SpiNNaker C Dependencies"
uses: ./support/actions/install-spinn-deps
with:
repositories: spinnaker_tools spinn_common
install: false

- name: "Prepare: Install SpiNNUtils"
uses: ./support/actions/install-spinn-deps
with:
# Note: SpiNNUtils needed for spinn_utilities.make_tools
repositories: SpiNNUtils
install: true
echo "C_LOGS_DICT=$PWD/spinn_front_end_common/common_model_binaries/logs.sqlite3" >> $GITHUB_ENV
- name: "Check: Lint C lib code using Vera++"
uses: ./support/actions/vera
uses: SpiNNakerManchester/SupportScripts/actions/vera@main
with:
base-dir: c_common/front_end_common_lib

- name: "Check: Lint C binary code using Vera++"
uses: ./support/actions/vera
uses: SpiNNakerManchester/SupportScripts/actions/vera/@main
with:
base-dir: c_common/models

- name: "Prepare: Build Supporting C libraries"
run: |
make -C $SPINN_DIRS
make -C spinn_common install
- name: "Check: Build C code"
run: make
working-directory: c_common
Expand All @@ -78,4 +61,13 @@ jobs:

- name: "Check: Build documentation"
run: make doxysetup doxygen
working-directory: c_common
working-directory: c_common

- name: Upload binaries
uses: actions/upload-artifact@v4
with:
name: fec_binaries
path: |
spinn_front_end_common/common_model_binaries/*.aplx
spinn_front_end_common/common_model_binaries/logs.sqlite3
retention-days: 5
4 changes: 3 additions & 1 deletion .github/workflows/python_actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ jobs:
call:
uses: SpiNNakerManchester/SupportScripts/.github/workflows/python_checks.yml@main
with:
base-package: spinn_front_end_common
dependencies: SpiNNUtils SpiNNMachine SpiNNMan PACMAN spalloc
test_directories: unittests fec_integration_tests
coverage-package: spinn_front_end_common
flake8-packages: spinn_front_end_common unittests fec_integration_tests
pylint-packages: spinn_front_end_common
mypy-packages: spinn_front_end_common
check_prereleases: false
secrets: inherit
5 changes: 5 additions & 0 deletions spinn_front_end_common/interface/abstract_spinnaker_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,11 @@ def __init__(
self._data_writer.register_binary_search_path(
os.path.dirname(common_model_binaries.__file__))

external_binaries = get_config_str_or_none(
"Mapping", "external_binaries")
if external_binaries is not None:
self._data_writer.register_binary_search_path(external_binaries)

self._data_writer.set_machine_generator(self._get_machine)
FecTimer.end_category(TimerCategory.SETTING_UP)

Expand Down

0 comments on commit 9015218

Please sign in to comment.