Skip to content

Commit

Permalink
Update to build fps binary from merged workflows, readme update (#28)
Browse files Browse the repository at this point in the history
* Trying to figure out why it doesn't build on tags even

* wasn't triggering on tags

* avoid dirty state

* missing Dockerfile for fps

* switch to released workflow, add readme

* fix releases link
  • Loading branch information
ldemailly authored Sep 23, 2024
1 parent 584e9c3 commit 8bd0e97
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/include.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ name: "Shared library fortio workflows"
on:
push:
branches: [ main ]
tags:
- 'v*'
pull_request:
branches: [ main ]

Expand All @@ -16,7 +18,7 @@ jobs:
uses: fortio/workflows/.github/workflows/codeql-analysis.yml@main
call-releaser:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
uses: fortio/workflows/.github/workflows/releaser.yml@optional_binary_name
uses: fortio/workflows/.github/workflows/releaser.yml@main
with:
description: "Fortio terminal fps checker"
binary_name: "fps"
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@
# Go workspace file
go.work
go.work.sum
.goreleaser.yaml
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM scratch
COPY fps /usr/bin/fps
ENTRYPOINT ["/usr/bin/fps"]
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,27 @@ See the godoc above for details.
The [grol](https://github.com/grol-io/grol#grol) command line repl and others use this.

The implementations currently is a wrapper fully encapsulating (our fork of) [x/term](https://github.com/golang/term), i.e. [fortio.org/term](https://github.com/fortio/term) and new features like the interrupts handling (filters Ctrl-C ahead of term' reads)

## FPS

There is also a new [ansipixels](https://pkg.go.dev/fortio.org/terminal/ansipixels) package for drawing on the terminal and the tagged release also include `fps` that uses that package to test your terminal frames per second capabilities.
See the source [ansipixels/fps/fps.go](ansipixels/fps/fps.go)

You can get the binary from [releases](https://github.com/fortio/terminal/releases)

Or just run
```
CGO_ENABLED=0 go install fortio.org/terminal/ansipixels/fps@latest
```

or even
```
docker run -ti fortio/fps # but that's obviously slower
```

or
```
brew install fortio/tap/fps
```

![fps screenshot](fps_sshot.png)
Binary file added fps_sshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8bd0e97

Please sign in to comment.