Skip to content

Commit 992d228

Browse files
committed
Included publish GH action. Updated Readme to reflect download steps of prebuilt binaries
1 parent 8da866f commit 992d228

File tree

3 files changed

+83
-18
lines changed

3 files changed

+83
-18
lines changed

.github/workflows/publish.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# .github/workflows/github-release-publish.yml
2+
name: Publish artifacts to github release
3+
4+
on:
5+
release:
6+
types: [published]
7+
8+
jobs:
9+
releases-matrix:
10+
name: Release Go Binary
11+
runs-on: ubuntu-latest
12+
permissions:
13+
id-token: write # To sign.
14+
contents: write # To upload release assets.
15+
actions: read # To read workflow path.
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
goos: [linux, darwin, windows]
20+
goarch: [amd64, arm64]
21+
steps:
22+
- uses: actions/checkout@v3
23+
- uses: wangyoucao577/[email protected]
24+
with:
25+
github_token: ${{ secrets.GITHUB_TOKEN }}
26+
goos: ${{ matrix.goos }}
27+
goarch: ${{ matrix.goarch }}
28+
binary_name: "redis-zbench-go"
29+
sha256sum: true
30+
asset_name: redis-zbench-go-${{ matrix.goos }}-${{ matrix.goarch }}
31+
build_command: "make build"

.github/workflows/test.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Flow tests
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
build:
12+
name: build
13+
runs-on: ubuntu-latest
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
go-version: [1.18.x, 1.19.x, 1.20.x]
18+
19+
services:
20+
redis:
21+
image: redis
22+
options: >-
23+
--health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5
24+
ports:
25+
- 6379:6379
26+
27+
steps:
28+
- name: Set up ${{ matrix.go-version }}
29+
uses: actions/setup-go@v3
30+
with:
31+
go-version: ${{ matrix.go-version }}
32+
33+
- name: Checkout code
34+
uses: actions/checkout@v3
35+
36+
- name: Test
37+
run: make test

README.md

+15-18
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,28 @@ Redis Sorted Sets Benchmark
77
This repo contains code to trigger `load` ( `ZADD` ) or `query` (`ZRANGEBYLEX key min max`) benchmarks,
88
with/without transaction, with/without pipelining, and with diversified ways of controlling the per-key size and total keyspace length.
99

10-
## Install
11-
### Standalone binaries ( no Golang needed )
10+
## Installation
11+
12+
### Download Standalone binaries ( no Golang needed )
1213

1314
If you don't have go on your machine and just want to use the produced binaries you can download the following prebuilt bins:
1415

16+
https://github.com/redis-performance/redis-zbench-go/releases/latest
17+
1518
| OS | Arch | Link |
1619
| :--- | :---: | ---: |
17-
| Windows | amd64 | [redis--go_windows_amd64.exe](https://s3.amazonaws.com/benchmarks.redislabs/tools/redis-zbench-go/unstable/redis-zbench-go_windows_amd64.exe) |
18-
| Linux | amd64 | [redis-zbench-go_linux_amd64](https://s3.amazonaws.com/benchmarks.redislabs/tools/redis-zbench-go/unstable/redis-zbench-go_linux_amd64) |
19-
| Linux | arm64 | [redis-zbench-go_linux_arm64](https://s3.amazonaws.com/benchmarks.redislabs/tools/redis-zbench-go/unstable/redis-zbench-go_linux_arm64) |
20-
| Darwin | amd64 | [redis-zbench-go_darwin_amd64](https://s3.amazonaws.com/benchmarks.redislabs/tools/redis-zbench-go/unstable/redis-zbench-go_darwin_amd64) |
21-
| Darwin | arm64 | [redis-zbench-go_darwin_arm64](https://s3.amazonaws.com/benchmarks.redislabs/tools/redis-zbench-go/unstable/redis-zbench-go_darwin_arm64) |
22-
20+
| Linux | amd64 (64-bit X86) | [redis-zbench-go-linux-amd64](https://github.com/redis-performance/redis-zbench-go/releases/latest/download/redis-zbench-go-linux-amd64.tar.gz) |
21+
| Linux | arm64 (64-bit ARM) | [redis-zbench-go-linux-arm64](https://github.com/redis-performance/redis-zbench-go/releases/latest/download/redis-zbench-go-linux-arm64.tar.gz) |
22+
| Darwin | amd64 (64-bit X86) | [redis-zbench-go-darwin-amd64](https://github.com/redis-performance/redis-zbench-go/releases/latest/download/redis-zbench-go-darwin-amd64.tar.gz) |
23+
| Darwin | arm64 (64-bit ARM) | [redis-zbench-go-darwin-arm64](https://github.com/redis-performance/redis-zbench-go/releases/latest/download/redis-zbench-go-darwin-arm64.tar.gz) |
2324

25+
Here's how bash script to download and try it:
2426

25-
Here's an example on how to use the above links:
2627
```bash
27-
# Fetch this repo
28-
wget https://s3.amazonaws.com/benchmarks.redislabs/tools/redis-zbench-go/unstable/redis-zbench-go_linux_amd64
29-
30-
# change permissions
31-
chmod 755 redis-zbench-go_linux_amd64
28+
wget -c https://github.com/redis-performance/redis-zbench-go/releases/latest/download/redis-zbench-go-$(uname -mrs | awk '{ print tolower($1) }')-$(dpkg --print-architecture).tar.gz -O - | tar -xz
3229

33-
# give it a try
34-
./redis-zbench-go_linux_amd64 --help
30+
# give it a try
31+
./redis-zbench-go --help
3532
```
3633

3734
### Installation in a Golang env
@@ -40,8 +37,8 @@ The easiest way to get and install the benchmark utility with a Go Env is to use
4037
`go get` and then `go install`:
4138
```bash
4239
# Fetch this repo
43-
go get github.com/filipecosta90/redis-zbench-go
44-
cd $GOPATH/src/github.com/filipecosta90/redis-zbench-go
40+
go get github.com/redis-performance/redis-zbench-go
41+
cd $GOPATH/src/github.com/redis-performance/redis-zbench-go
4542
make
4643
```
4744

0 commit comments

Comments
 (0)