From 41decb0f402a8e77233a3fdae7a025c7b5f01b8a Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Wed, 31 Mar 2021 21:30:09 -0400 Subject: [PATCH] Split QA test running for now Eventually we probably want to just pick one target for it, but for now this means we can get faster test results as long as we have a faster Ubuntu runner. --- .gitlab/Fedora-Linux-CI.yml | 23 +++++++++++++++-------- .gitlab/Ubuntu-20.04-CI.yml | 36 ++++++++++++++++++++++++------------ .gitlab/templates.yml | 3 --- 3 files changed, 39 insertions(+), 23 deletions(-) diff --git a/.gitlab/Fedora-Linux-CI.yml b/.gitlab/Fedora-Linux-CI.yml index 181842b878..a86a553089 100644 --- a/.gitlab/Fedora-Linux-CI.yml +++ b/.gitlab/Fedora-Linux-CI.yml @@ -86,58 +86,65 @@ report_metrics: # Run the code unit tests. Each QA executable is split into a separate job so that the display # gives the test results broken down by the test executable. ########################################################################## -qa_python: +.unit_test_fedora: extends: - .unit_test + needs: + - job: build_linux + artifacts: true + +qa_python: + extends: + - .unit_test_fedora - .only_code variables: TEST: 'qa_python' qa_common: extends: - - .unit_test + - .unit_test_fedora - .only_code variables: TEST: 'qa_common' qa_gerbview: extends: - - .unit_test + - .unit_test_fedora - .only_code variables: TEST: 'qa_gerbview' qa_pcbnew: extends: - - .unit_test + - .unit_test_fedora - .only_code variables: TEST: 'qa_pcbnew' qa_eeschema: extends: - - .unit_test + - .unit_test_fedora - .only_code variables: TEST: 'qa_eeschema' qa_kimath: extends: - - .unit_test + - .unit_test_fedora - .only_code variables: TEST: 'qa_kimath' qa_sexpr: extends: - - .unit_test + - .unit_test_fedora - .only_code variables: TEST: 'qa_sexpr' qa_kicad2step: extends: - - .unit_test + - .unit_test_fedora - .only_code variables: TEST: 'qa_kicad2step' diff --git a/.gitlab/Ubuntu-20.04-CI.yml b/.gitlab/Ubuntu-20.04-CI.yml index 50e2df0add..27fcb179a4 100644 --- a/.gitlab/Ubuntu-20.04-CI.yml +++ b/.gitlab/Ubuntu-20.04-CI.yml @@ -53,12 +53,12 @@ build_ubuntu20.04: - build/linux/compilation_log.txt # Upload the compilation log in an easily downloadable form -report_build_warn: +report_build_warn_ubuntu20.04: stage: report extends: .only_code when: always needs: - - job: build_linux + - job: build_ubuntu20.04 artifacts: true script: - echo "Uploading compilation log" @@ -71,12 +71,12 @@ report_build_warn: - compilation_log.txt # Report on the metrics of the code -report_metrics: +report_metrics_ubuntu20.04: stage: report extends: .only_code when: always needs: - - job: build_linux + - job: build_ubuntu20.04 artifacts: true script: - cat build/linux/compilation_log.txt | { grep "warning:" || test $? = 1; } | awk 'END{print "number_of_warnings "NR}' > metrics.txt @@ -85,63 +85,75 @@ report_metrics: reports: metrics: metrics.txt +.unit_test_ubuntu20.04: + extends: + - .unit_test + needs: + ########################################################################## # Run the code unit tests. Each QA executable is split into a separate job so that the display # gives the test results broken down by the test executable. ########################################################################## -qa_python: +.unit_test_ubuntu20.04: extends: - .unit_test + needs: + - job: build_ubunt20.04 + artifacts: true + +qa_python: + extends: + - .unit_test_ubuntu20.04 - .only_code variables: TEST: 'qa_python' qa_common: extends: - - .unit_test + - .unit_test_ubuntu20.04 - .only_code variables: TEST: 'qa_common' qa_gerbview: extends: - - .unit_test + - .unit_test_ubuntu20.04 - .only_code variables: TEST: 'qa_gerbview' qa_pcbnew: extends: - - .unit_test + - .unit_test_ubuntu20.04 - .only_code variables: TEST: 'qa_pcbnew' qa_eeschema: extends: - - .unit_test + - .unit_test_ubuntu20.04 - .only_code variables: TEST: 'qa_eeschema' qa_kimath: extends: - - .unit_test + - .unit_test_ubuntu20.04 - .only_code variables: TEST: 'qa_kimath' qa_sexpr: extends: - - .unit_test + - .unit_test_ubuntu20.04 - .only_code variables: TEST: 'qa_sexpr' qa_kicad2step: extends: - - .unit_test + - .unit_test_ubuntu20.04 - .only_code variables: TEST: 'qa_kicad2step' diff --git a/.gitlab/templates.yml b/.gitlab/templates.yml index 28608c5c73..2ed11ad641 100644 --- a/.gitlab/templates.yml +++ b/.gitlab/templates.yml @@ -17,9 +17,6 @@ .unit_test: stage: test when: on_success - needs: - - job: build_linux - artifacts: true # We define this using a before script because GitLab cannot merge variable # definitions across inheritance (so the variables block from this would disappear) before_script: