From ebb3e0471842c216fd1a4760cb62b6a19d83a84e Mon Sep 17 00:00:00 2001 From: Marek Roszko Date: Thu, 12 May 2022 23:44:09 -0400 Subject: [PATCH] Update Fedora-Linux-CI.yml to match master --- .gitlab/Fedora-Linux-CI.yml | 99 +++++++++++++++++++++++++++++++------ 1 file changed, 85 insertions(+), 14 deletions(-) diff --git a/.gitlab/Fedora-Linux-CI.yml b/.gitlab/Fedora-Linux-CI.yml index 4c439298e6..20ce48d6cf 100644 --- a/.gitlab/Fedora-Linux-CI.yml +++ b/.gitlab/Fedora-Linux-CI.yml @@ -1,10 +1,11 @@ ########################################################################## # Build KiCad on Fedora and save the results ########################################################################## -fedora_build_linux: +.fedora_build_linux_base: stage: build - tags: - - kicad-fedora +# Don't tag until we have separate CI for MRs +# tags: +# - kicad-fedora image: registry.gitlab.com/kicad/kicad-ci/source_containers/master/fedora:34 extends: .only_code interruptible: false @@ -22,7 +23,7 @@ fedora_build_linux: - cd build/linux - cmake -G Ninja - -DCMAKE_BUILD_TYPE=Debug + -DCMAKE_BUILD_TYPE=RelWithDebInfo -DKICAD_STDLIB_LIGHT_DEBUG=ON -DKICAD_USE_OCC=ON -DKICAD_SPICE=ON @@ -42,15 +43,31 @@ fedora_build_linux: - build/linux/pcbnew/_pcbnew.so - build/linux/qa/ - build/linux/compilation_log.txt + exclude: + - build/linux/**/*.o + - build/linux/**/*.a + +# This split is to ensure we can always use our runner for our jobs +fedora_build_linux_kicad: + extends: .fedora_build_linux_base + tags: + - kicad-fedora + only: + variables: + - $CI_PROJECT_ROOT_NAMESPACE == "kicad" + +fedora_build_linux_public: + extends: .fedora_build_linux_base + except: + variables: + - $CI_PROJECT_ROOT_NAMESPACE == "kicad" + # Upload the compilation log in an easily downloadable form -fedora_report_build_warn: +.fedora_report_build_warn: stage: report extends: .only_code when: always - needs: - - job: fedora_build_linux - artifacts: true script: - echo "Uploading compilation log" - cp build/linux/compilation_log.txt compilation_log.txt @@ -61,14 +78,32 @@ fedora_report_build_warn: paths: - compilation_log.txt +fedora_report_build_warn_kicad: + extends: .fedora_report_build_warn + tags: + - kicad-fedora + needs: + - job: fedora_build_linux_kicad + artifacts: true + only: + variables: + - $CI_PROJECT_ROOT_NAMESPACE == "kicad" + +fedora_report_build_warn_public: + extends: .fedora_report_build_warn + needs: + - job: fedora_build_linux_public + artifacts: true + except: + variables: + - $CI_PROJECT_ROOT_NAMESPACE == "kicad" + + # Report on the metrics of the code -fedora_report_metrics: +.fedora_report_metrics: stage: report extends: .only_code when: always - needs: - - job: fedora_build_linux - artifacts: true script: - cat build/linux/compilation_log.txt | { grep "warning:" || test $? = 1; } | awk 'END{print "number_of_fedora_warnings "NR}' > metrics.txt - cat metrics.txt @@ -76,11 +111,30 @@ fedora_report_metrics: reports: metrics: metrics.txt +fedora_report_metrics_kicad: + extends: .fedora_report_metrics + tags: + - kicad-fedora + needs: + - job: fedora_build_linux_kicad + artifacts: true + only: + variables: + - $CI_PROJECT_ROOT_NAMESPACE == "kicad" + +fedora_report_metrics_public: + extends: .fedora_report_metrics + needs: + - job: fedora_build_linux_public + artifacts: true + except: + variables: + - $CI_PROJECT_ROOT_NAMESPACE == "kicad" ########################################################################## # Run the code unit tests. ########################################################################## -fedora_qa: +.fedora_qa: extends: - .unit_test - .only_code @@ -88,6 +142,23 @@ fedora_qa: matrix: # The name of the test without the qa_ prefix - TEST: [python, common, gerbview, pcbnew, eeschema, kimath, sexpr, kicad2step] + +fedora_qa_kicad: + extends: .fedora_qa + tags: + - kicad-fedora needs: - - job: fedora_build_linux + - job: fedora_build_linux_kicad artifacts: true + only: + variables: + - $CI_PROJECT_ROOT_NAMESPACE == "kicad" + +fedora_qa_public: + extends: .fedora_qa + needs: + - job: fedora_build_linux_public + artifacts: true + except: + variables: + - $CI_PROJECT_ROOT_NAMESPACE == "kicad"