Skip to content

Commit

Permalink
ci
Browse files Browse the repository at this point in the history
  • Loading branch information
vladkens committed Jun 30, 2024
1 parent 1a36a3e commit b81bd5d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: ci

on:
push:

jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install -y gcc

- run: make build
- run: ./ecloop -v
- run: ./ecloop add -f data/btc-puzzles-hash -r 8000:ffff -q
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ build: clean
@CC $(CC_FLAGS) main.c -o ecloop

add: build
./ecloop add -f data/btc-puzzles-hash -t 8 -r 8000:ffffff -v
./ecloop add -f data/btc-puzzles-hash -t 8 -r 8000:ffffff

mul: build
cat data.txt | ./ecloop mul -f _check_1.txt -t 8 -a cu -v
cat data.txt | ./ecloop mul -f _check_1.txt -t 8 -a cu

blf-test: build
@rm -rf /tmp/test.blf
cat data/btc-puzzles-hash | ./ecloop blf-gen -n 1024 -o /tmp/test.blf
./ecloop add -f /tmp/test.blf -t 8 -r 8000:ffffff -v
./ecloop add -f /tmp/test.blf -t 8 -r 8000:ffffff
4 changes: 2 additions & 2 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ void usage(const char *name) {
}

void init(ctx_t *ctx, args_t *args) {
// check bench commands first
// check other commands first
if (args->argc > 1) {
if (strcmp(args->argv[1], "blf-gen") == 0) return blf_gen(args);
if (strcmp(args->argv[1], "bench") == 0) return run_bench();
Expand All @@ -712,7 +712,7 @@ void init(ctx_t *ctx, args_t *args) {
if (ctx->cmd == CMD_NIL) {
if (args_bool(args, "-v")) printf("ecloop v%s\n", VERSION);
else usage(args->argv[0]);
exit(1);
exit(0);
}

char *path = arg_str(args, "-f");
Expand Down

0 comments on commit b81bd5d

Please sign in to comment.