Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fund default signer account in ci #6055

Merged
merged 4 commits into from
May 24, 2024

Conversation

kayagokalp
Copy link
Member

Description

Fixes the implementation at #5935 and removes bunch of unnecessary accounts for the CI from state_config. Basically funds the account used by default to sign via forc-deploy --default-signer and the test suite.

@kayagokalp kayagokalp added the ci label May 23, 2024
@kayagokalp kayagokalp self-assigned this May 23, 2024
@kayagokalp kayagokalp enabled auto-merge (squash) May 23, 2024 19:44
@kayagokalp kayagokalp requested review from tritao and a team May 23, 2024 19:44
tritao
tritao previously approved these changes May 23, 2024
@kayagokalp
Copy link
Member Author

lsp test is known to be flaky #6029, will re-run it once other jobs are finished.

@JoshuaBatty JoshuaBatty requested a review from tritao May 24, 2024 00:17
@JoshuaBatty JoshuaBatty requested review from a team May 24, 2024 00:18
@kayagokalp kayagokalp merged commit d93bb91 into master May 24, 2024
37 checks passed
@kayagokalp kayagokalp deleted the kayagokalp/fund-default-account branch May 24, 2024 08:20
xunilrj added a commit that referenced this pull request May 30, 2024
## Description

This PR introduces a script that compiles a sway project across multiple
commits, and generates an HTML report to help analysis of compilation
time and binary size.

The report is 100% autonomous, only depending on CDN scripts, and can be
served as it is by any HTTP server. There are two main features worthy
of being noted: a pivot table, and the data table.

The pivot table is configured by default to show the average compilation
time across multiple commits, like the example below.


![image](https://github.com/FuelLabs/sway/assets/83425/7abc2242-ad2b-4310-93de-08f01955b93b)

Below it, one finds the data table used, with links to Github issues and
commits.


![image](https://github.com/FuelLabs/sway/assets/83425/47b9671f-468c-481b-bfa8-aa470d49565c)

The script help can be printed by invoking it without any arguments

```
> test/bench.sh

 -n|--qty          how many commits will be used
 -b|--branch       which branch will be used. Defaults to "master"
 -p|--path         path to sway project to use
 -c|--clean        what to clean. Options:
     "results" - will clean all csv, txt files
     "exe"     - will clean all compiled executables
     "all"     - all the above
 -o|--open         open the final report using the default browser
```

A good first invocation example is:

```
> test/bench.sh -n 2 -p test/src/e2e_vm_tests/test_programs/should_pass/language/main_args/main_args_empty/ -o
master d93b "fix: fund default signer account in ci (#6055)" [compiling] [benchmark] [bin size] ok
master 5389 "Add examples on how to import storage types to the book (#6051)" [compiling] [benchmark] [bin size] ok
Warning: Cache at "/home/xunilrj/.cache/sway-bench" is using 108M of your disk space
Opening in existing browser session.
```

The script tries to be gentle on printing to the terminal, so details
are redirected to `$HOME/.cache/sway-bench/log.txt`, which can be `tail
-f` if needed.

So the only feedback is that for each commit, it prints:
- which branch is being used;
- its hash;
- its message;
- and which step is running: compiling `forc`, running the benchmark and
calculating the binary size.

The script runs incrementally. So it never redo a step if its results
exist in the cache. A second consecutive run should not do anything.
This is particularly important when compiling all the multiple versions
of `forc`, which can take quite a long time!

The option `-o` will open the browser pointing to the report after
everything is finished.

An important detail is disk usage. At the end of the script, it reminds
you how much space is being used. Each `forc` version is consuming more
than 50MB. One can easily clean this with `--clean`. It asks permission
before deleting anything, but it is always important to double-check if
it is not doing something crazy.

```
> test/bench.sh --clean all
```

If you have a specific branch you want to test, you can try 

```
> test/bench.sh -n 1 -p test/src/e2e_vm_tests/test_programs/should_pass/language/main_args/main_args_empty/ --branch xunilrj/configurables-faster-access
```

Suggestions and improvements are welcomed.

## Checklist

- [x] I have linked to any relevant issues.
- [x] I have commented my code, particularly in hard-to-understand
areas.
- [x] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [ ] If my change requires substantial documentation changes, I have
[requested support from the DevRel
team](https://github.com/FuelLabs/devrel-requests/issues/new/choose)
- [x] I have added tests that prove my fix is effective or that my
feature works.
- [x] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [x] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [x] I have requested a review from the relevant team or maintainers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants