From 034d3f87fd859b7e2be18fc4f84c0f4aeefe2748 Mon Sep 17 00:00:00 2001 From: Greg Guthe Date: Fri, 15 Mar 2024 12:58:33 -0400 Subject: [PATCH] migrate CI to GHA disable rustup self update to work around 'rustup.exe" is not a valid subcommand' error for windows CI --- .github/workflows/build.yml | 38 +++++++++++++++++++++++++++++++++++++ .travis.yml | 10 ---------- README.md | 3 +-- appveyor.yml | 15 --------------- update_readme.sh | 3 +-- 5 files changed, 40 insertions(+), 29 deletions(-) create mode 100644 .github/workflows/build.yml delete mode 100644 .travis.yml delete mode 100644 appveyor.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..aef16c1 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,38 @@ +name: cargo-show - build & test +on: + push: + +env: + CARGO_TERM_COLOR: always + RUST_BACKTRACE: 1 + +jobs: + build_and_test: + name: cargo-show - latest + strategy: + fail-fast: false + matrix: + include: + - name: Linux - rust stable + os: ubuntu-latest + toolchain: stable + - name: Linux - rust beta + os: ubuntu-latest + toolchain: beta + - name: Linux - rust nightly + os: ubuntu-latest + toolchain: nightly + - name: OSX - rust stable + os: macos-latest + toolchain: stable + - name: Windows - rust stable + os: windows-latest + toolchain: stable + runs-on: ${{ matrix.os }} + continue-on-error: ${{ matrix.toolchain == 'nightly' }} + steps: + - uses: actions/checkout@v3 + - run: rustup set profile minimal + - run: rustup update --no-self-update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} + - run: cargo build --verbose + - run: cargo test --verbose diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0294aab..0000000 --- a/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: rust -rust: - - stable - - beta - - nightly -matrix: - allow_failures: - - rust: nightly -sudo: required -dist: trusty diff --git a/README.md b/README.md index e1e616a..b9e5401 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,7 @@ ## cargo-show [![crates.io version](https://img.shields.io/crates/v/cargo-show.svg)](https://img.shields.io/crates/v/cargo-show.svg) -[![Build Status](https://travis-ci.org/g-k/cargo-show.svg?branch=master)](https://travis-ci.org/g-k/cargo-show) -[![Build status](https://ci.appveyor.com/api/projects/status/m9cf5vhft7qwisas?svg=true)](https://ci.appveyor.com/project/g-k/cargo-show) +[![Build status](https://github.com/g-k/cargo-show/actions/workflows/build.yml/badge.svg)](https://github.com/g-k/cargo-show/actions/workflows/build.yml) Prints package metadata like pip show, apt-cache show, npm view, gem query, etc. diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index c7f153c..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,15 +0,0 @@ -install: - - ps: Start-FileDownload 'https://static.rust-lang.org/dist/rust-nightly-i686-pc-windows-msvc.exe' - - rust-nightly-i686-pc-windows-msvc.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust" - - SET PATH=%PATH%;C:\Program Files (x86)\Rust\bin - - rustc -V - - cargo -V - -build: false - -test_script: - - cargo build -j4 - - cargo test --verbose -j4 - -artifacts: - - path: ./target/ diff --git a/update_readme.sh b/update_readme.sh index 65d8598..a646c2b 100755 --- a/update_readme.sh +++ b/update_readme.sh @@ -12,8 +12,7 @@ cat > README.md <