Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bors #7

Merged
merged 6 commits into from May 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
92 changes: 41 additions & 51 deletions .github/workflows/check.yml
@@ -1,22 +1,17 @@
name: PR feedback
on:
pull_request:
push:
branches:
- main
- try/**

name: Checks & Tests

jobs:
check:
clippy:
strategy:
matrix:
platform:
- ubuntu
- windows
- macos
include:
- platform: macos
- platform: ubuntu
- platform: windows

name: Test on ${{ matrix.platform }}
name: Clippy on ${{ matrix.platform }}
runs-on: "${{ matrix.platform }}-latest"

steps:
Expand All @@ -25,60 +20,55 @@ jobs:
with:
profile: minimal
toolchain: stable
override: true
default: true

- run: rustup component add clippy
- uses: actions-rs/cargo@v1
with:
command: check
- uses: actions-rs/cargo@v1
with:
command: check
args: --features windows-console
# check to make sure it keeps compiling, but this is unsupported buggy code for now
command: clippy

- uses: actions-rs/cargo@v1
if: matrix.platform != 'windows'
with:
command: test
- if: matrix.platform == 'windows'
shell: powershell
run: cargo test --doc
- if: matrix.platform == 'windows'
shell: powershell
run: cargo test --test platformed terminfo
- if: matrix.platform == 'windows'
shell: powershell
run: cargo test --test platformed xterm
- if: matrix.platform == 'windows'
shell: powershell
run: cargo test --test platformed tput
- if: matrix.platform == 'windows'
shell: powershell
run: cargo test --test platformed windows_cls
# I've absolutely tested the windows_vt things LOCALLY but they DON'T WORK IN CI
# I don't know why and at this point I'm very very tired. If you know, help pls.
- if: matrix.platform == 'windows'
shell: powershell
run: cargo test --test platformed vt_ris
- if: matrix.platform == 'windows'
shell: powershell
run: cd tests/win10; cargo run
fmt-check:
name: Check formatting
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: clippy
command: fmt
args: --check

windows-console:
name: Check windows-console feature compiles
runs-on: windows-latest

msrv:
name: Check on MSRV
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.51.0
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: check
args: --features windows-console
# check to make sure it keeps compiling, but this is unsupported buggy code for now

windows-tests-msrv:
name: Check windows-10 tests compile on MSRV
runs-on: windows-latest

steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.51.0
override: true
- run: cd tests/win10; cargo check
28 changes: 28 additions & 0 deletions .github/workflows/main.yml
@@ -0,0 +1,28 @@
name: Main branch
on:
push:
branches:
- main

jobs:
check:
strategy:
matrix:
include:
- platform: macos
- platform: ubuntu
- platform: windows

name: Check on ${{ matrix.platform }}
runs-on: "${{ matrix.platform }}-latest"

steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
default: true
- uses: actions-rs/cargo@v1
with:
command: check
64 changes: 64 additions & 0 deletions .github/workflows/merge.yml
@@ -0,0 +1,64 @@
name: Merge (with Bors)
on:
push:
branches:
- staging
- trying

jobs:
check:
strategy:
matrix:
include:
- platform: macos
toolchain: stable
- platform: macos
toolchain: 1.51.0
- platform: ubuntu
toolchain: stable
- platform: ubuntu
toolchain: 1.51.0
- platform: windows
toolchain: stable
- platform: windows
toolchain: 1.51.0

name: Test on ${{ matrix.platform }} with Rust ${{ matrix.toolchain }}
runs-on: "${{ matrix.platform }}-latest"

steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: "${{ matrix.toolchain }}"
default: true
- uses: actions-rs/cargo@v1
if: "matrix.platform != 'windows'"
with:
command: test
- if: "matrix.platform == 'windows'"
shell: powershell
run: cargo test --doc
- if: "matrix.platform == 'windows'"
shell: powershell
run: cargo test --test platformed terminfo
- if: "matrix.platform == 'windows'"
shell: powershell
run: cargo test --test platformed xterm
- if: "matrix.platform == 'windows'"
shell: powershell
run: cargo test --test platformed tput
- if: "matrix.platform == 'windows'"
shell: powershell
run: cargo test --test platformed windows_cls
# I've absolutely tested the windows_vt things LOCALLY but they DON'T WORK IN CI
# I don't know why and at this point I'm very very tired. If you know, help pls.
- if: "matrix.platform == 'windows'"
shell: powershell
run: cargo test --test platformed vt_ris

# remove toolchain restriction when bumping msrv above 1.51
- if: "matrix.platform == 'windows' && matrix.toolchain == 'stable'"
shell: powershell
run: cd tests/win10; cargo run
39 changes: 0 additions & 39 deletions CARETAKERS.md

This file was deleted.

12 changes: 5 additions & 7 deletions README.md
@@ -1,19 +1,17 @@
[![Crate release version](https://flat.badgen.net/crates/v/clearscreen)](https://crates.io/crates/clearscreen)
[![Crate license: Apache 2.0 or MIT](https://flat.badgen.net/badge/license/Apache%202.0%20or%20MIT)][copyright]
![MSRV: 1.51.0 (breaking)](https://flat.badgen.net/badge/MSRV/1.51.0%20%28breaking%29/green)
[![CI status](https://github.com/watchexec/clearscreen/actions/workflows/check.yml/badge.svg)](https://github.com/watchexec/clearscreen/actions/workflows/check.yml)
[![Uses Caretaker Maintainership](https://flat.badgen.net/badge/Caretaker/Maintainership%20👥%20/purple)][caretaker]
[![Crate release version](https://badgen.net/crates/v/clearscreen)](https://crates.io/crates/clearscreen)
[![Crate license: Apache 2.0 or MIT](https://badgen.net/badge/license/Apache%202.0%20or%20MIT)][copyright]
![MSRV: 1.51.0 (breaking)](https://badgen.net/badge/MSRV/1.51.0%20%28breaking%29/green)
[![Bors enabled](https://bors.tech/images/badge_small.svg)](https://app.bors.tech/repositories/45671)
[![CI status on main branch](https://github.com/watchexec/clearscreen/actions/workflows/main.yml/badge.svg)](https://github.com/watchexec/clearscreen/actions/workflows/main.yml)

# ClearScreen

_Cross-platform terminal screen clearing library._

- **[API documentation][docs]**.
- [Dual-licensed][copyright] with Apache 2.0 and MIT.
- Uses [Caretaker Maintainership][caretaker].
- Minimum Supported Rust Version: 1.51.0.

[caretaker]: ./CARETAKERS.md
[copyright]: ./COPYRIGHT
[docs]: https://docs.rs/clearscreen

Expand Down
18 changes: 18 additions & 0 deletions bors.toml
@@ -0,0 +1,18 @@
delete_merged_branches = true
update_base_for_deletes = true

status = [
"Test on macos with Rust stable",
"Test on ubuntu with Rust stable",
"Test on windows with Rust stable",
"Test on macos with Rust 1.51.0",
"Test on ubuntu with Rust 1.51.0",
"Test on windows with Rust 1.51.0",
]

# Disabled until https://github.com/bors-ng/bors-ng/issues/1434 is fixed
#pr_status = [
# "Clippy on macos",
# "Clippy on ubuntu",
# "Clippy on windows",
#]
1 change: 0 additions & 1 deletion tests/win10/Cargo.toml
@@ -1,7 +1,6 @@
[package]
name = "clearscreen-test-win10"
version = "0.0.0"
edition = "2021"

[dependencies]
clearscreen = { path = "../.." }
Expand Down