semaphore-protocol / semaphore

A zero-knowledge protocol for anonymous interactions.
https://semaphore.pse.dev
MIT License
883 stars 193 forks source link

chore: set up `turbo` #757

Closed sripwoud closed 1 month ago

sripwoud commented 3 months ago

WIP

Description

Set up turbo to run tasks and cache their results for operations related to:

Before After
tasks dependencies none, needs to manually run necessary build tasks before executing linting or testing tasks defined, turbo will automatically run and wait for build tasks to complete before linting or testing
speed (ex: building then testing libraries) pic-selected-240502-1553-29 pic-selected-240502-1554-48

Related Issue(s)

Closes #745

Other information

Checklist

openzeppelin-code[bot] commented 3 months ago

chore: set up turbo

Generated at commit: dd07a851524c09208726945121180c119b255ded

🚨 Report Summary

Severity Level Results
Contracts Critical
High
Medium
Low
Note
Total
0
0
0
4
16
20
Dependencies Critical
High
Medium
Low
Note
Total
0
0
0
0
0
0

For more details view the full report in OpenZeppelin Code Inspector

sripwoud commented 3 months ago

I am not sure whether the failing test is related to my PR? https://github.com/semaphore-protocol/semaphore/actions/runs/8925027515/job/24512736232#step:7:426 Looks like a matchtick install/config error no?

cedoor commented 3 months ago

I am not sure whether the failing test is related to my PR? https://github.com/semaphore-protocol/semaphore/actions/runs/8925027515/job/24512736232#step:7:426 Looks like a matchtick install/config error no?

It looks like it's trying to run tests on the Semaphore subgraph without running yarn codegen first, which should generate the subgraph.yaml file.

Maybe yarn style is not enough, it also needs to yarn build:subgraph somewhere.

sripwoud commented 3 months ago

Fixed in last commit. We should decide what to merge first though: #765 or #757 I think I'd prefer merging #765 first and then reworking #757

cedoor commented 3 months ago

Fixed in last commit. We should decide what to merge first though: #765 or #757 I think I'd prefer merging #765 first and then reworking #757

Merged!

sripwoud commented 3 months ago

re error when running subgraph test script: I don't think it is up to semaphore to document this or prevent it from happenning. Just want to share in case it comes up again for someone. I had 2 errors related to the installation of https://github.com/graphprotocol/graph-tooling/tree/main/packages/cli on linux environment (arch) due to missing lower level libraries:

semaphore/node_modules/binary-install-raw/bin/0.5.0/binary-linux-20: error while loading shared libraries: libpq.so.5: cannot open shared object file: No such file or directory

solved by installing postgresql-libs

and then

semaphore/node_modules/binary-install-raw/bin/0.5.0/binary-linux-20: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory

solved by installing openssl-1.1

cedoor commented 2 months ago

@sripwoud should we close this issue?

sripwoud commented 1 month ago

Yes let's close this, Alternatively I suggest https://github.com/semaphore-protocol/semaphore/pull/810 to speed up the execution of local scripts