Skip to content

Commit 3fdcaf9

Browse files
authored
Merge pull request #919 from SpiNNakerManchester/c_actions
Add C actions
2 parents 76b5e7e + aa7c19f commit 3fdcaf9

1 file changed

Lines changed: 85 additions & 0 deletions

File tree

.github/workflows/c_actions.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Copyright (c) 2020 The University of Manchester
2+
#
3+
# This program is free software: you can redistribute it and/or modify
4+
# it under the terms of the GNU General Public License as published by
5+
# the Free Software Foundation, either version 3 of the License, or
6+
# (at your option) any later version.
7+
#
8+
# This program is distributed in the hope that it will be useful,
9+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
# GNU General Public License for more details.
12+
#
13+
# You should have received a copy of the GNU General Public License
14+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
15+
16+
# This workflow will install Python dependencies, run tests, lint and rat with a variety of Python versions
17+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
18+
19+
name: C Actions
20+
21+
on: [push]
22+
23+
jobs:
24+
build:
25+
runs-on: ubuntu-20.04
26+
27+
steps:
28+
- name: Install Ubuntu dependencies
29+
run: |
30+
sudo apt-get update
31+
sudo apt-get install vera++ doxygen gcc-arm-none-eabi --fix-missing
32+
33+
- name: Set up Python 3.6
34+
# Note: Python is needed for spinn_utilities.make_tools when building
35+
uses: actions/setup-python@v2
36+
with:
37+
python-version: 3.6
38+
39+
- name: Checkout
40+
uses: actions/checkout@v2
41+
42+
- name: Checkout SupportScripts
43+
uses: actions/checkout@v2
44+
with:
45+
repository: SpiNNakerManchester/SupportScripts
46+
path: support
47+
48+
- name: Checkout SpiNNaker Dependencies
49+
run: |
50+
support/gitclone2.sh https://github.com/SpiNNakerManchester/spinnaker_tools.git
51+
support/gitclone2.sh https://github.com/SpiNNakerManchester/spinn_common.git
52+
support/gitclone2.sh https://github.com/SpiNNakerManchester/SpiNNFrontEndCommon.git
53+
# Note: SpiNNUtils needed for spinn_utilities.make_tools
54+
support/gitclone2.sh https://github.com/SpiNNakerManchester/SpiNNUtils.git
55+
56+
- name: Set SPINN_DIRS and NEURAL_MODELLING
57+
run: |
58+
echo "Set SPINN_DIRS to $PWD/spinnaker_tools"
59+
echo "SPINN_DIRS=$PWD/spinnaker_tools" >> $GITHUB_ENV
60+
echo "Set NEURAL_MODELLING to $PWD/neural_modelling"
61+
echo "NEURAL_MODELLING_DIRS=$PWD/neural_modelling" >> $GITHUB_ENV
62+
63+
- name: Install SpiNNUtils
64+
run: python setup.py install
65+
working-directory: SpiNNUtils
66+
67+
- name: Lint C code using Vera++
68+
# Note: run this before building to avoid linting modified_src directories
69+
run: support/run-vera.sh neural_modelling/src
70+
71+
- name: Build C dependencies
72+
run: |
73+
make -C $SPINN_DIRS
74+
make -C spinn_common install
75+
make -C SpiNNFrontEndCommon/c_common install
76+
77+
- name: Build C code
78+
run: make
79+
working-directory: neural_modelling
80+
env:
81+
CFLAGS: -fdiagnostics-color=always
82+
83+
- name: Build documentation using doxygen
84+
run: make doxysetup doxygen
85+
working-directory: neural_modelling

0 commit comments

Comments
 (0)