From d8c59eef9f75c9635b634a487d68b81fca96a209 Mon Sep 17 00:00:00 2001 From: Ricky Stewart Date: Mon, 1 Apr 2024 14:31:07 -0500 Subject: [PATCH] workflows: make `acceptance`, `lint` GitHub Actions jobs mandatory Epic: CRDB-8308 Release note: None --- .github/bors.toml | 2 + .../workflows/github-actions-essential-ci.yml | 4 +- .../teamcity/cockroach/ci/tests/acceptance.sh | 46 ------------------- build/teamcity/cockroach/ci/tests/lint.sh | 12 ----- .../teamcity/cockroach/ci/tests/lint_impl.sh | 23 ---------- 5 files changed, 4 insertions(+), 83 deletions(-) delete mode 100755 build/teamcity/cockroach/ci/tests/acceptance.sh delete mode 100755 build/teamcity/cockroach/ci/tests/lint.sh delete mode 100755 build/teamcity/cockroach/ci/tests/lint_impl.sh diff --git a/.github/bors.toml b/.github/bors.toml index 500f3a5ce9ae..34b4b0740403 100644 --- a/.github/bors.toml +++ b/.github/bors.toml @@ -4,9 +4,11 @@ # pushed to master. status = [ "Bazel Essential CI (Cockroach)", + "acceptance", "check_generated_code", "docker_image_amd64", "examples_orms", + "lint", "linux_amd64_build", "linux_amd64_fips_build", "linux_arm64_build", diff --git a/.github/workflows/github-actions-essential-ci.yml b/.github/workflows/github-actions-essential-ci.yml index bcb0a90ff46a..1fa503b50845 100644 --- a/.github/workflows/github-actions-essential-ci.yml +++ b/.github/workflows/github-actions-essential-ci.yml @@ -27,7 +27,7 @@ concurrency: group: ${{ github.head_ref || github.run_id }} cancel-in-progress: true jobs: - EXPERIMENTAL_acceptance: + acceptance: runs-on: [self-hosted, basic_big_runner_group] steps: - uses: actions/checkout@v4 @@ -102,7 +102,7 @@ jobs: - name: clean up run: ./cockroach/build/github/cleanup-engflow-keys.sh if: always() - EXPERIMENTAL_lint: + lint: runs-on: [self-hosted, basic_big_runner_group] steps: - uses: actions/checkout@v4 diff --git a/build/teamcity/cockroach/ci/tests/acceptance.sh b/build/teamcity/cockroach/ci/tests/acceptance.sh deleted file mode 100755 index 867524a86fd7..000000000000 --- a/build/teamcity/cockroach/ci/tests/acceptance.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env bash - -set -xeuo pipefail - -dir="$(dirname $(dirname $(dirname $(dirname $(dirname "${0}")))))" -source "$dir/teamcity-support.sh" -source "$dir/teamcity-bazel-support.sh" # For run_bazel - -if [[ "$(uname -m)" =~ (arm64|aarch64)$ ]]; then - export CROSSLINUX_CONFIG="crosslinuxarm" -else - export CROSSLINUX_CONFIG="crosslinux" -fi - -tc_start_block "Build cockroach" -build_script='bazel build --config $1 --config ci //pkg/cmd/cockroach-short && cp $(bazel info bazel-bin --config $1 --config ci)/pkg/cmd/cockroach-short/cockroach-short_/cockroach-short /artifacts/cockroach && chmod a+w /artifacts/cockroach' -run_bazel /usr/bin/bash -c "$build_script" -- "$CROSSLINUX_CONFIG" -tc_end_block "Build cockroach" - -export ARTIFACTSDIR=$PWD/artifacts/acceptance -mkdir -p "$ARTIFACTSDIR" - -tc_start_block "Run acceptance tests" -status=0 - -bazel build //pkg/cmd/bazci --config=ci -BAZCI=$(bazel info bazel-bin --config=ci)/pkg/cmd/bazci/bazci_/bazci - -$BAZCI --artifacts_dir=$PWD/artifacts -- \ - test //pkg/acceptance:acceptance_test \ - --config=$CROSSLINUX_CONFIG --config=ci \ - "--sandbox_writable_path=$ARTIFACTSDIR" \ - "--test_tmpdir=$ARTIFACTSDIR" \ - --test_arg=-l="$ARTIFACTSDIR" \ - --test_arg=-b=$PWD/artifacts/cockroach \ - --test_env=TZ=America/New_York \ - --profile=$PWD/artifacts/profile.gz \ - --test_timeout=1800 || status=$? - -# Some unit tests test automatic ballast creation. These ballasts can be -# larger than the maximum artifact size. Remove any artifacts with the -# EMERGENCY_BALLAST filename. -find "$ARTIFACTSDIR" -name "EMERGENCY_BALLAST" -delete - -tc_end_block "Run acceptance tests" -exit $status diff --git a/build/teamcity/cockroach/ci/tests/lint.sh b/build/teamcity/cockroach/ci/tests/lint.sh deleted file mode 100755 index 131984fe8030..000000000000 --- a/build/teamcity/cockroach/ci/tests/lint.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -dir="$(dirname $(dirname $(dirname $(dirname $(dirname "${0}")))))" - -source "$dir/teamcity-support.sh" # For $root -source "$dir/teamcity-bazel-support.sh" # For run_bazel - -tc_start_block "Run lints" -run_bazel build/teamcity/cockroach/ci/tests/lint_impl.sh -tc_end_block "Run lints" diff --git a/build/teamcity/cockroach/ci/tests/lint_impl.sh b/build/teamcity/cockroach/ci/tests/lint_impl.sh deleted file mode 100755 index 748272e82177..000000000000 --- a/build/teamcity/cockroach/ci/tests/lint_impl.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash - -set -xeuo pipefail - -dir="$(dirname $(dirname $(dirname $(dirname $(dirname "${0}")))))" - -source "$dir/teamcity-support.sh" # For $root - -# GCAssert and unused need generated files in the workspace to work properly. -# generated files requirements -- begin -bazel run //pkg/gen:code -bazel run //pkg/cmd/generate-cgo:generate-cgo --run_under="cd $root && " -# generated files requirements -- end - -bazel build //pkg/cmd/bazci --config=ci -$(bazel info bazel-bin --config=ci)/pkg/cmd/bazci/bazci_/bazci -- test \ - //pkg/testutils/lint:lint_test --config=ci \ - --test_env=CC=$(which gcc) \ - --test_env=CXX=$(which gcc) \ - --test_env=HOME \ - --sandbox_writable_path=$HOME \ - --test_env=GO_SDK=$(dirname $(dirname $(bazel run @go_sdk//:bin/go --run_under=realpath))) \ - --test_env=COCKROACH_WORKSPACE=$root