Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gloabl actions #68

Open
wants to merge 38 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
6f20edf
use global check_prereleases
Christian-B Jun 6, 2024
b9f6442
apachee copy right and strickter pylint checks
Christian-B Jun 6, 2024
7c8a3e0
remove no longer used pylint rc file
Christian-B Jun 6, 2024
846c280
Apache copyright
Christian-B Jun 6, 2024
0cfb8d4
# pylint: disable=wrong-spelling-in-comment
Christian-B Jun 6, 2024
b707a7f
pylint-disable: R, wrong-spelling-in-docstring, invalid-name
Christian-B Jun 6, 2024
e14d338
remove disable
Christian-B Jun 6, 2024
bb674fc
f string
Christian-B Jun 6, 2024
6d7c16a
pylint fixes
Christian-B Jun 10, 2024
ac9c5c5
flake8 fixes
Christian-B Jun 10, 2024
1921ccb
PyLint fixes
Christian-B Jun 11, 2024
7a1a6d7
flake8
Christian-B Jun 11, 2024
953964a
pylint fixes
Christian-B Jun 11, 2024
ea6c6a0
flake8
Christian-B Jun 11, 2024
d07d868
pylint fixes
Christian-B Jun 11, 2024
f3f1fed
move imports
Christian-B Jun 11, 2024
6076d85
typing
Christian-B Jun 11, 2024
2e7c676
typing
Christian-B Jun 11, 2024
fdd95a5
typing
Christian-B Jun 11, 2024
a362ea0
mypy examples
Christian-B Jun 13, 2024
5be1595
# type: ignore
Christian-B Jun 13, 2024
d3527dd
merged in master
Christian-B Jun 17, 2024
788f7dd
flake8
Christian-B Jul 2, 2024
28d065c
default python version for c actions
Christian-B Jul 4, 2024
7177590
actually run the code
Christian-B Jul 4, 2024
6a43470
fix if running as a test
Christian-B Jul 4, 2024
0e75bfe
run longer
Christian-B Jul 4, 2024
6ab5c01
remove cfg files. Use the users ones
Christian-B Jul 4, 2024
073e215
remove timeout
Christian-B Jul 4, 2024
ae8bcb7
Path that works in windows
Christian-B Jul 8, 2024
a9dfef6
use Java
Christian-B Jul 8, 2024
a5343f3
java-version: 11
Christian-B Jul 8, 2024
0b9be16
fix java_jar_path
Christian-B Jul 8, 2024
3238894
fix java_jar_path again
Christian-B Jul 8, 2024
f23d1fa
fix path for windows
Christian-B Jul 8, 2024
65cc587
enable_advanced_monitor_support = False
Christian-B Jul 8, 2024
d893113
do not repeat [Machine]
Christian-B Jul 8, 2024
fe8e8c9
use_java = False
Christian-B Jul 8, 2024
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
157 changes: 139 additions & 18 deletions .github/workflows/c_actions.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
# Copyright (c) 2020 The University of Manchester
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# https://www.apache.org/licenses/LICENSE-2.0
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# This workflow will install Python dependencies, run tests, lint and rat with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
Expand All @@ -27,7 +26,6 @@ jobs:
- name: Prepare
uses: SpiNNakerManchester/SupportScripts/actions/prepare@main
with:
python-version: "3.12"
checkout_dependencies: spinnaker_tools spinn_common SpiNNFrontEndCommon
install_dependencies: SpiNNUtils
install_module: false
Expand All @@ -40,26 +38,149 @@ jobs:
with:
base-dir: c_models

- name: 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
echo "C_LOGS_DICT=$PWD/logs.sqlite3" >> $GITHUB_ENV

- name: Build SpiNNaker C dependencies
run: |
make -C $SPINN_DIRS
make -C spinn_common install
make -C SpiNNFrontEndCommon/c_common install

- name: Build FEC C code
run: make
working-directory: SpiNNFrontEndCommon/c_common
env:
CFLAGS: -fdiagnostics-color=always

- name: Build C code
run: make
working-directory: c_models
env:
CFLAGS: -fdiagnostics-color=always

# To be added: Documentation building
# - name: Build documentation using doxygen
# run: make doxysetup doxygen
# working-directory: c_models
- name: Upload Fec binaries
uses: actions/upload-artifact@v4
with:
name: fec_binaries
path: SpiNNFrontEndCommon/spinn_front_end_common/common_model_binaries/*.aplx
retention-days: 5

# Note: This workflow does not run the C code; that'd be an integration test
- name: Upload mcmc binaries
uses: actions/upload-artifact@v4
with:
name: mcmc_binary
path: mcmc/model_binaries/*.aplx
retention-days: 5

- name: Upload log.sqlite3s
uses: actions/upload-artifact@v4
with:
name: logs.sqlite3
path: logs.sqlite3
retention-days: 5

java_compile:
runs-on: ubuntu-latest
timeout-minutes: 100
steps:
- name: Prepare
uses: SpiNNakerManchester/SupportScripts/actions/prepare@main
with:
checkout_dependencies: JavaSpiNNaker
install_module: false
install_check_tools: false
- name: Set up JRE ${{ matrix.java }}
uses: actions/setup-java@v4.2.1
with:
distribution: 'zulu'
java-version: 11
cache: 'maven'
- name: "Set up node cache"
uses: actions/cache@v4
with:
path: '~/.m2/repository/com/github/eirslett/node'
key: ${{ runner.os }}-node-${{ hashFiles('SpiNNaker-allocserv/pom.xml') }}
restore-keys: ${{ runner.os }}-node-

- name: Compile
run: mvn clean install --file ./JavaSpiNNaker/pom.xml --settings ./JavaSpiNNaker/.github/settings.xml -B -DskipTests=true -Dmaven.javadoc.skip=true -P "!jsp-precompile"

- name: Upload Jar
uses: actions/upload-artifact@v4
with:
name: spinnaker-exe.jar
path: ./JavaSpiNNaker/SpiNNaker-front-end/target/spinnaker-exe.jar
retention-days: 5

test:
needs: [build, java_compile]
runs-on: ${{ matrix.runner }}
strategy:
matrix:
runner: [ubuntu-latest, windows-latest, macos-latest]

steps:
- name: Prepare
uses: SpiNNakerManchester/SupportScripts/actions/prepare@main
with:
install_dependencies: >
SpiNNUtils SpiNNMachine SpiNNMan PACMAN spalloc
SpiNNFrontEndCommon TestBase SpiNNakerGraphFrontEnd
install_module: true
install_check_tools: false
ubuntu_packages: graphviz
cfg_file: spiNNakerGraphFrontEnd

- name: Set up JRE ${{ matrix.java }}
uses: actions/setup-java@v4.2.1
with:
distribution: 'zulu'
java-version: 11
java-package: jre

- name: Download Fec binaries
uses: actions/download-artifact@v4
with:
name: fec_binaries
# Need to go into spynnaker as FEC will have been moved by install
path: external_binaries

- name: Download test_extra_monitor_binary Binaries
uses: actions/download-artifact@v4
with:
name: mcmc_binary
path: external_binaries

- name: Download logs.sqlite3
uses: actions/download-artifact@v4
with:
name: logs.sqlite3
path: external_binaries

- name: Download jar
uses: actions/download-artifact@v4
with:
name: spinnaker-exe.jar
# Need to go into spynnaker as FEC will have been moved by install
path: external_binaries

- name: Append cfg
# Doing this in the prepare action ended with a different path
# assumes cfg so far already has and ends with Machine section
run: |
echo 'enable_advanced_monitor_support = False' >> ~/.spiNNakerGraphFrontEnd.cfg
echo '[Mapping]' >> ~/.spiNNakerGraphFrontEnd.cfg
echo "external_binaries=$PWD/external_binaries" >> ~/.spiNNakerGraphFrontEnd.cfg
echo '[Java]' >> ~/.spiNNakerGraphFrontEnd.cfg
echo 'use_java = False' >> ~/.spiNNakerGraphFrontEnd.cfg
echo "java_jar_path=$PWD/external_binaries/spinnaker-exe.jar" >> ~/.spiNNakerGraphFrontEnd.cfg
cat ~/.spiNNakerGraphFrontEnd.cfg

- name: Test with pytest and proxy
env:
SPALLOC_USER: ${{ secrets.SPALLOC_USER }}
SPALLOC_PASSWORD: ${{ secrets.SPALLOC_PASSWORD }}
run: pytest mcmc_integration_tests/test_scripts.py
31 changes: 13 additions & 18 deletions .github/workflows/python_actions.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
# Copyright (c) 2020 The University of Manchester
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# https://www.apache.org/licenses/LICENSE-2.0
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# This workflow will install Python dependencies, run tests, lint and rat with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
Expand All @@ -31,14 +30,10 @@ jobs:
coverage-package: mcmc
flake8-packages: mcmc mcmc_examples
pylint-packages: mcmc mcmc_examples
mypy-packages: mcmc
check_prereleases: false
# invalid-name because scripts have values pylint considers constants
# wrong-spelling-in-docstring due to param names ect
pylint-disable: R, wrong-spelling-in-docstring, invalid-name
mypy-packages: mcmc mcmc_examples
cfg_file: spiNNakerGraphFrontEnd
rat_config_file: rat.xml # mix of licenses acceptable to rat
rcfile: global_relaxed
pylint_exitcheck: 6 # Action fails on ERROR or WARNING
run_sphinx: false
run_cff-validator: false

# pylint mcmc mcmc_examples
# mypy mypy mcmc
14 changes: 0 additions & 14 deletions .pylintrc

This file was deleted.

19 changes: 9 additions & 10 deletions c_models/Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
# Copyright (c) 2016 The University of Manchester
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# https://www.apache.org/licenses/LICENSE-2.0
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

DIRS = mcmc_models mcmc_coordinator mcmc_root_finder mcmc_cholesky

Expand Down
22 changes: 9 additions & 13 deletions c_models/mcmc_cholesky/Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
# Copyright (c) 2016 The University of Manchester
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# https://www.apache.org/licenses/LICENSE-2.0
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

# An example Makefile suitable for use in SpiNNaker applications using the
# spinnaker_tools libraries and makefiles.
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# The name of the application to be built (binary will be this with a `.aplx`
# extension)
Expand Down
18 changes: 9 additions & 9 deletions c_models/mcmc_cholesky/src/mcmc_cholesky.c
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
/*
* Copyright (c) 2016 The University of Manchester
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* https://www.apache.org/licenses/LICENSE-2.0
*
* You should have received a copy of the GNU General Public License
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "mcmc_cholesky.h"
Expand Down
18 changes: 9 additions & 9 deletions c_models/mcmc_cholesky/src/mcmc_cholesky.h
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
/*
* Copyright (c) 2016 The University of Manchester
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* https://www.apache.org/licenses/LICENSE-2.0
*
* You should have received a copy of the GNU General Public License
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include <arma.h>
Expand Down
22 changes: 9 additions & 13 deletions c_models/mcmc_coordinator/Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
# Copyright (c) 2016 The University of Manchester
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# https://www.apache.org/licenses/LICENSE-2.0
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

# An example Makefile suitable for use in SpiNNaker applications using the
# spinnaker_tools libraries and makefiles.
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# The name of the application to be built (binary will be this with a `.aplx`
# extension)
Expand Down
Loading