Skip to content

Commit

Permalink
Merge #7
Browse files Browse the repository at this point in the history
7: Add bors r=passcod a=passcod



Co-authored-by: Félix Saparelli <felix@passcod.name>
  • Loading branch information
bors[bot] and passcod committed May 31, 2022
2 parents fd95d64 + e775dbd commit 9424adf
Show file tree
Hide file tree
Showing 7 changed files with 156 additions and 98 deletions.
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

0 comments on commit 9424adf

Please sign in to comment.