clap/.github/workflows/rust-next.yml

118 lines
3.1 KiB
YAML
Raw Normal View History

2021-11-17 19:55:28 +00:00
name: rust-next
2023-03-29 19:33:22 +00:00
permissions:
contents: read
2021-11-17 19:55:28 +00:00
on:
schedule:
- cron: '3 3 3 * *'
2023-03-29 19:33:22 +00:00
env:
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
CLICOLOR: 1
2024-01-18 15:22:25 +00:00
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
2021-11-17 19:55:28 +00:00
jobs:
test:
name: Test
strategy:
matrix:
build: [stable, linux, windows, mac, nightly, minimal, default, next]
2021-11-17 19:55:28 +00:00
include:
- build: stable
2021-11-17 19:55:28 +00:00
os: ubuntu-latest
rust: "stable"
features: "full"
- build: linux
os: ubuntu-latest
rust: "beta"
features: "full"
2021-11-17 19:55:28 +00:00
- build: windows
os: windows-latest
rust: "beta"
2021-11-17 19:55:28 +00:00
features: "full"
- build: mac
2024-05-04 19:59:40 +00:00
os: macos-14
2021-11-17 19:55:28 +00:00
rust: "beta"
features: "full"
- build: nightly
os: ubuntu-latest
rust: "nightly"
features: "full"
- build: minimal
os: ubuntu-latest
rust: "stable"
features: "minimal"
- build: default
os: ubuntu-latest
rust: "stable"
features: "default"
- build: next
os: ubuntu-latest
rust: "stable"
features: "next"
2021-11-17 19:55:28 +00:00
continue-on-error: ${{ matrix.rust != 'stable' }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
2021-11-17 19:55:28 +00:00
- name: Install Rust
2023-03-29 19:33:22 +00:00
uses: dtolnay/rust-toolchain@stable
2021-11-17 19:55:28 +00:00
with:
toolchain: ${{ matrix.rust }}
- uses: Swatinem/rust-cache@v2
2024-06-26 01:20:20 +00:00
- name: Install shells
if: runner.os == 'Linux'
run: sudo apt-get install -y elvish fish zsh
2021-11-17 19:55:28 +00:00
- name: Build
run: make build-${{matrix.features}}
- name: Test
run: make test-${{matrix.features}}
2021-12-07 14:24:13 +00:00
- name: Test (benches)
run: make test-${{matrix.features}} ARGS='--workspace --benches'
- name: Test (ultra-minimal)
if: matrix.build == 'minimal'
run: make test-minimal ARGS='--manifest-path Cargo.toml'
2023-07-26 16:40:03 +00:00
- name: Test dynamic completions
run: cargo test -p clap_complete -F unstable-dynamic
2023-08-11 18:29:06 +00:00
latest:
name: "Check latest dependencies"
strategy:
matrix:
build: [stable]
include:
- build: stable
os: ubuntu-latest
rust: "stable"
features: "full"
runs-on: ${{ matrix.os }}
2023-08-11 18:29:06 +00:00
steps:
- name: Checkout repository
uses: actions/checkout@v4
2023-08-11 18:29:06 +00:00
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@cargo-hack
2024-06-26 01:20:20 +00:00
- name: Install shells
if: runner.os == 'Linux'
run: sudo apt-get install -y elvish fish zsh
2023-08-11 18:29:06 +00:00
- name: Update dependencues
run: cargo update
- name: Build
run: make build-${{matrix.features}}
- name: Test
run: make test-${{matrix.features}}
- name: Test (benches)
run: make test-${{matrix.features}} ARGS='--workspace --benches'
- name: Test (ultra-minimal)
if: matrix.build == 'minimal'
run: make test-minimal ARGS='--manifest-path Cargo.toml'
- name: Test dynamic completions
run: cargo test -p clap_complete -F unstable-dynamic