Skip to content

[workflows] daily-benchmark: Bump Ubuntu version to 22.04 #7

[workflows] daily-benchmark: Bump Ubuntu version to 22.04

[workflows] daily-benchmark: Bump Ubuntu version to 22.04 #7

Workflow file for this run

name: CI tests
on:
- push
- pull_request
jobs:
build-and-test:
strategy:
fail-fast: false
matrix:
go:
- 1.20.x
os:
- ubuntu-22.04
disk:
- 0
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: Setup dependencies
run: |
sudo add-apt-repository ppa:cowsql/master -y
sudo apt update
sudo apt install -y golint libsqlite3-dev libuv1-dev liblz4-dev libraft-dev libcowsql-dev
go get github.com/go-playground/overalls
- name: Build & Test
env:
CGO_LDFLAGS_ALLOW: "-Wl,-z,now"
run: |
go version
go get -t -tags libsqlite3 ./...
go vet -tags libsqlite3 ./...
golint
export GO_COWSQL_MULTITHREAD=1
go test -v -race -coverprofile=coverage.out ./...
go test -v -tags nosqlite3 ./...
VERBOSE=1 DISK=${{ matrix.disk }} ./test/cowsql-demo.sh
VERBOSE=1 DISK=${{ matrix.disk }} ./test/roles.sh
VERBOSE=1 DISK=${{ matrix.disk }} ./test/recover.sh
- name: Coverage
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: coverage.out
- name: Benchmark
env:
CGO_LDFLAGS_ALLOW: "-Wl,-z,now"
GO_COWSQL_MULTITHREAD: 1
run: |
go install -tags libsqlite3 github.com/cowsql/go-cowsql/cmd/cowsql-benchmark
diskmode=$(if [ ${{ matrix.disk }} -eq 1 ]; then echo -n "--disk"; fi)
cowsql-benchmark --db 127.0.0.1:9001 --driver $diskmode --cluster 127.0.0.1:9001,127.0.0.1:9002,127.0.0.1:9003 --workload kvreadwrite &
masterpid=$!
cowsql-benchmark --db 127.0.0.1:9002 $diskmode --join 127.0.0.1:9001 &
cowsql-benchmark --db 127.0.0.1:9003 $diskmode --join 127.0.0.1:9001 &
wait $masterpid
echo "Write results:"
head -n 5 /tmp/cowsql-benchmark/127.0.0.1:9001/results/0-exec-*
echo ""
echo "Read results:"
head -n 5 /tmp/cowsql-benchmark/127.0.0.1:9001/results/0-query-*
- uses: actions/upload-artifact@v3
with:
name: cowsql-benchmark-${{ matrix.os }}-${{ matrix.go }}
path: /tmp/cowsql-benchmark/127.0.0.1:9001/results/*