mirror of
https://github.com/clap-rs/clap
synced 2024-12-14 06:42:33 +00:00
Merge #1845
1845: Use github actions for windows r=CreepySkeleton a=pksunkara Co-authored-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
This commit is contained in:
commit
857b440856
7 changed files with 141 additions and 65 deletions
|
@ -17,12 +17,6 @@ stages:
|
|||
rust: 1.40.0
|
||||
strategy:
|
||||
matrix:
|
||||
MSVC 32-bit:
|
||||
image: vs2017-win2016
|
||||
target: i686-pc-windows-msvc
|
||||
MSVC 64-bit:
|
||||
image: vs2017-win2016
|
||||
target: x86_64-pc-windows-msvc
|
||||
MinGW 32-bit:
|
||||
image: vs2017-win2016
|
||||
target: i686-pc-windows-gnu
|
||||
|
@ -36,18 +30,9 @@ stages:
|
|||
fetchDepth: 1
|
||||
path: clap
|
||||
displayName: Checkout repository
|
||||
- task: Cache@2
|
||||
inputs:
|
||||
key: cargo | "$(rust)" | $(target) | Cargo.toml
|
||||
path: C:\Rust\.cargo
|
||||
displayName: Cache cargo
|
||||
- script: rustup default $(rust)-$(target)
|
||||
displayName: Install rust
|
||||
- script: cargo test --no-default-features --features "std cargo" -p clap:3.0.0-beta.1
|
||||
displayName: Test with almost no features
|
||||
- script: cargo test --features "yaml unstable"
|
||||
displayName: Test with most features
|
||||
- script: |
|
||||
rmdir /Q /S C:\Rust\.cargo\registry\src
|
||||
displayName: Cleanup cache
|
||||
continueOnError: true
|
||||
|
|
2
.github/workflows/benchmark.yml
vendored
2
.github/workflows/benchmark.yml
vendored
|
@ -46,8 +46,6 @@ jobs:
|
|||
external-data-json-path: ./benchmark-data.json
|
||||
github-token: ${{ github.token }}
|
||||
annotate-always: true
|
||||
- name: temporary
|
||||
run: rm ~/.cargo/bin/cargo-cache
|
||||
- name: Install cargo-cache
|
||||
uses: actions-rs/install@v0.1
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
|
|
139
.github/workflows/ci.yml
vendored
Normal file
139
.github/workflows/ci.yml
vendored
Normal file
|
@ -0,0 +1,139 @@
|
|||
name: CI
|
||||
on:
|
||||
push:
|
||||
branches: [staging, trying]
|
||||
pull_request:
|
||||
branches: [master]
|
||||
types: [opened, reopened, synchronize]
|
||||
jobs:
|
||||
ci:
|
||||
name: CI
|
||||
needs: [test, test-release]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Done
|
||||
run: exit 0
|
||||
test:
|
||||
name: Tests
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [windows-latest, macos-latest, ubuntu-latest]
|
||||
rust: [1.40.0]
|
||||
target:
|
||||
- i686-pc-windows-msvc
|
||||
- x86_64-pc-windows-msvc
|
||||
# - i686-pc-windows-gnu
|
||||
# - x86_64-pc-windows-gnu
|
||||
# - i686-unknown-linux-gnu
|
||||
- x86_64-unknown-linux-gnu
|
||||
- x86_64-apple-darwin
|
||||
features: [all, none]
|
||||
exclude:
|
||||
- os: windows-latest
|
||||
target: x86_64-apple-darwin
|
||||
# - os: windows-latest
|
||||
# target: i686-unknown-linux-gnu
|
||||
- os: windows-latest
|
||||
target: x86_64-unknown-linux-gnu
|
||||
- os: macos-latest
|
||||
target: i686-pc-windows-msvc
|
||||
- os: macos-latest
|
||||
target: x86_64-pc-windows-msvc
|
||||
# - os: macos-latest
|
||||
# target: i686-pc-windows-gnu
|
||||
# - os: macos-latest
|
||||
# target: x86_64-pc-windows-gnu
|
||||
# - os: macos-latest
|
||||
# target: i686-unknown-linux-gnu
|
||||
- os: macos-latest
|
||||
target: x86_64-unknown-linux-gnu
|
||||
- os: ubuntu-latest
|
||||
target: i686-pc-windows-msvc
|
||||
- os: ubuntu-latest
|
||||
target: x86_64-pc-windows-msvc
|
||||
# - os: ubuntu-latest
|
||||
# target: i686-pc-windows-gnu
|
||||
# - os: ubuntu-latest
|
||||
# target: x86_64-pc-windows-gnu
|
||||
- os: ubuntu-latest
|
||||
target: x86_64-apple-darwin
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Install rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: ${{ matrix.rust }}
|
||||
target: ${{ matrix.target }}
|
||||
override: true
|
||||
- name: Ready cache
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
run: sudo chown -R $(whoami):$(id -ng) ~/.cargo/
|
||||
- name: Cache cargo
|
||||
uses: actions/cache@v1
|
||||
id: cache
|
||||
with:
|
||||
path: ~/.cargo
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
|
||||
- name: Test almost no features
|
||||
uses: actions-rs/cargo@v1
|
||||
if: matrix.features == 'none'
|
||||
with:
|
||||
command: test
|
||||
args: --target ${{ matrix.target }} --no-default-features --features "std cargo" -p clap:3.0.0-beta.1
|
||||
- name: Test all features
|
||||
uses: actions-rs/cargo@v1
|
||||
if: matrix.features == 'all'
|
||||
with:
|
||||
command: test
|
||||
args: --target ${{ matrix.target }} --features "yaml unstable"
|
||||
- name: Install cargo-cache
|
||||
uses: actions-rs/install@v0.1
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
with:
|
||||
crate: cargo-cache
|
||||
use-tool-cache: true
|
||||
- name: Cleanup cache
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: cargo cache -a
|
||||
# https://github.com/rust-lang/rust/issues/29497
|
||||
- name: Cleanup windows cache
|
||||
if: steps.cache.outputs.cache-hit != 'true' && matrix.os == 'windows-latest'
|
||||
shell: bash
|
||||
run: |
|
||||
rm -rf ~/.cargo/git/checkouts
|
||||
rm -rf ~/.cargo/registry/index
|
||||
test-release:
|
||||
name: Release Profile Tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Install rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Ready cache
|
||||
run: sudo chown -R $(whoami):$(id -ng) ~/.cargo/
|
||||
- name: Cache cargo
|
||||
uses: actions/cache@v1
|
||||
id: cache
|
||||
with:
|
||||
path: ~/.cargo
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
|
||||
- name: Test
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: test
|
||||
args: --release --features "yaml unstable"
|
||||
- name: Install cargo-cache
|
||||
uses: actions-rs/install@v0.1
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
with:
|
||||
crate: cargo-cache
|
||||
use-tool-cache: true
|
||||
- name: Cleanup cache
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: cargo cache -a
|
40
.github/workflows/linux.yml
vendored
40
.github/workflows/linux.yml
vendored
|
@ -1,40 +0,0 @@
|
|||
name: Linux
|
||||
on:
|
||||
push:
|
||||
branches: [staging, trying]
|
||||
pull_request:
|
||||
branches: [master]
|
||||
types: [opened, reopened, synchronize]
|
||||
jobs:
|
||||
test-release:
|
||||
name: Release Profile Tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Install rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Ready cache
|
||||
run: sudo chown -R $(whoami):$(id -ng) ~/.cargo/
|
||||
- name: Cache cargo
|
||||
uses: actions/cache@v1
|
||||
id: cache
|
||||
with:
|
||||
path: ~/.cargo
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
|
||||
- name: Test
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: test
|
||||
args: --release --features "yaml unstable"
|
||||
- name: Install cargo-cache
|
||||
uses: actions-rs/install@v0.1
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
with:
|
||||
crate: cargo-cache
|
||||
use-tool-cache: true
|
||||
- name: Cleanup cache
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: cargo cache -a
|
|
@ -28,9 +28,6 @@ jobs:
|
|||
- rust: nightly
|
||||
fast_finish: true
|
||||
include:
|
||||
- os: osx
|
||||
rust: 1.40.0
|
||||
- rust: 1.40.0
|
||||
- {}
|
||||
- rust: beta
|
||||
- rust: nightly
|
||||
|
|
|
@ -54,9 +54,6 @@ harness = false
|
|||
name = "06_rustup"
|
||||
|
||||
[badges]
|
||||
travis-ci = { repository = "clap-rs/clap", branch = "master" }
|
||||
azure-devops = { project = "clap-rs/clap", pipeline = "clap-rs.clap" }
|
||||
coveralls = { repository = "clap-rs/clap", branch = "master" }
|
||||
is-it-maintained-issue-resolution = { repository = "clap-rs/clap" }
|
||||
is-it-maintained-open-issues = { repository = "clap-rs/clap" }
|
||||
maintenance = {status = "actively-developed"}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
status = [
|
||||
"continuous-integration/travis-ci/push",
|
||||
"clap-rs.clap",
|
||||
"Release Profile Tests",
|
||||
"CI",
|
||||
]
|
||||
pr_status = [
|
||||
"continuous-integration/travis-ci/pr",
|
||||
"clap-rs.clap",
|
||||
"Release Profile Tests",
|
||||
"CI",
|
||||
]
|
||||
timeout_sec = 7200
|
||||
prerun_timeout_sec = 7200
|
||||
|
|
Loading…
Reference in a new issue