diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index d047ba7..948138e 100644 --- a/.github/workflows/check.yml +++ b/.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: @@ -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 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..3181f70 --- /dev/null +++ b/.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 diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml new file mode 100644 index 0000000..7495533 --- /dev/null +++ b/.github/workflows/merge.yml @@ -0,0 +1,62 @@ +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 + - if: "matrix.platform == 'windows'" + shell: powershell + run: cd tests/win10; cargo +${{ matrix.toolchain }} run diff --git a/CARETAKERS.md b/CARETAKERS.md deleted file mode 100644 index 1abfdf4..0000000 --- a/CARETAKERS.md +++ /dev/null @@ -1,39 +0,0 @@ -# Caretaker Maintainership - -_(If this file is included in a project, you can find the list of current caretakers at the bottom.)_ - -In a small classical open-source project, maintainers do a lot, and if maintainers don't have time to do a lot, usually the project stalls. -Finding new maintainers is hard because few people actively want to take over all the responsibilities of a project. -There must be a different way. - -With Caretaker Maintainership, "Maintainers" become "Caretakers". -Caretakers' only mandatory responsibility is to grant Releasers commit and publish access to the project. -Caretakers can of course still do other things as they wish. - -Releasers are one of three kinds of contributors to a Caretaker project: -- Reporters are people who report bugs -- Builders write code, docs, make art, proofread, etc, **and open pull requests** -- Releasers do final polish, add to changelogs, etc as needed, and publish new versions. - -You can of course have multiple roles. -A single-person project will have that person do all or almost all roles. -You're also not restricted to just these roles, or to follow them precisely. -Do whatever fits best! - -Someone who wishes to be a Releaser **must** open an issue or contact the Caretakers in some other way and ask, detailing what they want to do. -That can be as limited as "merge this feature" or as open-ended as "work on the project during my free time". -- If accepted, a Caretaker then gives enough rights or permissions to the new Releaser that they may cut new releases of the project on their own. -- If the Releasership is for a limited purpose, the Releaser loses their rights (either relinquishes them on their own or is taken out of permissions by Caretakers) after they've done their bit. - -**Caretaker maintainership is not suitable for commercial, high-stakes, or security projects!** - -Also you may want to use one of the badges below on your readme and/or add the #caretaker tag to your github description so: -- People who want to contribute to Caretaker projects can find them, and -- People who want to *avoid using* Caretaker projects for whatever reason can do that. - -[![Uses Caretaker Maintainership](https://badgen.net/badge/Caretaker/Maintainership%20👥%20/purple)](https://gist.github.com/passcod/7332390db1813f9bccb07e5cf3a9649b) -[![Uses Caretaker Maintainership](https://flat.badgen.net/badge/Caretaker/Maintainership%20👥%20/purple)](https://gist.github.com/passcod/7332390db1813f9bccb07e5cf3a9649b) - -## Current Caretakers - -- Félix Saparelli, @passcod on github and twitter diff --git a/README.md b/README.md index 4ce7a03..e749544 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -[![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 @@ -10,10 +10,8 @@ _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 diff --git a/bors.toml b/bors.toml new file mode 100644 index 0000000..3fcdf44 --- /dev/null +++ b/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", +#] diff --git a/tests/win10/Cargo.toml b/tests/win10/Cargo.toml index e1dd4b2..bbc854f 100644 --- a/tests/win10/Cargo.toml +++ b/tests/win10/Cargo.toml @@ -1,7 +1,6 @@ [package] name = "clearscreen-test-win10" version = "0.0.0" -edition = "2021" [dependencies] clearscreen = { path = "../.." }