From 1bbeddf99ef443a647569c27adfa83c7972beb0f Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 21 Sep 2020 09:20:40 -0400 Subject: [PATCH 1/5] Add a few more options for the CI script. These are: --disable-module-relay --disable-module-dirauth --enable-all-bugs-are-fatal --enable-nss --- scripts/ci/ci-driver.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/scripts/ci/ci-driver.sh b/scripts/ci/ci-driver.sh index cd91a91bbf..67a95a1f61 100755 --- a/scripts/ci/ci-driver.sh +++ b/scripts/ci/ci-driver.sh @@ -34,6 +34,10 @@ RUST="${RUST:-no}" DOXYGEN="${DOXYGEN:-no}" ASCIIDOC="${ASCIIDOC:-no}" TRACING="${TRACING:-no}" +ALL_BUGS_ARE_FATAL="${ALL_BUGS_ARE_FATAL:-no}" +DISABLE_DIRAUTH="${DISABLE_DIRAUTH:-no}" +DISABLE_RELAY="${DISABLE_RELAY:-no}" +NSS="${NSS:-no}" # Options for which tests to run. All should be yes/no. CHECK="${CHECK:-yes}" @@ -193,6 +197,10 @@ yes_or_no RUST yes_or_no DOXYGEN yes_or_no ASCIIDOC yes_or_no TRACING +yes_or_no ALL_BUGS_ARE_FATAL +yes_or_no DISABLE_DIRAUTH +yes_or_no DISABLE_RELAY +yes_or_no NSS yes_or_no RUN_STAGE_CONFIGURE yes_or_no RUN_STAGE_BUILD @@ -246,6 +254,18 @@ fi if [[ "$TRACING" == "yes" ]]; then configure_options+=("--enable-tracing-instrumentation-lttng") fi +if [[ "$ALL_BUGS_ARE_FATAL" == "yes" ]]; then + configure_options+=("--enable-all-bugs-are-fatal") +fi +if [[ "$DISABLE_DIRAUTH" == "yes" ]]; then + configure_options+=("--disable-module-dirauth") +fi +if [[ "$DISABLE_RELAY" == "yes" ]]; then + configure_options+=("--disable-module-relay") +fi +if [[ "$NSS" == "yes" ]]; then + configure_options+=("--enable-nss") +fi ############################################################################# # Tell the user about our versions of different tools and packages. From ab03ca9c75a5ffa011a683e46eef5e1671fa60ea Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 21 Sep 2020 09:24:14 -0400 Subject: [PATCH 2/5] gitlab-ci: Add disable-module builds. --- .gitlab-ci.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ce279a4bce..a719ef2ceb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -180,3 +180,36 @@ debian-tracing: - if: '$CI_PIPELINE_SOURCE == "push"' exists: - src/lib/trace/trace_sys.c + +##### +# No-authority mode +debian-disable-dirauth: + image: debian:stable + <<: *debian-template + variables: + DISABLE_DIRAUTH: "yes" + script: + - ./scripts/ci/ci-driver.sh + + +##### +# No-relay mode +debian-disable-relay: + image: debian:stable + <<: *debian-template + variables: + DISABLE_RELAY: "yes" + script: + - ./scripts/ci/ci-driver.sh + # Ensure that we only run tracing when it's implemented. + # + # Once versions before 0.4.3 are obsolete, we can remove this test. + rules: + # This first "if" check prevents us from running a duplicate version of + # this pipeline whenever we push and create an MR. I don't understand why + # it is necessary, though the following URL purports to explain: + # + # https://docs.gitlab.com/ee/ci/yaml/#prevent-duplicate-pipelines + - if: '$CI_PIPELINE_SOURCE == "push"' + exists: + - src/feature/relay/relay_stub.c From 3ee0f6371d77db712dd131ac8a4e98672a63c81c Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 21 Sep 2020 09:25:02 -0400 Subject: [PATCH 3/5] gitlab-ci: Add all-bugs-are-fatal on hardened and integration builds. --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a719ef2ceb..7fd07b9ed9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -112,6 +112,7 @@ debian-hardened: image: debian:testing <<: *debian-template variables: + ALL_BUGS_ARE_FATAL: "yes" HARDENING: "yes" CC: "clang" script: @@ -155,6 +156,7 @@ debian-integration: CHECK: "no" CHUTNEY: "yes" STEM: "yes" + ALL_BUGS_ARE_FATAL: "yes" script: - ./scripts/ci/ci-driver.sh @@ -191,7 +193,6 @@ debian-disable-dirauth: script: - ./scripts/ci/ci-driver.sh - ##### # No-relay mode debian-disable-relay: From 7280bb50b2e0c7af91381fa9634e2aea3ad5561c Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 21 Sep 2020 09:26:57 -0400 Subject: [PATCH 4/5] gitlab-ci: add an NSS check. --- .gitlab-ci.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7fd07b9ed9..43154d12f5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -89,6 +89,7 @@ variables: - if [ "$DOXYGEN" = yes ]; then apt-get install doxygen; fi - if [ "$STEM" = yes ]; then apt-get install timelimit; fi - if [ "$CC" = clang ]; then apt-get install clang; fi + - if [ "$NSS" = yes ]; then apt-get install libnss3 libnss3-dev; fi # TODO: This next line should not be debian-only. - if [ "$STEM" = yes ]; then git clone --depth 1 https://git.torproject.org/stem.git ; export STEM_PATH="$(pwd)/stem"; fi # TODO: This next line should not be debian-only. @@ -214,3 +215,13 @@ debian-disable-relay: - if: '$CI_PIPELINE_SOURCE == "push"' exists: - src/feature/relay/relay_stub.c + +##### +# NSS check on debian +debian-nss: + image: debian:stable + <<: *debian-template + variables: + NSS: "yes" + script: + - ./scripts/ci/ci-driver.sh From 8458c8211ec3755400933edc6287baa810f5f695 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 21 Sep 2020 09:49:29 -0400 Subject: [PATCH 5/5] gitlab-ci: Use test-network-all for debian-integration --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 43154d12f5..ba61c71b2b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -156,6 +156,7 @@ debian-integration: variables: CHECK: "no" CHUTNEY: "yes" + CHUTNEY_MAKE_TARGET: "test-network-all" STEM: "yes" ALL_BUGS_ARE_FATAL: "yes" script: