Skip to content

Commit 9d7f438

Browse files
committed
migrate CI to GHA
disable rustup self update to work around 'rustup.exe" is not a valid subcommand' error for windows CI
1 parent d64492f commit 9d7f438

File tree

6 files changed

+69
-29
lines changed

6 files changed

+69
-29
lines changed

.github/workflows/build.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: cargo-show - build & test on Linux
2+
on:
3+
push:
4+
5+
env:
6+
CARGO_TERM_COLOR: always
7+
RUST_BACKTRACE: 1
8+
9+
jobs:
10+
build_and_test:
11+
name: cargo-show - latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
include:
16+
- name: Linux - rust stable
17+
os: ubuntu-latest
18+
toolchain: stable
19+
- name: Linux - rust beta
20+
os: ubuntu-latest
21+
toolchain: beta
22+
- name: Linux - rust nightly
23+
os: ubuntu-latest
24+
toolchain: nightly
25+
runs-on: ${{ matrix.os }}
26+
continue-on-error: ${{ matrix.toolchain == 'nightly' }}
27+
steps:
28+
- uses: actions/checkout@v3
29+
- run: rustup set profile minimal
30+
- run: rustup update --no-self-update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
31+
- run: cargo build --verbose
32+
- run: cargo test --verbose

.github/workflows/build_default.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: cargo-show - build & test on OSX and Windows
2+
on:
3+
push:
4+
branches:
5+
- master
6+
7+
env:
8+
CARGO_TERM_COLOR: always
9+
RUST_BACKTRACE: 1
10+
11+
jobs:
12+
build_and_test:
13+
name: cargo-show - latest
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
include:
18+
- name: OSX - rust stable
19+
os: macos-latest
20+
toolchain: stable
21+
- name: Windows - rust stable
22+
os: windows-latest
23+
toolchain: stable
24+
runs-on: ${{ matrix.os }}
25+
continue-on-error: ${{ matrix.toolchain == 'nightly' }}
26+
steps:
27+
- uses: actions/checkout@v3
28+
- run: rustup set profile minimal
29+
- run: rustup update --no-self-update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
30+
- run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append
31+
if: ${{ matrix.os == 'windows-latest' }}
32+
- run: vcpkg install openssl:x64-windows-static-md
33+
if: ${{ matrix.os == 'windows-latest' }}
34+
- run: cargo build --verbose
35+
- run: cargo test --verbose

.travis.yml

-10
This file was deleted.

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
## cargo-show
22

33
[![crates.io version](https://img.shields.io/crates/v/cargo-show.svg)](https://img.shields.io/crates/v/cargo-show.svg)
4-
[![Build Status](https://travis-ci.org/g-k/cargo-show.svg?branch=master)](https://travis-ci.org/g-k/cargo-show)
5-
[![Build status](https://ci.appveyor.com/api/projects/status/m9cf5vhft7qwisas?svg=true)](https://ci.appveyor.com/project/g-k/cargo-show)
4+
[![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)
65

76
Prints package metadata like pip show, apt-cache show, npm view, gem query, etc.
87

appveyor.yml

-15
This file was deleted.

update_readme.sh

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ cat > README.md <<EOF
1212
## cargo-show
1313
1414
[![crates.io version](https://img.shields.io/crates/v/cargo-show.svg)](https://img.shields.io/crates/v/cargo-show.svg)
15-
[![Build Status](https://travis-ci.org/g-k/cargo-show.svg?branch=master)](https://travis-ci.org/g-k/cargo-show)
16-
[![Build status](https://ci.appveyor.com/api/projects/status/m9cf5vhft7qwisas?svg=true)](https://ci.appveyor.com/project/g-k/cargo-show)
15+
[![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)
1716
1817
Prints package metadata like pip show, apt-cache show, npm view, gem query, etc.
1918

0 commit comments

Comments
 (0)