2019-11-05 07:24:14 +00:00
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
name: CI
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
linux:
|
|
|
|
name: Linux
|
|
|
|
runs-on: ubuntu-latest
|
2020-08-02 14:17:57 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
rust: ["1.44.0", "stable"]
|
2019-11-05 07:24:14 +00:00
|
|
|
steps:
|
|
|
|
- name: "Install dependencies"
|
|
|
|
run: sudo apt-get install libncurses5-dev
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: default
|
2020-08-02 14:17:57 +00:00
|
|
|
toolchain: ${{ matrix.rust }}
|
2019-11-05 07:24:14 +00:00
|
|
|
override: true
|
|
|
|
- name: "Format"
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: fmt
|
|
|
|
args: --all -- --check
|
|
|
|
- name: "Check"
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: check
|
|
|
|
args: --examples
|
|
|
|
- name: "Check (crossterm)"
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: check
|
|
|
|
args: --no-default-features --features=crossterm --example crossterm_demo
|
|
|
|
- name: "Check (rustbox)"
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: test
|
|
|
|
args: --no-default-features --features=rustbox --example rustbox_demo
|
|
|
|
- name: "Check (curses)"
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: check
|
|
|
|
args: --no-default-features --features=curses --example curses_demo
|
|
|
|
- name: "Test"
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: test
|
2020-08-02 16:30:52 +00:00
|
|
|
env:
|
|
|
|
RUST_BACKTRACE: full
|
2019-11-05 07:24:14 +00:00
|
|
|
- name: "Clippy"
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: clippy
|
2020-05-16 22:51:57 +00:00
|
|
|
args: --all-targets --all-features -- -D warnings
|
2019-11-05 07:24:14 +00:00
|
|
|
windows:
|
|
|
|
name: Windows
|
|
|
|
runs-on: windows-latest
|
2020-08-02 14:17:57 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
rust: ["1.44.0", "stable"]
|
2019-11-05 07:24:14 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: default
|
2020-08-02 14:17:57 +00:00
|
|
|
toolchain: ${{ matrix.rust }}
|
2019-11-05 07:24:14 +00:00
|
|
|
override: true
|
|
|
|
- name: "Check (crossterm)"
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: check
|
|
|
|
args: --no-default-features --features=crossterm --example crossterm_demo
|
|
|
|
- name: "Test (crossterm)"
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: test
|
|
|
|
args: --no-default-features --features=crossterm --tests --examples
|
2020-08-02 16:30:52 +00:00
|
|
|
env:
|
|
|
|
RUST_BACKTRACE: full
|