Skip to content

Commit

Permalink
add github actions to build
Browse files Browse the repository at this point in the history
Signed-off-by: ekexium <ekexium@fastmail.com>
  • Loading branch information
ekexium committed Jun 9, 2022
1 parent 7e587b6 commit b5fcb21
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 3 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
on:
push:
branches: [ "master" ]

name: build

env:
CARGO_TERM_COLOR: always

jobs:
build:
name: build-binary
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
- uses: actions-rs/cargo@v1
with:
command: build
args: --release --all-features
16 changes: 16 additions & 0 deletions enumerate-local.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

rm -r logs
mkdir logs
for m in 0 1
do
for a in off fast strict
do
for w in t2 t3 t4
do
cargo +nightly run -- -w $w -m $m -a $a -o logs/$w-$m-$a.log
done
done
done

cargo +nightly run --bin log2csv -- -l
6 changes: 4 additions & 2 deletions enumerate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ do
do
for w in t2 t3 t4
do
cargo +nightly run -- -w $w -m $m -a $a -o logs/$w-$m-$a.log
./corrupttest -w $w -m $m -a $a -o logs/$w-$m-$a.log -u $1 -s $2
done
done
done
done

./log2csv
4 changes: 3 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ The result is written to both stderr and the log.

### How to test all

There is a [script](./enumerate.sh) to run all combinations of the flags, modify them when needed.
There is a [script](./enumerate.sh) to run all combinations of the flags, modify them when needed.

It takes two arguments: the uri of TiDB and the status address of TiDB.

There is also a binary tool to parse the logs (maybe we should take the benefit of slog to avoid parsing 🥲), and turn them into a csv.

Expand Down

0 comments on commit b5fcb21

Please sign in to comment.