2020-07-17 18:42:14 +00:00
|
|
|
|
##########################################################################
|
|
|
|
|
# Build KiCad on Fedora and save the results
|
|
|
|
|
##########################################################################
|
2021-04-09 11:32:17 +00:00
|
|
|
|
fedora_build_linux:
|
2020-07-17 18:42:14 +00:00
|
|
|
|
stage: build
|
2022-01-07 03:29:39 +00:00
|
|
|
|
tags:
|
|
|
|
|
- kicad-fedora
|
|
|
|
|
image: registry.gitlab.com/kicad/kicad-ci/source_containers/master/fedora:34
|
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-01-11 00:16:06 +00:00
|
|
|
|
-DCMAKE_BUILD_TYPE=Release
|
2020-07-17 18:42:14 +00:00
|
|
|
|
-DKICAD_STDLIB_LIGHT_DEBUG=ON
|
|
|
|
|
-DKICAD_USE_OCC=ON
|
|
|
|
|
-DKICAD_SPICE=ON
|
2021-01-18 00:29:06 +00:00
|
|
|
|
-DKICAD_BUILD_I18N=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/
|
|
|
|
|
- build/linux/pcbnew/pcbnew.py
|
|
|
|
|
- build/linux/pcbnew/_pcbnew.so
|
|
|
|
|
- build/linux/qa/
|
|
|
|
|
- build/linux/compilation_log.txt
|
|
|
|
|
|
|
|
|
|
# Upload the compilation log in an easily downloadable form
|
2021-04-09 11:32:17 +00:00
|
|
|
|
fedora_report_build_warn:
|
2020-07-17 18:42:14 +00:00
|
|
|
|
stage: report
|
|
|
|
|
extends: .only_code
|
|
|
|
|
when: always
|
|
|
|
|
needs:
|
2021-04-09 11:32:17 +00:00
|
|
|
|
- job: fedora_build_linux
|
2020-07-17 18:42:14 +00:00
|
|
|
|
artifacts: true
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
# Report on the metrics of the code
|
2021-04-09 11:32:17 +00:00
|
|
|
|
fedora_report_metrics:
|
2020-07-17 18:42:14 +00:00
|
|
|
|
stage: report
|
|
|
|
|
extends: .only_code
|
|
|
|
|
when: always
|
|
|
|
|
needs:
|
2021-04-09 11:32:17 +00:00
|
|
|
|
- job: fedora_build_linux
|
2020-07-17 18:42:14 +00:00
|
|
|
|
artifacts: true
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
##########################################################################
|
2021-04-09 11:32:17 +00:00
|
|
|
|
# Run the code unit tests.
|
2020-07-17 18:42:14 +00:00
|
|
|
|
##########################################################################
|
2021-04-09 11:32:17 +00:00
|
|
|
|
fedora_qa:
|
2020-07-17 18:42:14 +00:00
|
|
|
|
extends:
|
|
|
|
|
- .unit_test
|
2021-04-09 11:32:17 +00:00
|
|
|
|
- .only_code
|
|
|
|
|
parallel:
|
|
|
|
|
matrix:
|
2021-04-09 11:39:11 +00:00
|
|
|
|
# The name of the test without the qa_ prefix
|
|
|
|
|
- TEST: [python, common, gerbview, pcbnew, eeschema, kimath, sexpr, kicad2step]
|
2021-04-01 01:30:09 +00:00
|
|
|
|
needs:
|
2021-04-09 11:32:17 +00:00
|
|
|
|
- job: fedora_build_linux
|
2021-04-01 01:30:09 +00:00
|
|
|
|
artifacts: true
|