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

Use build #67

Merged
merged 8 commits into from
Jun 4, 2024
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
41 changes: 11 additions & 30 deletions .github/workflows/c_actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,42 +20,23 @@ name: C Actions
on: [push]
jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- name: Install Ubuntu packages
run: sudo apt-get install doxygen gcc-arm-none-eabi --fix-missing
- name: Configure Python 3.12
# Note: Python is needed for spinn_utilities.make_tools when building
uses: actions/setup-python@v5
- name: Prepare
uses: SpiNNakerManchester/SupportScripts/actions/prepare@main
with:
python-version: 3.12

- name: Checkout
uses: actions/checkout@v4
- name: Checkout SupportScripts
uses: actions/checkout@v4
with:
repository: SpiNNakerManchester/SupportScripts
path: support

- name: Checkout Spinnaker Dependencies
uses: ./support/actions/install-spinn-deps
with:
# Note: SpiNNUtils needed for spinn_utilities.make_tools
repositories: >
spinnaker_tools spinn_common SpiNNFrontEndCommon

- name: "Prepare: Install SpiNNUtils"
uses: ./support/actions/install-spinn-deps
with:
# Note: SpiNNUtils needed for spinn_utilities.make_tools
repositories: SpiNNUtils
install: true
python-version: "3.12"
checkout_dependencies: spinnaker_tools spinn_common SpiNNFrontEndCommon
install_dependencies: SpiNNUtils
install_module: false
install_check_tools: false
ubuntu_packages: doxygen gcc-arm-none-eabi

- name: Lint C code using Vera++
# Note: run this before building to avoid linting modified_src directories
uses: ./support/actions/vera
uses: SpiNNakerManchester/SupportScripts/actions/vera@main
with:
base-dir: c_models

Expand Down
88 changes: 20 additions & 68 deletions .github/workflows/python_actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,73 +20,25 @@ name: Python Actions
on: [push]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Checkout
uses: actions/checkout@v4
- name: Checkout SupportScripts
uses: actions/checkout@v4
with:
repository: SpiNNakerManchester/SupportScripts
path: support
- name: Install pip, etc
uses: ./support/actions/python-tools
- name: Install mypy
run: pip install mypy

- name: Install Spinnaker Dependencies
uses: ./support/actions/install-spinn-deps
with:
repositories: >
call:
uses: SpiNNakerManchester/SupportScripts/.github/workflows/python_checks.yml@main
with:
dependencies: >
SpiNNUtils SpiNNMachine SpiNNMan PACMAN spalloc
SpiNNFrontEndCommon SpiNNakerGraphFrontEnd TestBase
install: true

- name: Setup
uses: ./support/actions/run-install

# # Add this when tests are built
- name: Create a configuration file
uses: ./support/actions/configure-spynnaker
with:
board-address: spinn-4.cs.man.ac.uk
- run: mv ~/.spynnaker.cfg ~/.spiNNakerGraphFrontEnd.cfg

- name: Test with pytest
uses: ./support/actions/pytest
with:
tests: unittests
coverage: ${{ matrix.python-version == 3.12 }}
cover-packages: ${{ env.CODE_PATHS }}
coveralls-token: ${{ secrets.COVERALLS_REPO_TOKEN }}

- name: Lint with flake8
run: flake8 mcmc mcmc_examples
- name: Lint with pylint
uses: ./support/actions/pylint
with:
package: mcmc mcmc_examples
exitcheck: 39

- name: Run rat copyright enforcement
if: matrix.python-version == 3.12
uses: ./support/actions/check-copyrights

- name: Lint with mypy
run: mypy mcmc

# # Add the following as required in the future
# - name: Validate XML
# if: matrix.python-version == 3.8
# uses: ./support/actions/validate-xml
# with:
# base-path: mcmc mcmc_examples

ubuntu_packages: graphviz
test_directories: unittests
coverage-package: mcmc
flake8-packages: mcmc mcmc_examples
pylint-packages: mcmc mcmc_examples
mypy-packages: mcmc
check_prereleases: false
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