ratatui/.github/workflows/ci.yml

72 lines
2.2 KiB
YAML
Raw Normal View History

on:
push:
branches:
- master
pull_request:
branches:
- master
2019-11-05 07:24:14 +00:00
name: CI
env:
2022-08-14 12:42:47 +00:00
CI_CARGO_MAKE_VERSION: 0.35.16
2019-11-05 07:24:14 +00:00
jobs:
linux:
name: Linux
runs-on: ubuntu-latest
strategy:
matrix:
rust: ["1.59.0", "stable"]
2019-11-05 07:24:14 +00:00
steps:
- uses: hecrj/setup-rust-action@967aec96c6a27a0ce15c1dac3aaba332d60565e2
with:
rust-version: ${{ matrix.rust }}
components: rustfmt,clippy
2019-11-05 07:24:14 +00:00
- uses: actions/checkout@v1
- name: "Get cargo bin directory"
id: cargo-bin-dir
run: echo "::set-output name=dir::$HOME/.cargo/bin"
- name: "Cache cargo make"
id: cache-cargo-make
uses: actions/cache@v2
2019-11-05 07:24:14 +00:00
with:
path: ${{ steps.cargo-bin-dir.outputs.dir }}/cargo-make
key: ${{ runner.os }}-${{ matrix.rust }}-cargo-make-${{ env.CI_CARGO_MAKE_VERSION }}
- name: "Install cargo-make"
if: steps.cache-cargo-make.outputs.cache-hit != 'true'
run: cargo install cargo-make --version ${{ env.CI_CARGO_MAKE_VERSION }}
2021-11-11 14:56:37 +00:00
- name: "Format / Build / Test"
run: cargo make ci
env:
RUST_BACKTRACE: full
2019-11-05 07:24:14 +00:00
windows:
name: Windows
runs-on: windows-latest
strategy:
matrix:
rust: ["1.59.0", "stable"]
2019-11-05 07:24:14 +00:00
steps:
- uses: actions/checkout@v1
- uses: hecrj/setup-rust-action@967aec96c6a27a0ce15c1dac3aaba332d60565e2
2019-11-05 07:24:14 +00:00
with:
rust-version: ${{ matrix.rust }}
components: rustfmt,clippy
- uses: actions/checkout@v1
- name: "Get cargo bin directory"
id: cargo-bin-dir
run: echo "::set-output name=dir::$HOME\.cargo\bin"
- name: "Cache cargo make"
id: cache-cargo-make
uses: actions/cache@v2
with:
path: ${{ steps.cargo-bin-dir.outputs.dir }}\cargo-make.exe
key: ${{ runner.os }}-${{ matrix.rust }}-cargo-make-${{ env.CI_CARGO_MAKE_VERSION }}
- name: "Install cargo-make"
if: steps.cache-cargo-make.outputs.cache-hit != 'true'
run: cargo install cargo-make --version ${{ env.CI_CARGO_MAKE_VERSION }}
2021-11-11 14:56:37 +00:00
- name: "Format / Build / Test"
run: cargo make ci
env:
RUST_BACKTRACE: full