From 8decea968b7c8debcccc4714c18ce5326d912adc Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Mon, 17 Jul 2023 15:56:58 +0100 Subject: [PATCH 1/7] install from testpyi -pre --- Jenkinsfile | 34 ++++++++++++---------------------- 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 825c129..6899fd7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -32,7 +32,6 @@ pipeline { sh 'echo "Job name is $THE_JOB (from $JOB_NAME)"' sh 'rm -rf ${WORKSPACE}/*' sh 'rm -rf ${WORKSPACE}/.[a-zA-Z0-9]*' - sh 'mkdir ${WORKSPACE}/global_reports' dir('IntegrationTests') { checkout scm } @@ -87,8 +86,11 @@ pipeline { run_in_pyenv('pip3 install --upgrade "setuptools<59.8" wheel') run_in_pyenv('pip install --upgrade pip') - // Install SpiNNUtils first as needed for C build - run_in_pyenv('pip install ./SpiNNUtils[test]') + // Python install from testpypi + run_in_pyenv('pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ sPyNNaker --pre') + run_in_pyenv('pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ SpiNNakerGraphFrontEnd --pre') + run_in_pyenv('pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ SpiNNakerTestBase --pre') + // C Build next as builds files to be installed in Python run_in_pyenv('make -C $SPINN_DIRS') run_in_pyenv('make -C spinn_common install') @@ -102,22 +104,17 @@ pipeline { run_in_pyenv('make -C MarkovChainMonteCarlo/c_models') run_in_pyenv('make -C SpiNNaker_PDP2/c_code') run_in_pyenv('make -C Visualiser') - // Python install - run_in_pyenv('pip install ./SpiNNMachine[test]') - run_in_pyenv('pip install ./SpiNNMan[test]') - run_in_pyenv('pip install ./PACMAN[test]') - run_in_pyenv('pip install ./spalloc[test]') - run_in_pyenv('pip install ./SpiNNFrontEndCommon[test]') - run_in_pyenv('pip install ./TestBase[test]') - run_in_pyenv('pip install ./sPyNNaker[test]') + + // Python install not on testpypi run_in_pyenv('pip install ./sPyNNaker8NewModelTemplate[test]') - run_in_pyenv('pip install ./SpiNNakerGraphFrontEnd[test]') run_in_pyenv('pip install ./SpiNNGym[test]') run_in_pyenv('pip install ./MarkovChainMonteCarlo[test]') // Due to the binaries being outside of the package run_in_pyenv('pip install -e ./SpiNNaker_PDP2[test]') run_in_pyenv('pip install ./Visualiser[test]') run_in_pyenv('python -m spynnaker.pyNN.setup_pynn') + // Stuff normally installed by [test] installs + run_in_pyenv('pip install pytest-cov testfixtures "httpretty != 1.0.0" pylint testfixtures mock graphviz') // Additional requirements for testing here // coverage version capped due to https://github.com/nedbat/coveragepy/issues/883 run_in_pyenv('pip install python-coveralls "coverage>=5.0.0" pytest-instafail pytest-xdist pytest-progress pytest-forked pytest-timeout') @@ -130,28 +127,20 @@ pipeline { steps { sh 'rm -r spinn_common' sh 'rm -r SpiNNUtils/spinn_utilities' - sh 'rm -r SpiNNUtils/build' sh 'rm -r SpiNNMachine/spinn_machine' - sh 'rm -r SpiNNMachine/build' sh 'rm -r SpiNNMan/spinnman' - sh 'rm -r SpiNNMan/build' sh 'rm -r PACMAN/pacman' sh 'rm -r PACMAN/pacman_test_objects' - sh 'rm -r PACMAN/build' + sh 'rm -r DataSpecification/data_specification' sh 'rm -r spalloc/spalloc_client' - sh 'rm -r spalloc/build' sh 'rm -r SpiNNFrontEndCommon/spinn_front_end_common' sh 'rm -r SpiNNFrontEndCommon/c_common' - sh 'rm -r SpiNNFrontEndCommon/build' sh 'rm -r TestBase/spinnaker_testbase' - sh 'rm -r TestBase/build' sh 'rm -r sPyNNaker/spynnaker' sh 'rm -r sPyNNaker/neural_modelling' - sh 'rm -r sPyNNaker/build' sh 'rm -r sPyNNaker8NewModelTemplate/python_models8' sh 'rm -r sPyNNaker8NewModelTemplate/build' sh 'rm -r SpiNNakerGraphFrontEnd/spinnaker_graph_front_end' - sh 'rm -r SpiNNakerGraphFrontEnd/build' sh 'rm -r SpiNNGym/spinn_gym' sh 'rm -r SpiNNGym/c_code' sh 'rm -r SpiNNGym/build' @@ -185,6 +174,7 @@ pipeline { run_pytest('SpiNNMan/unittests', 1200, 'SpiNNMan', 'unit', 'auto') run_pytest('PACMAN/unittests', 1200, 'PACMAN', 'unit', 'auto') run_pytest('spalloc/tests', 1200, 'spalloc', 'unit', '1') + run_pytest('DataSpecification/unittests', 1200, 'DataSpecification', 'unit', 'auto') run_pytest('SpiNNFrontEndCommon/unittests SpiNNFrontEndCommon/fec_integration_tests', 1200, 'SpiNNFrontEndCommon', 'unit', 'auto') run_pytest('sPyNNaker/unittests', 1200, 'sPyNNaker', 'unit', 'auto') run_pytest('SpiNNakerGraphFrontEnd/unittests', 1200, 'SpiNNakerGraphFrontEnd', 'unit', 'auto') @@ -295,8 +285,8 @@ pipeline { } stage('Reports') { steps { + sh 'find . -maxdepth 3 -type f -wholename "*/global_reports/*" -print -exec cat \\{\\} \\;' run_in_pyenv('python -m spinn_utilities.executable_finder') - sh 'find ${WORKSPACE}/global_reports -print -exec cat \\{\\} \\;' } } stage('Check Destroyed') { From 061872bb9556abb29fba868282dd8e9f3499b349 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Tue, 18 Jul 2023 12:40:23 +0100 Subject: [PATCH 2/7] remove DataSpecification --- Jenkinsfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6899fd7..c12c4f3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -131,7 +131,6 @@ pipeline { sh 'rm -r SpiNNMan/spinnman' sh 'rm -r PACMAN/pacman' sh 'rm -r PACMAN/pacman_test_objects' - sh 'rm -r DataSpecification/data_specification' sh 'rm -r spalloc/spalloc_client' sh 'rm -r SpiNNFrontEndCommon/spinn_front_end_common' sh 'rm -r SpiNNFrontEndCommon/c_common' @@ -174,7 +173,6 @@ pipeline { run_pytest('SpiNNMan/unittests', 1200, 'SpiNNMan', 'unit', 'auto') run_pytest('PACMAN/unittests', 1200, 'PACMAN', 'unit', 'auto') run_pytest('spalloc/tests', 1200, 'spalloc', 'unit', '1') - run_pytest('DataSpecification/unittests', 1200, 'DataSpecification', 'unit', 'auto') run_pytest('SpiNNFrontEndCommon/unittests SpiNNFrontEndCommon/fec_integration_tests', 1200, 'SpiNNFrontEndCommon', 'unit', 'auto') run_pytest('sPyNNaker/unittests', 1200, 'sPyNNaker', 'unit', 'auto') run_pytest('SpiNNakerGraphFrontEnd/unittests', 1200, 'SpiNNakerGraphFrontEnd', 'unit', 'auto') From 5d8159966731a0a4df565769f11769caa9f5b1d2 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Tue, 18 Jul 2023 12:42:49 +0100 Subject: [PATCH 3/7] remove more DataSpecification --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index c12c4f3..fef7f9f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -325,7 +325,7 @@ def run_pytest(String tests, int timeout, String results, String covfile, String run_in_pyenv('py.test ' + tests + ' -rs -n ' + threads + ' --forked --show-progress --cov-config=.coveragerc --cov-branch ' + '--cov spynnaker8 --cov spynnaker --cov spinn_front_end_common --cov pacman ' + - '--cov data_specification --cov spinnman --cov spinn_machine --cov spalloc ' + + '--cov spinnman --cov spinn_machine --cov spalloc ' + '--cov spinn_utilities --cov spinnaker_graph_front_end ' + '--junitxml ' + resfile + ' --cov-report xml:' + covfile + ' --cov-append ' + '--timeout ' + timeout + ' --log-level=INFO ') From c1cfd344e7a2992f1c9ab9690f01d535489c652b Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Mon, 12 Aug 2024 15:44:02 +0100 Subject: [PATCH 4/7] dont do make --- Jenkinsfile | 136 +--------------------------------------------------- 1 file changed, 1 insertion(+), 135 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 73211d7..1e514f0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -67,14 +67,7 @@ pipeline { sh 'support/gitclone.sh https://github.com/SpiNNakerManchester/JavaSpiNNaker' // scripts sh 'support/gitclone.sh https://github.com/SpiNNakerManchester/PyNNExamples.git' - sh 'support/gitclone.sh https://github.com/SpiNNakerManchester/sPyNNakerNewModelTemplate.git' sh 'support/gitclone.sh https://github.com/SpiNNakerManchester/microcircuit_model.git' - sh 'support/gitclone.sh https://github.com/SpiNNakerManchester/SpiNNGym.git' - sh 'support/gitclone.sh https://github.com/SpiNNakerManchester/MarkovChainMonteCarlo.git' - sh 'support/gitclone.sh https://github.com/SpiNNakerManchester/TestBase.git' - sh 'support/gitclone.sh https://github.com/SpiNNakerManchester/SpiNNaker_PDP2.git' - sh 'support/gitclone.sh https://github.com/SpiNNakerManchester/SpiNNakerJupyterExamples.git' - sh 'support/gitclone.sh https://$GITHUB_TOKEN@github.com/SpiNNakerManchester/TSPonSpiNNaker.git' } } stage('Install') { @@ -93,39 +86,6 @@ pipeline { run_in_pyenv('pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ SpiNNakerGraphFrontEnd --pre') run_in_pyenv('pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ SpiNNakerTestBase --pre') - // C Build next as builds files to be installed in Python - run_in_pyenv('make -C $SPINN_DIRS') - run_in_pyenv('make -C spinn_common install') - run_in_pyenv('make -C SpiNNFrontEndCommon/c_common') - run_in_pyenv('make -C SpiNNFrontEndCommon/c_common install') - run_in_pyenv('make -C sPyNNaker/neural_modelling') - run_in_pyenv('make -C sPyNNakerNewModelTemplate/c_models') - run_in_pyenv('make -C SpiNNakerGraphFrontEnd/gfe_examples') - run_in_pyenv('make -C SpiNNakerGraphFrontEnd/gfe_integration_tests/') - run_in_pyenv('make -C SpiNNGym/c_code') - run_in_pyenv('make -C MarkovChainMonteCarlo/c_models') - run_in_pyenv('make -C SpiNNaker_PDP2/c_code') - run_in_pyenv('make -C Visualiser') - - // Python install not on testpypi - run_in_pyenv('make -C TSPonSpiNNaker/spinnaker_c') - // Python install - run_in_pyenv('pip install ./SpiNNMachine[test]') - run_in_pyenv('pip install ./SpiNNMan[test]') - run_in_pyenv('pip install ./PACMAN[test]') - run_in_pyenv('pip install ./spalloc[test]') - run_in_pyenv('pip install ./SpiNNFrontEndCommon[test]') - run_in_pyenv('pip install ./TestBase[test]') - run_in_pyenv('pip install ./sPyNNaker[test]') - run_in_pyenv('pip install ./sPyNNakerNewModelTemplate[test]') - run_in_pyenv('pip install ./SpiNNakerGraphFrontEnd[test]') - run_in_pyenv('pip install ./SpiNNGym[test]') - run_in_pyenv('pip install ./MarkovChainMonteCarlo[test]') - // Due to the binaries being outside of the package - run_in_pyenv('pip install -e ./SpiNNaker_PDP2[test]') - run_in_pyenv('pip install ./Visualiser[test]') - run_in_pyenv('pip install ./TSPonSpiNNaker[test]') - // no install SpiNNakerJupyterExamples run_in_pyenv('python -m spynnaker.pyNN.setup_pynn') // Stuff normally installed by [test] installs run_in_pyenv('pip install pytest-cov testfixtures "httpretty != 1.0.0" pylint testfixtures mock graphviz') @@ -151,23 +111,9 @@ pipeline { sh 'rm -r TestBase/spinnaker_testbase' sh 'rm -r sPyNNaker/spynnaker' sh 'rm -r sPyNNaker/neural_modelling' - sh 'rm -r sPyNNaker/build' sh 'rm -r sPyNNakerNewModelTemplate/python_models8' - sh 'rm -r sPyNNakerNewModelTemplate/build' sh 'rm -r SpiNNakerGraphFrontEnd/spinnaker_graph_front_end' - sh 'rm -r SpiNNGym/spinn_gym' - sh 'rm -r SpiNNGym/c_code' - sh 'rm -r SpiNNGym/build' - sh 'rm -r MarkovChainMonteCarlo/mcmc' - sh 'rm -r MarkovChainMonteCarlo/build' - // Due to the binaries being outside of the package - //NO remove SpiNNaker_PDP2 - sh 'rm -r Visualiser/visualiser_example_binaries' - sh 'rm -r Visualiser/build' - // No remove SpiNNakerJupyterExamples - sh 'rm -r TSPonSpiNNaker/spinnaker_c' - sh 'rm -r TSPonSpiNNaker/build' - } + } } stage('Before Script') { steps { @@ -195,12 +141,7 @@ pipeline { run_pytest('sPyNNaker/unittests', 1200, 'sPyNNaker', 'unit', 'auto') run_pytest('SpiNNakerGraphFrontEnd/unittests', 1200, 'SpiNNakerGraphFrontEnd', 'unit', 'auto') run_pytest('PyNNExamples/unittests', 1200, 'PyNNExamples', 'unit', 'auto') - run_pytest('SpiNNGym/unittests', 1200, 'SpiNNGym', 'unit', 'auto') - run_pytest('MarkovChainMonteCarlo/unittests', 1200, 'MarkovChainMonteCarlo', 'unit', 'auto') - run_pytest('SpiNNaker_PDP2/unittests', 1200, 'SpiNNaker_PDP2', 'unit', 'auto') - run_pytest('TSPonSpiNNaker/unittests', 1200, 'TSPonSpiNNaker', 'unit', 'auto') run_in_pyenv('python -m spinn_utilities.executable_finder') - // no SpiNNakerJupyterExamples } } stage('Run sPyNNaker Integration Tests') { @@ -229,15 +170,6 @@ pipeline { } } } - stage('Run sPyNNakerNewModelTemplate Integration Tests') { - steps { - catchError(stageResult: 'FAILURE', catchInterruptions: false) { - create_spynnaker_config() - run_in_pyenv('python sPyNNakerNewModelTemplate/nmt_integration_tests/script_builder.py') - run_pytest('sPyNNakerNewModelTemplate/nmt_integration_tests', 3600, 'sPyNNakerNewModelTemplate_Integration', 'integration', 'auto') - } - } - } stage('Run microcircuit_model Integration Tests') { steps { catchError(stageResult: 'FAILURE', catchInterruptions: false) { @@ -246,72 +178,6 @@ pipeline { } } } - stage('Run SpiNNGym Integration Tests') { - steps { - catchError(stageResult: 'FAILURE', catchInterruptions: false) { - create_spynnaker_config() - run_in_pyenv('python SpiNNGym/integration_tests/script_builder.py') - run_pytest('SpiNNGym/integration_tests', 3600, 'SpiNNGym_Integration', 'integration', 'auto') - } - } - } - stage('Run MarkovChainMonteCarlo Integration Tests') { - steps { - catchError(stageResult: 'FAILURE', catchInterruptions: false) { - create_gfe_config() - run_in_pyenv('python MarkovChainMonteCarlo/mcmc_integration_tests/script_builder.py') - run_pytest('MarkovChainMonteCarlo/mcmc_integration_tests', 3600, 'MarkovChainMonteCarlo_Integration', 'integration', 'auto') - } - } - } - stage('Run SpiNNaker_PDP2 Integration Tests') { - steps { - catchError(stageResult: 'FAILURE', catchInterruptions: false) { - create_gfe_config() - run_in_pyenv('python SpiNNaker_PDP2/integration_tests/script_builder.py') - run_pytest('SpiNNaker_PDP2/integration_tests', 3600, 'SpiNNaker_PDP2_Integration', 'integration', 'auto') - } - } - } - stage('Run Visualiser Integration Tests') { - steps { - catchError(stageResult: 'FAILURE', catchInterruptions: false) { - create_spynnaker_config() - run_pytest('Visualiser/visualiser_integration_tests', 12000, 'visualiser_Integration', 'integration', 'auto') - } - } - } - stage("SpiNNakerJupyterExamples") { - steps { - create_spynnaker_config() - run_in_pyenv("pytest -n auto --nbmake SpiNNakerJupyterExamples/**/*.ipynb SpiNNakerJupyterExamples/**/**/*.ipynb") - } - } - stage('Run TSPonSpiNNaker Integration Tests') { - steps { - catchError(stageResult: 'FAILURE', catchInterruptions: false) { - create_gfe_config() - run_in_pyenv('python TSPonSpiNNaker/integration_tests/script_builder.py') - run_pytest('TSPonSpiNNaker/integration_tests', 3600, 'TSPonSpiNNaker', 'integration', 'auto') - } - } - } - /* - stage('Run Whole Machine Tests') { - when { - environment name: 'THE_JOB', value: 'Integration_Tests_Cron_Job' - } - environment { - SPALLOC_PASSWORD = credentials('spalloc-password') - } - steps { - catchError(stageResult: 'FAILURE', catchInterruptions: false) { - create_spynnaker_config() - run_pytest('sPyNNaker/test_whole_board', 12000, 'test_whole_machine', 'integration', '16') - } - } - } - */ stage('Reports') { steps { sh 'find . -maxdepth 3 -type f -wholename "*/global_reports/*" -print -exec cat \\{\\} \\;' From 0230fdf4338db67f9cfda5864e63e7c96ec7100c Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Mon, 12 Aug 2024 15:53:32 +0100 Subject: [PATCH 5/7] remove none pypi stuff --- Jenkinsfile | 3 --- 1 file changed, 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 1e514f0..26f0ce2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -62,7 +62,6 @@ pipeline { sh 'support/gitclone.sh https://github.com/SpiNNakerManchester/spinn_common.git' sh 'support/gitclone.sh https://github.com/SpiNNakerManchester/SpiNNFrontEndCommon.git' sh 'support/gitclone.sh https://github.com/SpiNNakerManchester/sPyNNaker.git' - sh 'support/gitclone.sh https://github.com/SpiNNakerManchester/Visualiser.git' // Java dependencies sh 'support/gitclone.sh https://github.com/SpiNNakerManchester/JavaSpiNNaker' // scripts @@ -108,10 +107,8 @@ pipeline { sh 'rm -r spalloc/spalloc_client' sh 'rm -r SpiNNFrontEndCommon/spinn_front_end_common' sh 'rm -r SpiNNFrontEndCommon/c_common' - sh 'rm -r TestBase/spinnaker_testbase' sh 'rm -r sPyNNaker/spynnaker' sh 'rm -r sPyNNaker/neural_modelling' - sh 'rm -r sPyNNakerNewModelTemplate/python_models8' sh 'rm -r SpiNNakerGraphFrontEnd/spinnaker_graph_front_end' } } From 69d1e0097b336b51cfc557e3cce184cfa25b0742 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Mon, 12 Aug 2024 16:13:10 +0100 Subject: [PATCH 6/7] sh 'mkdir ${WORKSPACE}/global_reports' --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index 26f0ce2..e91b324 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -32,6 +32,7 @@ pipeline { sh 'echo "Job name is $THE_JOB (from $JOB_NAME)"' sh 'rm -rf ${WORKSPACE}/*' sh 'rm -rf ${WORKSPACE}/.[a-zA-Z0-9]*' + sh 'mkdir ${WORKSPACE}/global_reports' dir('IntegrationTests') { checkout scm } From fdd601b49f391b36ceed21606af03e741077db15 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Tue, 13 Aug 2024 11:10:31 +0100 Subject: [PATCH 7/7] remove GFE tests as they need built ocde not on pypi --- Jenkinsfile | 9 --------- 1 file changed, 9 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e91b324..d6ee667 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -150,15 +150,6 @@ pipeline { } } } - stage('Run GFE Integeration Tests') { - steps { - catchError(stageResult: 'FAILURE', catchInterruptions: false) { - create_gfe_config() - run_in_pyenv('python SpiNNakerGraphFrontEnd/gfe_integration_tests/script_builder.py') - run_pytest('SpiNNakerGraphFrontEnd/gfe_integration_tests/', 3600, 'GFE_Integration', 'integration', 'auto') - } - } - } stage('Run PyNNExamples Integration Tests') { steps { catchError(stageResult: 'FAILURE', catchInterruptions: false) {