diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml new file mode 100644 index 0000000..b426a7e --- /dev/null +++ b/.github/workflows/tests.yaml @@ -0,0 +1,34 @@ +name: Run Tests + +on: + push: + branches: + - 'main' + tags: + - '*' + pull_request: + +jobs: + build_and_test: + name: Build and test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Checkout zbc-fhe-tool + uses: actions/checkout@v3 + with: + repository: zama-ai/fhevm-tfhe-cli + ref: main + path: zbc-fhe-tool + + - name: Generate TFHE-rs keys + working-directory: ./zbc-fhe-tool + run: | + mkdir -p $HOME/.evmosd/zama/keys/network-fhe-keys + cargo run --features tfhe/x86_64-unix --release -- generate-keys -d $HOME/.evmosd/zama/keys/network-fhe-keys + + - name: Run tests + run: make test diff --git a/Makefile b/Makefile index 2a47ff5..3a4e097 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ build: build-tfhe-rs-capi cd fhevm && CGO_CFLAGS=${CGO_CFLAGS} CGO_LDFLAGS=${CGO_LDFLAGS} go build . .PHONY: test -test: +test: build-tfhe-rs-capi cd fhevm && CGO_CFLAGS=${CGO_CFLAGS} CGO_LDFLAGS=${CGO_LDFLAGS} go test -v . .PHONY: build-tfhe-rs-capi