Skip to content

Commit 44e19e2

Browse files
authored
Update README and add CI (#7)
1 parent 17bfd7c commit 44e19e2

File tree

2 files changed

+76
-3
lines changed

2 files changed

+76
-3
lines changed

.github/workflows/build.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
workflow_dispatch:
9+
inputs:
10+
tag:
11+
description: 'Tag to create'
12+
required: true
13+
default: 'v0.0.0'
14+
15+
jobs:
16+
17+
build:
18+
name: Build & Test
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Set up Go 1.x
22+
uses: actions/setup-go@v2
23+
with:
24+
go-version: ^1.x
25+
26+
- name: Check out code
27+
uses: actions/checkout@v2
28+
29+
- name: Test
30+
run: go test -v -coverprofile=coverage.txt ./...
31+
32+
- name: Upload Coverage
33+
uses: codecov/codecov-action@v1
34+
continue-on-error: true
35+
with:
36+
token: ${{secrets.CODECOV_TOKEN}}
37+
file: ./coverage.txt
38+
fail_ci_if_error: false
39+
40+
release:
41+
if: github.event_name == 'workflow_dispatch'
42+
43+
name: Release
44+
runs-on: ubuntu-latest
45+
steps:
46+
- uses: actions/checkout@v2
47+
48+
- name: Checkout with tags
49+
run: git fetch --prune --unshallow --tags
50+
51+
- name: Create release
52+
run: |
53+
git log --format="%C(auto) %H %s" `git tag --sort=-committerdate | head -1`...HEAD > changelog.txt
54+
echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token
55+
gh release create ${{ github.event.inputs.tag }} -t ${{ github.event.inputs.tag }} -F changelog.txt

README.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
11
# go-perftuner
22

3+
[![build-img]][build-url]
4+
[![pkg-img]][pkg-url]
5+
[![reportcard-img]][reportcard-url]
6+
[![coverage-img]][coverage-url]
7+
38
Helper tool for manual Go code optimization.
49

510
This tool gives you an easy way to get the Go compiler output regarding specific optimisations. Like: function inlining, variable escape and bounds checks.
611

12+
# Notes
13+
14+
The original implementation was started by [@quasilyte](https://github.com/quasilyte) thanks to him :tada: Than supported by [@cristaloleg](https://github.com/cristaloleg) and now is part of [go-perf](https://github.com/go-perf) organization.
15+
716
# Installation / Quick Start
817

918
```bash
1019
# Install go-perftuner:
11-
$ go get -u github.com/cristaloleg/go-perftuner
20+
$ go get -u github.com/go-perf/go-perftuner
1221

1322
# Check installation (prints help):
1423
$ go-perftuner
@@ -63,6 +72,15 @@ boundChecks: fmt: src/fmt/format.go:159:22: slice/array has bound checks
6372
boundChecks: fmt: src/fmt/format.go:161:10: slice/array has bound checks
6473
```
6574

66-
# Notes
75+
## License
76+
77+
[MIT License](LICENSE).
6778

68-
The original implementation was started by [@quasilyte](https://github.com/quasilyte) thanks to him :tada:
79+
[build-img]: https://github.com/go-perf/go-perftuner/workflows/build/badge.svg
80+
[build-url]: https://github.com/go-perf/go-perftuner/actions
81+
[pkg-img]: https://pkg.go.dev/badge/go-perf/go-perftuner
82+
[pkg-url]: https://pkg.go.dev/github.com/go-perf/go-perftuner
83+
[reportcard-img]: https://goreportcard.com/badge/go-perf/go-perftuner
84+
[reportcard-url]: https://goreportcard.com/report/go-perf/go-perftuner
85+
[coverage-img]: https://codecov.io/gh/go-perf/go-perftuner/branch/main/graph/badge.svg
86+
[coverage-url]: https://codecov.io/gh/go-perf/go-perftuner

0 commit comments

Comments
 (0)