Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: EdJoPaTo/mqttui
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.13.0
Choose a base ref
...
head repository: EdJoPaTo/mqttui
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.14.0
Choose a head ref
Loading
Showing with 680 additions and 509 deletions.
  1. +2 −9 .github/dependabot.yml
  2. +30 −0 .github/workflows/coverage.yml
  3. +106 −75 .github/workflows/rust.yml
  4. +2 −2 .github/workflows/style.yml
  5. +0 −1 .gitignore
  6. +184 −149 Cargo.lock
  7. +8 −15 Cargo.toml
  8. +176 −0 README.md
  9. +11 −13 build.rs
  10. +0 −112 readme.md
  11. +53 −20 src/cli.rs
  12. +1 −1 src/format.rs
  13. +2 −2 src/interactive/app.rs
  14. +3 −2 src/interactive/mod.rs
  15. +3 −3 src/interactive/ui.rs
  16. +26 −30 src/interactive/ui/history.rs
  17. +9 −1 src/main.rs
  18. +8 −14 src/mqtt_history.rs
  19. +1 −1 src/publish.rs
  20. +2 −2 src/topic.rs
  21. +53 −57 src/topic_view.rs
11 changes: 2 additions & 9 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -7,14 +7,7 @@ updates:
directory: "/"
open-pull-requests-limit: 30
schedule:
interval: "weekly"
interval: "monthly"
time: "03:37" # UTC
commit-message:
prefix: "chore(cargo):"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
commit-message:
prefix: "ci(actions):"
prefix: "build(cargo):"
30 changes: 30 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Test Coverage

on:
push:
pull_request:

jobs:
tarpaulin:
name: Tarpaulin
runs-on: ubuntu-latest
steps:
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
override: true
toolchain: stable

- uses: actions/checkout@v2

- name: Run cargo-tarpaulin
uses: actions-rs/tarpaulin@v0.1
with:
args: --all-features
out-type: Html

- name: Upload Report
uses: actions/upload-artifact@v2
with:
name: report
path: tarpaulin-report.html
181 changes: 106 additions & 75 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -6,38 +6,33 @@ on:

jobs:
test:
name: Test ${{ matrix.os }} ${{ matrix.toolchain }}
name: Test ${{ matrix.toolchain }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.toolchain == 'nightly' }}
strategy:
fail-fast: false
matrix:
toolchain:
- stable
os:
- ubuntu-latest
- macos-latest
- windows-latest
clippyargs:
- -D clippy::pedantic -D warnings
features:
- --all-features
include:
- os: ubuntu-latest
toolchain: stable
clippyargs: -D clippy::pedantic -D warnings
- os: macOS-latest
toolchain: stable
clippyargs: -D clippy::pedantic -D warnings
- os: windows-latest
toolchain: stable
clippyargs: -D clippy::pedantic -D warnings

- os: ubuntu-latest
toolchain: nightly
# Check future versions and maybe get some glances on soon to be lints
- toolchain: beta
os: ubuntu-latest
features: --all-features
clippyargs: -W clippy::pedantic -W clippy::nursery
- toolchain: nightly
os: ubuntu-latest
features: --all-features
clippyargs: -W clippy::pedantic
# - os: ubuntu-latest
# toolchain: 1.41.1 # Debian 10 Buster
# clippyargs: -W clippy::pedantic -A unknown-lints -A clippy::unknown-clippy-lints
# - os: ubuntu-latest
# toolchain: 1.47.0 # Alpine 3.13
# clippyargs: -W clippy::pedantic -A unknown-lints -A clippy::unknown-clippy-lints
# - os: ubuntu-latest
# toolchain: 1.48.0 # Debian 11 Bullseye
# clippyargs: -W clippy::pedantic -A unknown-lints -A clippy::unknown-clippy-lints
steps:
- uses: actions/checkout@v2

- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
@@ -46,107 +41,143 @@ jobs:
profile: minimal
toolchain: ${{ matrix.toolchain }}

- name: Run clippy
- uses: actions/checkout@v2

- name: Fetch dependencies
uses: actions-rs/cargo@v1
with:
command: fetch
args: --verbose --locked

- name: Check clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --verbose --locked --all-targets --all-features -- ${{ matrix.clippyargs }}
args: --verbose --locked --all-targets ${{ matrix.features }} -- ${{ matrix.clippyargs }}

- name: Check docs
uses: actions-rs/cargo@v1
with:
command: doc
args: --verbose --locked --no-deps ${{ matrix.features }}

- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose --locked --all-features
args: --verbose --locked ${{ matrix.features }}

release:
github-release:
name: Release ${{ matrix.triple }}
runs-on: ${{ matrix.os }}
needs: test
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
triple: x86_64-unknown-linux-gnu
- os: ubuntu-latest
triple: arm-unknown-linux-gnueabihf
- os: ubuntu-latest
triple: armv7-unknown-linux-gnueabihf
- os: ubuntu-latest
triple: aarch64-unknown-linux-gnu
- os: macOS-latest
triple: x86_64-apple-darwin
- os: macOS-latest
triple: aarch64-apple-darwin
- os: windows-latest
triple: x86_64-pc-windows-msvc
# https://github.com/briansmith/ring/issues/1167
# - os: windows-latest
# triple: aarch64-pc-windows-msvc
- triple: x86_64-unknown-linux-gnu
os: ubuntu-latest
- triple: arm-unknown-linux-gnueabihf
os: ubuntu-latest
- triple: armv7-unknown-linux-gnueabihf
os: ubuntu-latest
- triple: aarch64-unknown-linux-gnu
os: ubuntu-latest

- triple: x86_64-apple-darwin
os: macos-latest
- triple: aarch64-apple-darwin
os: macos-latest

- triple: x86_64-pc-windows-msvc
os: windows-latest
# https://github.com/briansmith/ring/issues/1167
# - triple: aarch64-pc-windows-msvc
# os: windows-latest
steps:
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
override: true
profile: minimal
target: ${{ matrix.triple }}
toolchain: stable

- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set Artifact Name
- name: Set artifact name
shell: bash
run: |
version=$(git describe --tags --match "v*.*.*" --always)
echo "version is: $version"
version="$(git describe --tags --match "v*.*.*" --always)"
echo "version: $version"
echo "GIT_TAG_VERSION=$version" >> $GITHUB_ENV
name="mqttui-$version-${{ matrix.triple }}"
echo "artifact name is: $name"
echo "artifact: $name"
echo "ARTIFACT_NAME=$name" >> $GITHUB_ENV
- name: Setup Rust
uses: actions-rs/toolchain@v1
- name: Fetch dependencies
uses: actions-rs/cargo@v1
with:
override: true
profile: minimal
target: ${{ matrix.triple }}
toolchain: stable
command: fetch
args: --verbose --locked

- name: Build release
- name: Build
uses: actions-rs/cargo@v1
env:
# TODO: Remove this once it's the default
SDKROOT: /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk
with:
command: build
args: --release --verbose --locked --all-features --target ${{ matrix.triple }}
use-cross: ${{ runner.os == 'Linux' && matrix.triple != 'x86_64-unknown-linux-gnu' }}

- name: Pack release (-nix)
- name: Package (*nix)
if: runner.os != 'Windows'
run: >
tar --gzip -cvf ${{ env.ARTIFACT_NAME }}.tar.gz
completions LICENSE
-C target/${{ matrix.triple }}/release mqttui
- name: Pack release (windows)
tar -cv
LICENSE README.md
-C target/ completions/ -C ../
-C target/${{ matrix.triple }}/release/ mqttui
| gzip --best > ${{ env.ARTIFACT_NAME }}.tar.gz
- name: Package (Windows)
if: runner.os == 'Windows'
run: |
7z a ${{ env.ARTIFACT_NAME }}.zip completions LICENSE
cd target/${{ matrix.triple }}/release
7z a ../../../${{ env.ARTIFACT_NAME }}.zip mqttui.exe
cd -
run: >
7z a ${{ env.ARTIFACT_NAME }}.zip
LICENSE README.md
./target/completions/
./target/${{ matrix.triple }}/release/mqttui.exe
- name: Upload Artifact
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.triple }}
path: |
*.zip
*.tar.gz
- name: GH Release
if: startsWith(github.ref, 'refs/tags/')
- name: Create GitHub release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v1
with:
draft: true
files: |
*.zip
*.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
aur-publish:
name: AUR ${{ matrix.name }}
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
needs: github-release
strategy:
fail-fast: false
matrix:
name:
- mqttui
- mqttui-bin
steps:
- uses: ATiltedTree/create-aur-release@v1
with:
package_name: ${{ matrix.name }}
commit_username: GitHub Actions
commit_email: mqttui-github-actions@edjopato.de
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
4 changes: 2 additions & 2 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
@@ -9,8 +9,6 @@ jobs:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
@@ -19,6 +17,8 @@ jobs:
profile: minimal
components: rustfmt

- uses: actions/checkout@v2

- name: Check format
uses: actions-rs/cargo@v1
with:
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/completions
/target

/perf.data*
Loading