Commit ec72d110 authored by Ondřej Surý's avatar Ondřej Surý

Replace bear with compiledb and drop MAKE_COMMAND because we don't need it

parent 5f5721aa
...@@ -15,7 +15,6 @@ variables: ...@@ -15,7 +15,6 @@ variables:
BUILD_PARALLEL_JOBS: 6 BUILD_PARALLEL_JOBS: 6
TEST_PARALLEL_JOBS: 6 TEST_PARALLEL_JOBS: 6
MAKE_COMMAND: make
CONFIGURE: ./configure CONFIGURE: ./configure
CLANG: clang-10 CLANG: clang-10
SCAN_BUILD: scan-build-10 SCAN_BUILD: scan-build-10
...@@ -209,7 +208,7 @@ stages: ...@@ -209,7 +208,7 @@ stages:
- test -n "${OOT_BUILD_WORKSPACE}" && mkdir "${OOT_BUILD_WORKSPACE}" && cd "${OOT_BUILD_WORKSPACE}" - test -n "${OOT_BUILD_WORKSPACE}" && mkdir "${OOT_BUILD_WORKSPACE}" && cd "${OOT_BUILD_WORKSPACE}"
script: script:
- *configure - *configure
- ${MAKE_COMMAND} -j${BUILD_PARALLEL_JOBS:-1} -k all V=1 - make -j${BUILD_PARALLEL_JOBS:-1} -k all V=1
- test -z "${RUN_MAKE_INSTALL}" || make install - test -z "${RUN_MAKE_INSTALL}" || make install
- test -z "${RUN_MAKE_INSTALL}" || sh util/check-make-install - test -z "${RUN_MAKE_INSTALL}" || sh util/check-make-install
needs: needs:
...@@ -320,34 +319,22 @@ stages: ...@@ -320,34 +319,22 @@ stages:
when: on_failure when: on_failure
.cppcheck_args: &run_cppcheck | .cppcheck_args: &run_cppcheck |
cppcheck --enable=warning,performance,portability,information,missingInclude \ cppcheck --enable=warning,performance,portability,information,missingInclude --include=config.h --std=c11 --language=c --project=compile_commands.json --error-exitcode=2 -j ${TEST_PARALLEL_JOBS:-1} --xml --output-file=cppcheck.results --relative-paths="$CI_PROJECT_DIR" --inline-suppr --suppressions-list=util/suppressions.txt
--include=config.h \
--quiet \
--std=c11 \
--language=c \
--project=compile_commands.json \
--error-exitcode=2 \
-j ${TEST_PARALLEL_JOBS:-1} \
--xml \
--output-file=cppcheck.results \
--relative-paths="$CI_PROJECT_DIR" \
--inline-suppr \
--suppressions-list=util/suppressions.txt
.cppcheck_report: &cppcheck_report_html | .cppcheck_report: &cppcheck_report_html |
cppcheck-htmlreport --title="BIND 9 ($CI_COMMIT_SHORT_SHA) Cppcheck Report" \ cppcheck-htmlreport --title="BIND 9 ($CI_COMMIT_SHORT_SHA) Cppcheck Report" --file=cppcheck.results --report-dir=cppcheck_html/
--file=cppcheck.results \
--report-dir=cppcheck_html/
.cppcheck: &cppcheck_job .cppcheck: &cppcheck_job
<<: *default_triggering_rules <<: *default_triggering_rules
stage: postcheck stage: postcheck
before_script: before_script:
- pip3 install compiledb
script:
- *configure
- (make -nwk all || true) | compiledb
- export GCC_VERSION=$(gcc --version | sed -n 's/.*\([0-9]\+\)\.[0-9]\+\.[0-9]\+.*/\1/p') - export GCC_VERSION=$(gcc --version | sed -n 's/.*\([0-9]\+\)\.[0-9]\+\.[0-9]\+.*/\1/p')
- sed -i "/gcc\",/a\"-DCPPCHECK\", \"-D__STDC__\", \"-D__GNUC__=${GCC_VERSION}\"," compile_commands.json - sed -i "/gcc\",/a\"-DCPPCHECK\", \"-D__STDC__\", \"-D__GNUC__=${GCC_VERSION}\"," compile_commands.json
script:
- *run_cppcheck - *run_cppcheck
after_script:
- *cppcheck_report_html - *cppcheck_report_html
artifacts: artifacts:
paths: paths:
...@@ -356,6 +343,9 @@ stages: ...@@ -356,6 +343,9 @@ stages:
- cppcheck_html/ - cppcheck_html/
expire_in: "1 day" expire_in: "1 day"
when: on_failure when: on_failure
needs:
- job: autoreconf
artifacts: true
### Job Definitions ### Job Definitions
...@@ -634,7 +624,6 @@ gcc:sid:amd64: ...@@ -634,7 +624,6 @@ gcc:sid:amd64:
CFLAGS: "${CFLAGS_COMMON} -O3" CFLAGS: "${CFLAGS_COMMON} -O3"
EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2" EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2"
RUN_MAKE_INSTALL: 1 RUN_MAKE_INSTALL: 1
MAKE_COMMAND: bear --use-cc=${CC} --verbose make
<<: *debian_sid_amd64_image <<: *debian_sid_amd64_image
<<: *build_job <<: *build_job
...@@ -655,9 +644,6 @@ unit:gcc:sid:amd64: ...@@ -655,9 +644,6 @@ unit:gcc:sid:amd64:
cppcheck: cppcheck:
<<: *base_image <<: *base_image
<<: *cppcheck_job <<: *cppcheck_job
needs:
- job: gcc:sid:amd64
artifacts: true
# Job for out-of-tree GCC build on Debian Sid (amd64) # Job for out-of-tree GCC build on Debian Sid (amd64)
...@@ -1311,13 +1297,13 @@ respdiff: ...@@ -1311,13 +1297,13 @@ respdiff:
BIND_BASELINE_VERSION: v9_11_3 BIND_BASELINE_VERSION: v9_11_3
script: script:
- ./configure --without-make-clean - ./configure --without-make-clean
- ${MAKE_COMMAND} -j${BUILD_PARALLEL_JOBS:-1} V=1 - make -j${BUILD_PARALLEL_JOBS:-1} V=1
- *setup_interfaces - *setup_interfaces
- git clone --depth 1 https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.isc.org/isc-private/bind-qa.git - git clone --depth 1 https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.isc.org/isc-private/bind-qa.git
- git clone --branch "${BIND_BASELINE_VERSION}" --depth 1 https://gitlab.isc.org/isc-projects/bind9.git refbind - git clone --branch "${BIND_BASELINE_VERSION}" --depth 1 https://gitlab.isc.org/isc-projects/bind9.git refbind
- cd refbind/ - cd refbind/
- ./configure --without-make-clean - ./configure --without-make-clean
- ${MAKE_COMMAND} -j${BUILD_PARALLEL_JOBS:-1} V=1 - make -j${BUILD_PARALLEL_JOBS:-1} V=1
- cd ../bind-qa/bind9/respdiff - cd ../bind-qa/bind9/respdiff
- bash respdiff.sh -q "${PWD}/100k_mixed.txt" -c 3 -w "${PWD}/rspworkdir" "${CI_PROJECT_DIR}/refbind" "${CI_PROJECT_DIR}" - bash respdiff.sh -q "${PWD}/100k_mixed.txt" -c 3 -w "${PWD}/rspworkdir" "${CI_PROJECT_DIR}/refbind" "${CI_PROJECT_DIR}"
needs: needs:
...@@ -1346,11 +1332,11 @@ abi-check: ...@@ -1346,11 +1332,11 @@ abi-check:
BIND_BASELINE_VERSION: v9_17_0 BIND_BASELINE_VERSION: v9_17_0
script: script:
- *configure - *configure
- ${MAKE_COMMAND} -j${BUILD_PARALLEL_JOBS:-1} V=1 - make -j${BUILD_PARALLEL_JOBS:-1} V=1
- git clone --branch "${BIND_BASELINE_VERSION}" --depth 1 https://gitlab.isc.org/isc-projects/bind9.git refbind - git clone --branch "${BIND_BASELINE_VERSION}" --depth 1 https://gitlab.isc.org/isc-projects/bind9.git refbind
- cd refbind/ - cd refbind/
- *configure - *configure
- ${MAKE_COMMAND} -j${BUILD_PARALLEL_JOBS:-1} V=1 - make -j${BUILD_PARALLEL_JOBS:-1} V=1
- cd .. - cd ..
- util/api-checker.sh . refbind - util/api-checker.sh . refbind
artifacts: artifacts:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment