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

Modernise repo, do updates #11

Merged
merged 6 commits into from Dec 28, 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
14 changes: 14 additions & 0 deletions .github/dependabot.yml
@@ -0,0 +1,14 @@
# Dependabot dependency version checks / updates

version: 2
updates:
- package-ecosystem: "github-actions"
# Workflow files stored in the
# default location of `.github/workflows`
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "daily"
12 changes: 0 additions & 12 deletions .github/workflows/audit.yml

This file was deleted.

74 changes: 0 additions & 74 deletions .github/workflows/check.yml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/main.yml

This file was deleted.

64 changes: 0 additions & 64 deletions .github/workflows/merge.yml

This file was deleted.

58 changes: 58 additions & 0 deletions .github/workflows/tests.yml
@@ -0,0 +1,58 @@
name: Tests
on:
workflow_dispatch:
pull_request:
push:
branches:
- main

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

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

steps:
- uses: actions/checkout@v3

- name: Configure toolchain
run: |
rustup toolchain install --profile minimal --no-self-update ${{ matrix.toolchain }}
rustup default ${{ matrix.toolchain }}

- if: "matrix.platform != 'windows'"
run: cargo test

# the enumeration of tests is because windows_vt tests don't work in CI somehow
# the Invoke-NativeCommand thing is because powershell is fucking insane
# ref: https://stackoverflow.com/questions/11450153/powershell-analogue-of-bashs-set-e
- if: "matrix.platform == 'windows'"
shell: powershell
run: |
function Invoke-NativeCommand {
$command = $args[0]
$arguments = $args[1..($args.Length)]
& $command @arguments
if ($LastExitCode -ne 0) {
Write-Error "Exit code $LastExitCode while running $command $arguments"
}
}

Invoke-NativeCommand cargo test --doc
Invoke-NativeCommand cargo test --test platformed terminfo
Invoke-NativeCommand cargo test --test platformed xterm
Invoke-NativeCommand cargo test --test platformed tput
Invoke-NativeCommand cargo test --test platformed windows_cls
Invoke-NativeCommand cargo test --test platformed vt_ris

cd tests/win10
Invoke-NativeCommand cargo run
5 changes: 5 additions & 0 deletions CHANGELOG.md
Expand Up @@ -2,6 +2,11 @@

## Next (YYYY-MM-DD)

- Don't use BORS.
- Update dependencies.
- Update to nix 0.26.
- Change MSRV policy to stable-5 supported, and bump MSRV to 1.60.0.

## v1.0.10 (2022-06-01)

- Use BORS.
Expand Down
9 changes: 5 additions & 4 deletions Cargo.toml
Expand Up @@ -12,19 +12,20 @@ homepage = "https://github.com/watchexec/clearscreen"
repository = "https://github.com/watchexec/clearscreen"
readme = "README.md"

edition = "2018"
edition = "2021"
exclude = ["/bin", "/.github"]
rust-version = "1.60.0"

[features]
windows-console = []

[dependencies]
terminfo = "0.7.3"
thiserror = "1.0.24"
which = "4.1.0"
thiserror = "1.0.38"
which = "4.3.0"

[target.'cfg(unix)'.dependencies.nix]
version = "0.24.1"
version = "0.26.1"
default-features = false
features = ["fs", "term"]

Expand Down
8 changes: 4 additions & 4 deletions README.md
@@ -1,16 +1,16 @@
[![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)
[![CI status on main branch](https://github.com/watchexec/clearscreen/actions/workflows/tests.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.
- Minimum Supported Rust Version: 1.51.0.
- Minimum Supported Rust Version: 1.60.0.
- Only the last five stable versions are supported.
- MSRV increases beyond that range at publish time will not incur major version bumps.

[copyright]: ./COPYRIGHT
[docs]: https://docs.rs/clearscreen
Expand Down
2 changes: 1 addition & 1 deletion bin/version
Expand Up @@ -51,7 +51,7 @@ cargo check

git commit -am "$newver"

echo "Pushing to upstream, make a PR for Bors then release with GH"
echo "Pushing to upstream, make a PR then release with GH"
git push -u $upstream release

echo "Deleting local release branch"
Expand Down
18 changes: 0 additions & 18 deletions bors.toml

This file was deleted.