2020-04-20 21:16:33 +00:00
|
|
|
name: CI
|
|
|
|
on:
|
|
|
|
push:
|
2020-11-28 00:50:18 +00:00
|
|
|
branches: [master, staging, trying]
|
2020-04-20 21:16:33 +00:00
|
|
|
jobs:
|
2020-04-21 07:44:54 +00:00
|
|
|
ci:
|
|
|
|
name: CI
|
2021-10-01 19:55:41 +00:00
|
|
|
needs: [test, wasm]
|
2020-04-21 07:44:54 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Done
|
|
|
|
run: exit 0
|
2020-04-20 21:16:33 +00:00
|
|
|
test:
|
|
|
|
name: Tests
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2021-07-29 20:27:20 +00:00
|
|
|
rust: [1.54.0, stable, beta]
|
2020-11-28 00:50:18 +00:00
|
|
|
os: [windows-latest, macos-latest, ubuntu-latest]
|
|
|
|
target:
|
|
|
|
- i686-pc-windows-msvc
|
|
|
|
- x86_64-pc-windows-msvc
|
2021-04-13 21:17:54 +00:00
|
|
|
- i686-pc-windows-gnu
|
|
|
|
- x86_64-pc-windows-gnu
|
2020-11-28 00:50:18 +00:00
|
|
|
- x86_64-unknown-linux-gnu
|
|
|
|
- i686-unknown-linux-gnu
|
|
|
|
- x86_64-apple-darwin
|
|
|
|
features:
|
|
|
|
- none
|
|
|
|
- all
|
|
|
|
- release
|
|
|
|
exclude:
|
|
|
|
- features: release
|
|
|
|
rust: stable
|
|
|
|
- features: release
|
|
|
|
rust: beta
|
|
|
|
- os: windows-latest
|
2020-11-06 18:02:43 +00:00
|
|
|
target: x86_64-apple-darwin
|
|
|
|
- os: windows-latest
|
2020-11-28 00:50:18 +00:00
|
|
|
target: x86_64-unknown-linux-gnu
|
2020-11-06 18:02:43 +00:00
|
|
|
- os: windows-latest
|
2020-11-28 00:50:18 +00:00
|
|
|
target: i686-unknown-linux-gnu
|
|
|
|
- os: macos-latest
|
2020-11-06 18:02:43 +00:00
|
|
|
target: i686-pc-windows-msvc
|
2020-11-28 00:50:18 +00:00
|
|
|
- os: macos-latest
|
2020-11-06 18:02:43 +00:00
|
|
|
target: x86_64-pc-windows-msvc
|
2021-04-13 21:17:54 +00:00
|
|
|
- os: macos-latest
|
|
|
|
target: i686-pc-windows-gnu
|
|
|
|
- os: macos-latest
|
|
|
|
target: x86_64-pc-windows-gnu
|
2020-11-28 00:50:18 +00:00
|
|
|
- os: macos-latest
|
2020-04-20 21:16:33 +00:00
|
|
|
target: x86_64-unknown-linux-gnu
|
2020-11-28 00:50:18 +00:00
|
|
|
- os: macos-latest
|
|
|
|
target: i686-unknown-linux-gnu
|
2020-04-20 21:16:33 +00:00
|
|
|
- os: ubuntu-latest
|
2020-11-28 00:50:18 +00:00
|
|
|
target: i686-pc-windows-msvc
|
2020-04-20 21:16:33 +00:00
|
|
|
- os: ubuntu-latest
|
2020-11-28 00:50:18 +00:00
|
|
|
target: x86_64-pc-windows-msvc
|
2021-04-13 21:17:54 +00:00
|
|
|
- os: ubuntu-latest
|
|
|
|
target: i686-pc-windows-gnu
|
|
|
|
- os: ubuntu-latest
|
|
|
|
target: x86_64-pc-windows-gnu
|
2020-04-20 21:16:33 +00:00
|
|
|
- os: ubuntu-latest
|
2020-11-28 00:50:18 +00:00
|
|
|
target: x86_64-apple-darwin
|
2020-04-20 21:16:33 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
|
|
- name: Install rust
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
2020-10-09 18:48:19 +00:00
|
|
|
profile: minimal
|
2020-04-20 21:16:33 +00:00
|
|
|
toolchain: ${{ matrix.rust }}
|
|
|
|
target: ${{ matrix.target }}
|
|
|
|
override: true
|
2020-11-06 18:02:43 +00:00
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install linker
|
2021-04-13 21:17:54 +00:00
|
|
|
if: matrix.target == 'i686-pc-windows-gnu'
|
|
|
|
uses: egor-tensin/setup-mingw@v2
|
|
|
|
with:
|
|
|
|
platform: x86
|
|
|
|
- name: Install linker
|
|
|
|
if: matrix.target == 'x86_64-pc-windows-gnu'
|
|
|
|
uses: egor-tensin/setup-mingw@v2
|
|
|
|
- name: Install linker
|
2020-11-06 18:02:43 +00:00
|
|
|
if: matrix.target == 'i686-unknown-linux-gnu'
|
2021-03-13 06:10:56 +00:00
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install gcc-multilib
|
2020-04-20 21:16:33 +00:00
|
|
|
- name: Test almost no features
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
if: matrix.features == 'none'
|
|
|
|
with:
|
|
|
|
command: test
|
2021-08-14 22:40:49 +00:00
|
|
|
args: --target ${{ matrix.target }} --no-default-features --features "std cargo" -p clap:3.0.0-beta.4
|
2020-04-20 21:16:33 +00:00
|
|
|
- name: Test all features
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
if: matrix.features == 'all'
|
|
|
|
with:
|
|
|
|
command: test
|
2021-10-09 15:44:31 +00:00
|
|
|
args: --target ${{ matrix.target }} --features "wrap_help yaml regex unstable-replace"
|
2021-04-13 21:40:37 +00:00
|
|
|
- name: Check debug
|
2021-02-17 03:58:36 +00:00
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
if: matrix.features == 'all'
|
|
|
|
with:
|
|
|
|
command: check
|
2021-10-09 15:44:31 +00:00
|
|
|
args: --target ${{ matrix.target }} --features "wrap_help yaml regex unstable-replace debug"
|
2020-11-28 00:50:18 +00:00
|
|
|
- name: Test release
|
2020-04-20 21:16:33 +00:00
|
|
|
uses: actions-rs/cargo@v1
|
2020-11-28 00:50:18 +00:00
|
|
|
if: matrix.features == 'release'
|
2020-04-20 21:16:33 +00:00
|
|
|
with:
|
|
|
|
command: test
|
2021-03-13 06:10:56 +00:00
|
|
|
args: --target ${{ matrix.target }} --features "wrap_help yaml regex" --release
|
2020-11-06 18:02:43 +00:00
|
|
|
nightly:
|
|
|
|
name: Nightly Tests
|
2021-05-25 22:42:55 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
features:
|
|
|
|
- none
|
|
|
|
- all
|
|
|
|
- release
|
2020-11-06 18:02:43 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Install rust
|
|
|
|
uses: actions-rs/toolchain@v1
|
2020-04-20 21:16:33 +00:00
|
|
|
with:
|
2020-11-06 18:02:43 +00:00
|
|
|
toolchain: nightly
|
|
|
|
override: true
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Test almost no features
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
if: matrix.features == 'none'
|
|
|
|
with:
|
|
|
|
command: test
|
2021-08-14 22:40:49 +00:00
|
|
|
args: --no-default-features --features "std cargo" -p clap:3.0.0-beta.4
|
2020-11-06 18:02:43 +00:00
|
|
|
- name: Test all features
|
|
|
|
uses: actions-rs/cargo@v1
|
2021-05-25 22:42:55 +00:00
|
|
|
if: matrix.features == 'all'
|
2020-11-06 18:02:43 +00:00
|
|
|
with:
|
|
|
|
command: test
|
2021-10-09 15:44:31 +00:00
|
|
|
args: --features "wrap_help yaml regex unstable-replace"
|
2021-05-25 22:42:55 +00:00
|
|
|
- name: Check debug
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
if: matrix.features == 'all'
|
|
|
|
with:
|
|
|
|
command: check
|
2021-10-09 15:44:31 +00:00
|
|
|
args: --features "wrap_help yaml regex unstable-replace debug"
|
2021-05-25 22:42:55 +00:00
|
|
|
- name: Test release
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
if: matrix.features == 'release'
|
|
|
|
with:
|
|
|
|
command: test
|
|
|
|
args: --features "wrap_help yaml regex" --release
|
2020-11-06 18:02:43 +00:00
|
|
|
wasm:
|
|
|
|
name: Wasm Check
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
target: [wasm32-unknown-unknown, wasm32-wasi]
|
|
|
|
steps:
|
|
|
|
- name: Install rust
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
2021-07-29 20:27:20 +00:00
|
|
|
toolchain: 1.54.0
|
2020-11-06 18:02:43 +00:00
|
|
|
target: ${{ matrix.target }}
|
|
|
|
override: true
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Check
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: check
|
2021-03-13 06:10:56 +00:00
|
|
|
args: --target ${{ matrix.target }} --features "yaml regex"
|