2020-07-17 18:42:14 +00:00
|
|
|
|
##########################################################################
|
|
|
|
|
# Build KiCad on Fedora and save the results
|
|
|
|
|
##########################################################################
|
2022-05-12 02:54:27 +00:00
|
|
|
|
.fedora_build_linux_base:
|
2020-07-17 18:42:14 +00:00
|
|
|
|
stage: build
|
2022-01-19 19:00:47 +00:00
|
|
|
|
# Don't tag until we have separate CI for MRs
|
|
|
|
|
# tags:
|
|
|
|
|
# - kicad-fedora
|
2023-10-20 18:31:22 +00:00
|
|
|
|
image: registry.gitlab.com/kicad/kicad-ci/source_containers/master/fedora:38
|
2020-07-17 18:42:14 +00:00
|
|
|
|
extends: .only_code
|
|
|
|
|
interruptible: false
|
|
|
|
|
cache:
|
2021-04-09 11:16:45 +00:00
|
|
|
|
key: "cache-fedora-linux"
|
2020-07-17 18:42:14 +00:00
|
|
|
|
paths:
|
|
|
|
|
- ccache/
|
|
|
|
|
before_script:
|
|
|
|
|
# CCache Config
|
|
|
|
|
- mkdir -p ccache
|
|
|
|
|
- export CCACHE_BASEDIR=${PWD}
|
|
|
|
|
- export CCACHE_DIR=${PWD}/ccache
|
|
|
|
|
script:
|
|
|
|
|
- mkdir -p build/linux
|
|
|
|
|
- cd build/linux
|
|
|
|
|
- cmake
|
2022-01-07 03:44:45 +00:00
|
|
|
|
-G Ninja
|
2022-10-05 02:45:58 +00:00
|
|
|
|
-DCMAKE_BUILD_TYPE=QABUILD
|
2020-07-17 18:42:14 +00:00
|
|
|
|
-DKICAD_STDLIB_LIGHT_DEBUG=ON
|
2021-01-18 00:29:06 +00:00
|
|
|
|
-DKICAD_BUILD_I18N=ON
|
2023-05-04 14:37:44 +00:00
|
|
|
|
-DKICAD_TEST_XML_OUTPUT=ON
|
2023-08-23 15:58:45 +00:00
|
|
|
|
-DKICAD_BUILD_PNS_DEBUG_TOOL=ON
|
2020-07-17 18:42:14 +00:00
|
|
|
|
../../
|
2022-01-07 03:41:12 +00:00
|
|
|
|
- ninja 2>&1 | tee compilation_log.txt
|
2020-07-17 18:42:14 +00:00
|
|
|
|
- cd ../../
|
|
|
|
|
artifacts:
|
|
|
|
|
# Only save the artifacts that are needed for running the tests in the next stage
|
|
|
|
|
# and the compilation log. The entire build directory is too large to save as an
|
|
|
|
|
# artifact.
|
|
|
|
|
expire_in: 2 hrs
|
|
|
|
|
when: always
|
|
|
|
|
paths:
|
|
|
|
|
- build/linux/3d-viewer/
|
2023-09-09 03:43:18 +00:00
|
|
|
|
- build/linux/common/libkicommon.so*
|
2024-01-13 17:22:01 +00:00
|
|
|
|
- build/linux/common/gal/libkigal.so*
|
2023-05-04 14:37:44 +00:00
|
|
|
|
- build/linux/eeschema/_eeschema.kiface
|
|
|
|
|
- build/linux/kicad/kicad-cli
|
2020-07-17 18:42:14 +00:00
|
|
|
|
- build/linux/pcbnew/pcbnew.py
|
2022-06-23 00:25:29 +00:00
|
|
|
|
- build/linux/pcbnew/_pcbnew.kiface
|
2020-07-17 18:42:14 +00:00
|
|
|
|
- build/linux/pcbnew/_pcbnew.so
|
|
|
|
|
- build/linux/qa/
|
|
|
|
|
- build/linux/compilation_log.txt
|
2022-02-13 21:09:25 +00:00
|
|
|
|
exclude:
|
|
|
|
|
- build/linux/**/*.o
|
|
|
|
|
- build/linux/**/*.a
|
2020-07-17 18:42:14 +00:00
|
|
|
|
|
2022-05-12 02:54:27 +00:00
|
|
|
|
# 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
|
2024-03-15 18:37:34 +00:00
|
|
|
|
tags:
|
|
|
|
|
- saas-linux-medium-amd64
|
2022-05-12 02:54:27 +00:00
|
|
|
|
except:
|
|
|
|
|
variables:
|
|
|
|
|
- $CI_PROJECT_ROOT_NAMESPACE == "kicad"
|
|
|
|
|
|
|
|
|
|
|
2020-07-17 18:42:14 +00:00
|
|
|
|
# Upload the compilation log in an easily downloadable form
|
2022-05-12 03:00:13 +00:00
|
|
|
|
.fedora_report_build_warn:
|
2020-07-17 18:42:14 +00:00
|
|
|
|
stage: report
|
|
|
|
|
extends: .only_code
|
|
|
|
|
when: always
|
|
|
|
|
script:
|
|
|
|
|
- echo "Uploading compilation log"
|
|
|
|
|
- cp build/linux/compilation_log.txt compilation_log.txt
|
|
|
|
|
artifacts:
|
|
|
|
|
expire_in: 1 year
|
|
|
|
|
expose_as: 'Build log'
|
|
|
|
|
name: "build_log.txt"
|
|
|
|
|
paths:
|
|
|
|
|
- compilation_log.txt
|
|
|
|
|
|
2022-05-12 03:00:13 +00:00
|
|
|
|
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"
|
|
|
|
|
|
|
|
|
|
|
2020-07-17 18:42:14 +00:00
|
|
|
|
# Report on the metrics of the code
|
2022-05-12 03:00:13 +00:00
|
|
|
|
.fedora_report_metrics:
|
2020-07-17 18:42:14 +00:00
|
|
|
|
stage: report
|
|
|
|
|
extends: .only_code
|
|
|
|
|
when: always
|
|
|
|
|
script:
|
2021-04-09 11:32:17 +00:00
|
|
|
|
- cat build/linux/compilation_log.txt | { grep "warning:" || test $? = 1; } | awk 'END{print "number_of_fedora_warnings "NR}' > metrics.txt
|
2020-07-17 18:42:14 +00:00
|
|
|
|
- cat metrics.txt
|
|
|
|
|
artifacts:
|
|
|
|
|
reports:
|
|
|
|
|
metrics: metrics.txt
|
|
|
|
|
|
2022-05-12 03:00:13 +00:00
|
|
|
|
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"
|
2020-07-17 18:42:14 +00:00
|
|
|
|
|
|
|
|
|
##########################################################################
|
2021-04-09 11:32:17 +00:00
|
|
|
|
# Run the code unit tests.
|
2020-07-17 18:42:14 +00:00
|
|
|
|
##########################################################################
|
2022-05-12 03:00:13 +00:00
|
|
|
|
.fedora_qa:
|
2023-10-20 18:31:22 +00:00
|
|
|
|
image: registry.gitlab.com/kicad/kicad-ci/source_containers/master/fedora:38
|
2020-07-17 18:42:14 +00:00
|
|
|
|
extends:
|
|
|
|
|
- .unit_test
|
2021-04-09 11:32:17 +00:00
|
|
|
|
- .only_code
|
2023-05-04 14:37:44 +00:00
|
|
|
|
before_script:
|
2023-05-06 00:13:08 +00:00
|
|
|
|
- if [ "$TEST" == "cli" ] || [ "$TEST" == "python" ]; then python3 -m pip install -r qa/tests/requirements.txt; fi
|
2023-08-26 10:33:45 +00:00
|
|
|
|
- if [ "$TEST" == "cli" ]; then sudo dnf -y install gerbv; fi
|
2021-04-09 11:32:17 +00:00
|
|
|
|
parallel:
|
|
|
|
|
matrix:
|
2021-04-09 11:39:11 +00:00
|
|
|
|
# The name of the test without the qa_ prefix
|
2023-09-12 20:55:27 +00:00
|
|
|
|
- TEST: [python, cli, common, gerbview, pcbnew, pns_regressions, eeschema, kimath, sexpr, kicad2step, spice]
|
2022-05-12 03:00:13 +00:00
|
|
|
|
|
|
|
|
|
fedora_qa_kicad:
|
|
|
|
|
extends: .fedora_qa
|
|
|
|
|
tags:
|
|
|
|
|
- kicad-fedora
|
2021-04-01 01:30:09 +00:00
|
|
|
|
needs:
|
2022-05-12 03:00:13 +00:00
|
|
|
|
- job: fedora_build_linux_kicad
|
2021-04-01 01:30:09 +00:00
|
|
|
|
artifacts: true
|
2022-05-12 03:00:13 +00:00
|
|
|
|
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"
|