From 6698b8b8ee52d6ae0e8c40ec63afe2584c2cee0e Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Tue, 27 Aug 2024 15:38:54 +0100 Subject: [PATCH 1/6] debug 1 run --- .../test_python_debug/check_debug.py | 30 ------------------- 1 file changed, 30 deletions(-) diff --git a/proxy_integration_tests/test_python_debug/check_debug.py b/proxy_integration_tests/test_python_debug/check_debug.py index 7977cbbf9f6..0feb5f279d7 100644 --- a/proxy_integration_tests/test_python_debug/check_debug.py +++ b/proxy_integration_tests/test_python_debug/check_debug.py @@ -113,35 +113,5 @@ def debug(self): sim.run(10) # second run pop.get_data("v") self.assertEqual(run0, SpynnakerDataView.get_run_dir_path()) - # No point in checking files they are already there - - sim.reset() # Soft - # check get works directly after a reset - pop.get_data("v") - sim.run(10) - found = os.listdir(SpynnakerDataView.get_run_dir_path()) - self.assertIn("data1.sqlite3", found) - self.assertNotIn("ds1.sqlite3", found) - - sim.reset() # soft with dsg - SpynnakerDataView.set_requires_data_generation() - sim.run(10) - pop.get_data("v") - self.assertEqual(run0, SpynnakerDataView.get_run_dir_path()) - found = os.listdir(run0) - self.assertIn("data2.sqlite3", found) - self.assertIn("ds2.sqlite3", found) - # No point in checking files they are already there - - sim.reset() # hard - SpynnakerDataView.set_requires_mapping() - sim.run(10) - pop.get_data("v") - self.assertNotEqual(run0, SpynnakerDataView.get_run_dir_path()) - found = os.listdir(SpynnakerDataView.get_run_dir_path()) - for report in reports: - self.assertIn(report, found) - self.assertIn("data3.sqlite3", found) - self.assertIn("ds3.sqlite3", found) sim.end() From 987b8c91dc02f26e3d77bb10c9e45b13fd773012 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Wed, 28 Aug 2024 09:46:52 +0100 Subject: [PATCH 2/6] move macos to seperate action --- .github/workflows/c_actions.yml | 3 +- .github/workflows/macos_actions.yml | 139 ++++++++++++++++++++++++++++ 2 files changed, 141 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/macos_actions.yml diff --git a/.github/workflows/c_actions.yml b/.github/workflows/c_actions.yml index 46226cd97e3..aaf24ccb7ad 100644 --- a/.github/workflows/c_actions.yml +++ b/.github/workflows/c_actions.yml @@ -96,7 +96,8 @@ jobs: timeout-minutes: 60 strategy: matrix: - runner: [ubuntu-latest, windows-latest, macos-latest] + #runner: [ubuntu-latest, windows-latest, macos-latest] + runner: [ubuntu-latest, windows-latest] steps: - name: Prepare diff --git a/.github/workflows/macos_actions.yml b/.github/workflows/macos_actions.yml new file mode 100644 index 00000000000..77780f59083 --- /dev/null +++ b/.github/workflows/macos_actions.yml @@ -0,0 +1,139 @@ +# Copyright (c) 2020 The University of Manchester +# +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# 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 + +name: C Actions +on: [push] +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - name: Prepare + uses: SpiNNakerManchester/SupportScripts/actions/prepare@main + with: + 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: Set environment variables + run: | + echo "SPINN_DIRS=$PWD/spinnaker_tools" >> $GITHUB_ENV + echo "NEURAL_MODELLING_DIRS=$PWD/neural_modelling" >> $GITHUB_ENV + echo "C_LOGS_DICT=$PWD/logs.sqlite3" >> $GITHUB_ENV + + - name: Lint C code using Vera++ + uses: SpiNNakerManchester/SupportScripts/actions/vera@main + with: + base-dir: neural_modelling/src + + - name: Build C dependencies + run: | + make -C $SPINN_DIRS + make -C spinn_common install + + - name: Build FEC C code + run: make + working-directory: SpiNNFrontEndCommon/c_common + env: + CFLAGS: -fdiagnostics-color=always + + - name: Build PYNN C code + run: make + working-directory: neural_modelling + env: + CFLAGS: -fdiagnostics-color=always + + - name: Build C code in DEBUG mode + run: make clean; make SPYNNAKER_DEBUG=DEBUG + working-directory: neural_modelling + env: + CFLAGS: -fdiagnostics-color=always + + - name: Build documentation using doxygen + run: make doxysetup doxygen + working-directory: neural_modelling + + - 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 + + - name: Upload PyNN binaries + uses: actions/upload-artifact@v4 + with: + name: pynn_binaries + path: spynnaker/pyNN/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 + + test: + needs: build + runs-on: macos-latest + timeout-minutes: 60 + steps: + - name: Prepare + uses: SpiNNakerManchester/SupportScripts/actions/prepare@main + with: + install_dependencies: > + SpiNNUtils SpiNNMachine SpiNNMan PACMAN spalloc + SpiNNFrontEndCommon TestBase + install_module: true + install_check_tools: false + ubuntu_packages: graphviz + cfg_file: spynnaker + + - 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 PyNN Binaries + uses: actions/download-artifact@v4 + with: + name: pynn_binaries + path: external_binaries + + - name: Download logs.sqlite3 + uses: actions/download-artifact@v4 + with: + name: logs.sqlite3 + path: external_binaries + + - name: Append cfg + # Doing this in the prepare action ended with a different path + run: | + echo '[Mapping]' >> ~/.spynnaker.cfg + echo "external_binaries=$PWD/external_binaries" >> ~/.spynnaker.cfg + cat ~/.spynnaker.cfg + + - name: Test with pytest and proxy + env: + SPALLOC_USER: ${{ secrets.SPALLOC_USER }} + SPALLOC_PASSWORD: ${{ secrets.SPALLOC_PASSWORD }} + run: pytest proxy_integration_tests From 5de8d7a6d75079b6599155a4dfe26dd3fbbf20a2 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Wed, 28 Aug 2024 09:57:35 +0100 Subject: [PATCH 3/6] simplify test to a single run --- proxy_integration_tests/test_python_debug/check_debug.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy_integration_tests/test_python_debug/check_debug.py b/proxy_integration_tests/test_python_debug/check_debug.py index 0feb5f279d7..f60f83bc670 100644 --- a/proxy_integration_tests/test_python_debug/check_debug.py +++ b/proxy_integration_tests/test_python_debug/check_debug.py @@ -114,4 +114,4 @@ def debug(self): pop.get_data("v") self.assertEqual(run0, SpynnakerDataView.get_run_dir_path()) - sim.end() + sim.end() \ No newline at end of file From 76e23727449170a80b2ea13d9796c1e62f5d03a5 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Wed, 28 Aug 2024 10:01:34 +0100 Subject: [PATCH 4/6] rename Action --- .github/workflows/macos_actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/macos_actions.yml b/.github/workflows/macos_actions.yml index 77780f59083..78d3dab66bb 100644 --- a/.github/workflows/macos_actions.yml +++ b/.github/workflows/macos_actions.yml @@ -15,7 +15,7 @@ # 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 -name: C Actions +name: Macos Actions on: [push] jobs: build: From df2ec65f8c28eafc3f48ac39bdbaa65f1a1ed26b Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Wed, 28 Aug 2024 10:02:20 +0100 Subject: [PATCH 5/6] flake8 --- proxy_integration_tests/test_python_debug/check_debug.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy_integration_tests/test_python_debug/check_debug.py b/proxy_integration_tests/test_python_debug/check_debug.py index f60f83bc670..0feb5f279d7 100644 --- a/proxy_integration_tests/test_python_debug/check_debug.py +++ b/proxy_integration_tests/test_python_debug/check_debug.py @@ -114,4 +114,4 @@ def debug(self): pop.get_data("v") self.assertEqual(run0, SpynnakerDataView.get_run_dir_path()) - sim.end() \ No newline at end of file + sim.end() From c7a04c8c94e6e63a6628725232cb4336c534a604 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Wed, 28 Aug 2024 12:07:43 +0100 Subject: [PATCH 6/6] remove seperate macos actions --- .github/workflows/macos_actions.yml | 139 ---------------------------- 1 file changed, 139 deletions(-) delete mode 100644 .github/workflows/macos_actions.yml diff --git a/.github/workflows/macos_actions.yml b/.github/workflows/macos_actions.yml deleted file mode 100644 index 78d3dab66bb..00000000000 --- a/.github/workflows/macos_actions.yml +++ /dev/null @@ -1,139 +0,0 @@ -# Copyright (c) 2020 The University of Manchester -# -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# 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 - -name: Macos Actions -on: [push] -jobs: - build: - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - name: Prepare - uses: SpiNNakerManchester/SupportScripts/actions/prepare@main - with: - 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: Set environment variables - run: | - echo "SPINN_DIRS=$PWD/spinnaker_tools" >> $GITHUB_ENV - echo "NEURAL_MODELLING_DIRS=$PWD/neural_modelling" >> $GITHUB_ENV - echo "C_LOGS_DICT=$PWD/logs.sqlite3" >> $GITHUB_ENV - - - name: Lint C code using Vera++ - uses: SpiNNakerManchester/SupportScripts/actions/vera@main - with: - base-dir: neural_modelling/src - - - name: Build C dependencies - run: | - make -C $SPINN_DIRS - make -C spinn_common install - - - name: Build FEC C code - run: make - working-directory: SpiNNFrontEndCommon/c_common - env: - CFLAGS: -fdiagnostics-color=always - - - name: Build PYNN C code - run: make - working-directory: neural_modelling - env: - CFLAGS: -fdiagnostics-color=always - - - name: Build C code in DEBUG mode - run: make clean; make SPYNNAKER_DEBUG=DEBUG - working-directory: neural_modelling - env: - CFLAGS: -fdiagnostics-color=always - - - name: Build documentation using doxygen - run: make doxysetup doxygen - working-directory: neural_modelling - - - 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 - - - name: Upload PyNN binaries - uses: actions/upload-artifact@v4 - with: - name: pynn_binaries - path: spynnaker/pyNN/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 - - test: - needs: build - runs-on: macos-latest - timeout-minutes: 60 - steps: - - name: Prepare - uses: SpiNNakerManchester/SupportScripts/actions/prepare@main - with: - install_dependencies: > - SpiNNUtils SpiNNMachine SpiNNMan PACMAN spalloc - SpiNNFrontEndCommon TestBase - install_module: true - install_check_tools: false - ubuntu_packages: graphviz - cfg_file: spynnaker - - - 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 PyNN Binaries - uses: actions/download-artifact@v4 - with: - name: pynn_binaries - path: external_binaries - - - name: Download logs.sqlite3 - uses: actions/download-artifact@v4 - with: - name: logs.sqlite3 - path: external_binaries - - - name: Append cfg - # Doing this in the prepare action ended with a different path - run: | - echo '[Mapping]' >> ~/.spynnaker.cfg - echo "external_binaries=$PWD/external_binaries" >> ~/.spynnaker.cfg - cat ~/.spynnaker.cfg - - - name: Test with pytest and proxy - env: - SPALLOC_USER: ${{ secrets.SPALLOC_USER }} - SPALLOC_PASSWORD: ${{ secrets.SPALLOC_PASSWORD }} - run: pytest proxy_integration_tests