Skip to content

Commit

Permalink
Merge pull request #5 from redis-performance/release.artifacts
Browse files Browse the repository at this point in the history
Included publish GH action. Updated Readme to reflect download steps of prebuilt binaries
  • Loading branch information
filipecosta90 authored Mar 9, 2023
2 parents 8da866f + 992d228 commit ccb1f05
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 18 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# .github/workflows/github-release-publish.yml
name: Publish artifacts to github release

on:
release:
types: [published]

jobs:
releases-matrix:
name: Release Go Binary
runs-on: ubuntu-latest
permissions:
id-token: write # To sign.
contents: write # To upload release assets.
actions: read # To read workflow path.
strategy:
fail-fast: false
matrix:
goos: [linux, darwin, windows]
goarch: [amd64, arm64]
steps:
- uses: actions/checkout@v3
- uses: wangyoucao577/go-release-action@v1.36
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
binary_name: "redis-zbench-go"
sha256sum: true
asset_name: redis-zbench-go-${{ matrix.goos }}-${{ matrix.goarch }}
build_command: "make build"
37 changes: 37 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Flow tests

on:
push:
pull_request:

permissions:
contents: read

jobs:
build:
name: build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go-version: [1.18.x, 1.19.x, 1.20.x]

services:
redis:
image: redis
options: >-
--health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5
ports:
- 6379:6379

steps:
- name: Set up ${{ matrix.go-version }}
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}

- name: Checkout code
uses: actions/checkout@v3

- name: Test
run: make test
33 changes: 15 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,28 @@ Redis Sorted Sets Benchmark
This repo contains code to trigger `load` ( `ZADD` ) or `query` (`ZRANGEBYLEX key min max`) benchmarks,
with/without transaction, with/without pipelining, and with diversified ways of controlling the per-key size and total keyspace length.

## Install
### Standalone binaries ( no Golang needed )
## Installation

### Download Standalone binaries ( no Golang needed )

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

https://github.com/redis-performance/redis-zbench-go/releases/latest

| OS | Arch | Link |
| :--- | :---: | ---: |
| Windows | amd64 | [redis--go_windows_amd64.exe](https://s3.amazonaws.com/benchmarks.redislabs/tools/redis-zbench-go/unstable/redis-zbench-go_windows_amd64.exe) |
| Linux | amd64 | [redis-zbench-go_linux_amd64](https://s3.amazonaws.com/benchmarks.redislabs/tools/redis-zbench-go/unstable/redis-zbench-go_linux_amd64) |
| Linux | arm64 | [redis-zbench-go_linux_arm64](https://s3.amazonaws.com/benchmarks.redislabs/tools/redis-zbench-go/unstable/redis-zbench-go_linux_arm64) |
| Darwin | amd64 | [redis-zbench-go_darwin_amd64](https://s3.amazonaws.com/benchmarks.redislabs/tools/redis-zbench-go/unstable/redis-zbench-go_darwin_amd64) |
| Darwin | arm64 | [redis-zbench-go_darwin_arm64](https://s3.amazonaws.com/benchmarks.redislabs/tools/redis-zbench-go/unstable/redis-zbench-go_darwin_arm64) |

| 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) |
| 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) |
| 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) |
| 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) |

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

Here's an example on how to use the above links:
```bash
# Fetch this repo
wget https://s3.amazonaws.com/benchmarks.redislabs/tools/redis-zbench-go/unstable/redis-zbench-go_linux_amd64

# change permissions
chmod 755 redis-zbench-go_linux_amd64
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

# give it a try
./redis-zbench-go_linux_amd64 --help
# give it a try
./redis-zbench-go --help
```

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

Expand Down

0 comments on commit ccb1f05

Please sign in to comment.