From c8e394f3f010fb5fc5cf0e7f9bf94b8b1cc1973a Mon Sep 17 00:00:00 2001 From: sharkdp Date: Sun, 2 Aug 2020 13:03:24 +0200 Subject: [PATCH] Remove TravisCI and AppVeyor configuration files --- .travis.yml | 106 ----------------------- appveyor.yml | 49 ----------- ci/.gitattributes | 1 - ci/before_deploy.bash | 188 ----------------------------------------- ci/before_deploy.ps1 | 28 ------ ci/before_install.bash | 38 --------- ci/script.bash | 20 ----- 7 files changed, 430 deletions(-) delete mode 100644 .travis.yml delete mode 100644 appveyor.yml delete mode 100644 ci/.gitattributes delete mode 100755 ci/before_deploy.bash delete mode 100644 ci/before_deploy.ps1 delete mode 100755 ci/before_install.bash delete mode 100755 ci/script.bash diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 866ad71f..00000000 --- a/.travis.yml +++ /dev/null @@ -1,106 +0,0 @@ -language: rust - -matrix: - include: - # Stable channel. - - os: linux - rust: stable - env: TARGET=x86_64-unknown-linux-gnu - - os: linux - rust: stable - env: - - TARGET=x86_64-unknown-linux-musl - - CC_x86_64_unknown_linux_musl=/usr/bin/musl-gcc - - os: linux - rust: stable - env: TARGET=i686-unknown-linux-gnu - - os: osx - rust: stable - env: TARGET=x86_64-apple-darwin - - os: linux - rust: stable - env: - - TARGET=arm-unknown-linux-gnueabihf - - CC_arm_unknown_linux_gnueabihf=/usr/bin/arm-linux-gnueabihf-gcc-4.8 - - CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc-4.8 - - os: linux - rust: stable - env: - - TARGET=aarch64-unknown-linux-gnu - - CC_aarch64-unknown-linux-gnu=/usr/bin/aarch64-linux-gnu-gcc-4.8 - - CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc-4.8 - - # Minimum Rust supported channel. - - os: linux - rust: 1.40.0 - env: TARGET=x86_64-unknown-linux-gnu - - os: linux - rust: 1.40.0 - env: - - TARGET=x86_64-unknown-linux-musl - - CC_x86_64_unknown_linux_musl=/usr/bin/musl-gcc - - os: osx - rust: 1.40.0 - env: TARGET=x86_64-apple-darwin - - # Disable nightly for now - # # Code formatting check - # - os: linux - # rust: nightly - # # skip the global install step - # install: - # - cargo install --debug --force rustfmt-nightly - # script: cargo fmt -- --check - -sudo: required - -before_install: - - ci/before_install.bash - -env: - global: - # Default target on travis-ci. - # Used as conditional check in the install stage - - HOST=x86_64-unknown-linux-gnu - # Used on the deployment script - - PROJECT_NAME=bat - -install: - # prevent target re-add error from rustup - - if [[ $TRAVIS_OS_NAME = linux && $HOST != $TARGET ]]; then rustup target add $TARGET; fi - -script: - - ci/script.bash - -before_deploy: - - bash ci/before_deploy.bash - -deploy: - provider: releases - # NOTE updating the `api_key.secure` - # - go to: https://github.com/settings/tokens/new - # - generate new token using `public_repo` scope - # - encrypt it using: `travis encrypt API_KEY_HERE` - # - paste the output below - api_key: - secure: "GZL8nYk+/MZGEqejpP0UMMGVmwUEdxiF9CflFIGccu+/tznDyHnHOpyJmbH3M5IKWIxa7xFgqOE8pHuD4oQXt4mzyJGB0KMKKEFLW7ckbTYKya5bw0heKznaqGnS0Yz+vpfqYR25eiPFYCz7mDsGsCzH5QZqt3cdn9MDQGu1D0IaxPjuBNH3T9kBblR0ifBd3Diy0JYhiVcMSI3V1rkel18F1yBHO2GQ95hkWxVgjANQnefq5+zdzbx4ki539ewYENShA8N0w6ULJVY9LmWRWJIp90ggOD3JCH6Nz/fBpYBqwfABO6Dr7Csw7IRm7pM4IVkFZS1taiDYFX9thxZh3UTmI4YYtSTPxH9NGV47kxPipbf4vAXFwW+1VcHKMpBzz+5IVsHnk1Pfx9/GZsXbqXM3PUWCStec36Xtqh5vQapDKEg9khkEs4b1X7/E73gvpRuQl9gbnyufSVWgDsXIWqM+0aDbqQz1FpLmVxz6eij0cB9vR+8kbNoe/CEPHPO9ZllvAHseukOeHPzSBd8rILORXaaGmQausXz2wWgSsffUSYz4705P8joI0zFCfmkHjL+kA1ZUx5SxLCc1ID7CFFZChhAxHoPL7xc21snswwr8QeheERdwvuzKNaerBGZEw8dmMMx98YkjftIj65DDySr2mRZuufBQeQpmMhFyIT4=" - # for uploading multiple files - file_glob: true - # NOTE explanation on each env variable - # - PROJECT_NAME: name of the project, set on the `env.global` above - # - TRAVIS_TAG: tag name that the build is being deployed for, usually the version number - # - TARGET: target triple of the build - file: - - $PROJECT_NAME-$TRAVIS_TAG-$TARGET.* - - $PROJECT_NAME*.deb - # don't delete artifacts from previous stage - skip_cleanup: true - on: - # deploy only if we push a tag - tags: true - # deploy only on stable channel that has TARGET env variable sets - condition: $TRAVIS_RUST_VERSION = stable && $TARGET != "" - -notifications: - email: - on_success: never diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index b150fa16..00000000 --- a/appveyor.yml +++ /dev/null @@ -1,49 +0,0 @@ -environment: - global: - TARGET: x86_64-pc-windows-msvc - RUST_VERSION: stable - CRATE_NAME: bat - CARGO_HOME: "c:\\cargo" - RUSTUP_HOME: "c:\\rustup" - -install: - - appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe - - rustup-init.exe -y --default-host %TARGET% --profile minimal - - set PATH=%PATH%;C:\cargo\bin - - rustc -Vv - - cargo -V - -build: false -test_script: - - cargo test --target %TARGET% --verbose - - cargo run --target %TARGET% -- src/bin/bat/main.rs README.md --paging=never - -before_deploy: - # Generate artifacts for release - - cargo build --bins --release --verbose - - ps: ci\before_deploy.ps1 - -deploy: - description: 'Automatically deployed release' - artifact: /.*\.zip/ - # Here's how: - # - Go to 'https://github.com/settings/tokens/new' and generate a Token with only the - # `public_repo` scope enabled - # - Then go to 'https://ci.appveyor.com/tools/encrypt' and enter the newly generated token. - # - Enter the "encrypted value" below - auth_token: - secure: oO4/J+hcFXgXcEqEc8gzlQNqLG0IxU78s4EyH+uczGdsyWajb3yipxPR6nXUvmoj - provider: GitHub - on: - RUST_VERSION: stable - appveyor_repo_tag: true - -cache: - - C:\Users\appveyor\.cargo\registry - - target - -notifications: - - provider: Email - on_build_success: false - on_build_failure: false - on_build_status_changed: false diff --git a/ci/.gitattributes b/ci/.gitattributes deleted file mode 100644 index 36eaad9f..00000000 --- a/ci/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -* linguist-vendored diff --git a/ci/before_deploy.bash b/ci/before_deploy.bash deleted file mode 100755 index effd875d..00000000 --- a/ci/before_deploy.bash +++ /dev/null @@ -1,188 +0,0 @@ -#!/usr/bin/env bash -# Building and packaging for release -set -ex - -# Ensure environment variables exist. -if [[ -z "$PROJECT_NAME" ]]; then - export PROJECT_NAME="bat" -fi - -build() { - cargo build --bins --target "$TARGET" --release --verbose -} - -pack() { - local tempdir - local out_dir - local package_name - local gcc_prefix - - tempdir=$(mktemp -d 2>/dev/null || mktemp -d -t tmp) - out_dir=$(pwd) - package_name="$PROJECT_NAME-$TRAVIS_TAG-$TARGET" - - if [[ $TARGET == "arm-unknown-linux-gnueabihf" ]]; then - gcc_prefix="arm-linux-gnueabihf-" - elif [[ $TARGET == "aarch64-unknown-linux-gnu" ]]; then - gcc_prefix="aarch64-linux-gnu-" - else - gcc_prefix="" - fi - - # create a "staging" directory - mkdir "$tempdir/$package_name" - mkdir "$tempdir/$package_name/autocomplete" - - # copying the main binary - cp "target/$TARGET/release/$PROJECT_NAME" "$tempdir/$package_name/" - "${gcc_prefix}"strip "$tempdir/$package_name/$PROJECT_NAME" - - # manpage, readme and license - cp target/"$TARGET"/release/build/"$PROJECT_NAME"-*/out/assets/manual/bat.1 "$tempdir/$package_name/$PROJECT_NAME.1" - cp README.md "$tempdir/$package_name" - cp LICENSE-MIT "$tempdir/$package_name" - cp LICENSE-APACHE "$tempdir/$package_name" - - # various autocomplete - # TODO: disabled for now, see issue #372 - # cp target/"$TARGET"/release/build/"$PROJECT_NAME"-*/out/"$PROJECT_NAME".bash "$tempdir/$package_name/autocomplete/${PROJECT_NAME}.bash-completion" - # cp target/"$TARGET"/release/build/"$PROJECT_NAME"-*/out/"$PROJECT_NAME".fish "$tempdir/$package_name/autocomplete" - cp target/"$TARGET"/release/build/"$PROJECT_NAME"-*/out/assets/completions/bat.fish "$tempdir/$package_name/autocomplete/$PROJECT_NAME.fish" - # cp target/"$TARGET"/release/build/"$PROJECT_NAME"-*/out/_"$PROJECT_NAME" "$tempdir/$package_name/autocomplete" - - # archiving - pushd "$tempdir" - tar czf "$out_dir/$package_name.tar.gz" "$package_name"/* - popd - rm -r "$tempdir" -} - -make_deb() { - local tempdir - local architecture - local version - local dpkgname - local conflictname - local gcc_prefix - local homepage - local maintainer - - homepage="https://github.com/sharkdp/bat" - maintainer="David Peter " - - case $TARGET in - x86_64*) - architecture=amd64 - gcc_prefix="" - ;; - i686*) - architecture=i386 - gcc_prefix="" - ;; - aarch64*) - architecture=arm64 - gcc_prefix="aarch64-linux-gnu-" - ;; - arm*hf) - architecture=armhf - gcc_prefix="arm-linux-gnueabihf-" - ;; - *) - echo "make_deb: skipping target '${TARGET}'" >&2 - return 0 - ;; - esac - version=${TRAVIS_TAG#v} - if [[ $TARGET = *musl* ]]; then - dpkgname=$PROJECT_NAME-musl - conflictname=$PROJECT_NAME - else - dpkgname=$PROJECT_NAME - conflictname=$PROJECT_NAME-musl - fi - - tempdir=$(mktemp -d 2>/dev/null || mktemp -d -t tmp) - - # copy the main binary - install -Dm755 "target/$TARGET/release/$PROJECT_NAME" "$tempdir/usr/bin/$PROJECT_NAME" - "${gcc_prefix}"strip "$tempdir/usr/bin/$PROJECT_NAME" - - # manpage - install -Dm644 target/"$TARGET"/release/build/"$PROJECT_NAME"-*/out/assets/manual/bat.1 "$tempdir/usr/share/man/man1/$PROJECT_NAME.1" - gzip --best "$tempdir/usr/share/man/man1/$PROJECT_NAME.1" - - # completions - install -Dm644 target/"$TARGET"/release/build/"$PROJECT_NAME"-*/out/assets/completions/bat.fish "$tempdir/usr/share/fish/vendor_completions.d/$PROJECT_NAME.fish" - - # readme and license - install -Dm644 README.md "$tempdir/usr/share/doc/$PROJECT_NAME/README.md" - install -Dm644 LICENSE-MIT "$tempdir/usr/share/doc/$PROJECT_NAME/LICENSE-MIT" - install -Dm644 LICENSE-APACHE "$tempdir/usr/share/doc/$PROJECT_NAME/LICENSE-APACHE" - cat > "$tempdir/usr/share/doc/$PROJECT_NAME/copyright" < "$tempdir/DEBIAN/control" <