From df5ed4369e2c34d2111b71ef2fdd6b3621c55fa3 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Thu, 12 Oct 2023 23:02:47 +0900 Subject: [PATCH] tools: Remove no longer used & outdated ci.sh --- tools/ci.sh | 69 ----------------------------------------------------- 1 file changed, 69 deletions(-) delete mode 100755 tools/ci.sh diff --git a/tools/ci.sh b/tools/ci.sh deleted file mode 100755 index dc09807d..00000000 --- a/tools/ci.sh +++ /dev/null @@ -1,69 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: Apache-2.0 OR MIT -set -eEuo pipefail -IFS=$'\n\t' - -# shellcheck disable=SC2154 -trap 's=$?; echo >&2 "$0: error on line "${LINENO}": ${BASH_COMMAND}"; exit ${s}' ERR - -# Run a simplified version of the checks done by CI. -# -# USAGE: -# ./tools/ci.sh [+toolchain] -# -# Note: This script requires nightly Rust, rustfmt, clippy, and cargo-expand - -bail() { - echo >&2 "error: $*" - exit 1 -} -warn() { - echo >&2 "warning: $*" -} - -# Decide Rust toolchain. Nightly is used by default. -toolchain="+nightly" -if [[ "${1:-}" == "+"* ]]; then - toolchain="$1" - shift -fi -# Make sure toolchain is installed. -if ! cargo "${toolchain}" -V &>/dev/null; then - rustup toolchain add "${toolchain#+}" --no-self-update --profile minimal -fi - -if [[ "${toolchain:-+nightly}" != "+nightly"* ]]; then - bail "ci.sh requires nightly Rust" -fi -if ! rustup "${toolchain}" component add rustfmt &>/dev/null \ - || ! cargo expand -V &>/dev/null; then - warn "ci.sh requires rustfmt and cargo-expand to run all tests" -fi - -# Run rustfmt. -if ! rustup "${toolchain}" component add rustfmt &>/dev/null; then - warn "component 'rustfmt' is unavailable for toolchain '${toolchain#+}'" -else - ( - set -x - cargo "${toolchain}" fmt --all - ) -fi - -# Run clippy. -if ! rustup "${toolchain}" component add clippy &>/dev/null; then - warn "component 'clippy' is unavailable for toolchain '${toolchain#+}'" -else - ( - set -x - cargo "${toolchain}" clippy --all --all-features --all-targets -Z unstable-options - ) -fi - -set -x - -# Build documentation. -cargo "${toolchain}" doc --no-deps --all --all-features - -# Run tests. -cargo "${toolchain}" test --all --all-features