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

Move subcurrency example to examples directory #731

Merged
merged 2 commits into from
Feb 2, 2022

Conversation

adlerjohn
Copy link
Contributor

First step of #544

No tests or CI in this PR.

@adlerjohn adlerjohn added the The Sway Book Everything to do with the Sway Book label Feb 1, 2022
@adlerjohn adlerjohn requested a review from sezna as a code owner February 1, 2022 19:27
@adlerjohn adlerjohn self-assigned this Feb 1, 2022
@adlerjohn adlerjohn requested a review from eureka-cpu February 1, 2022 19:27
Copy link
Contributor

@eureka-cpu eureka-cpu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm from what I can tell, was there anything else you needed from me here?

@sezna sezna merged commit bf3acc4 into master Feb 2, 2022
@sezna sezna deleted the adlerjohn/subcurrency-move-to-project branch February 2, 2022 21:35
mitchmindtree added a commit to mitchmindtree/sway that referenced this pull request Feb 10, 2022
Related to FuelLabs#544.
Follows the example set in FuelLabs#731.
Tested with `mdbook serve`.

Also adds the `hello_world` and `subcurrency` examples to the Sway
workspace so that we can test both projects under CI.
mitchmindtree added a commit to mitchmindtree/sway that referenced this pull request Feb 10, 2022
Related to FuelLabs#544.
Follows the example set in FuelLabs#731.
Tested with `mdbook serve`.

Also adds the `hello_world` and `subcurrency` examples to the Sway
workspace so that we can test both projects under CI.
mitchmindtree added a commit that referenced this pull request Feb 15, 2022
… mdbook preprocessor. (#766)

* Extract `hello_world` example from the book into a standalone project

Related to #544.
Follows the example set in #731.
Tested with `mdbook serve`.

Also adds the `hello_world` and `subcurrency` examples to the Sway
workspace so that we can test both projects under CI.

* Fix hello_world example project name in forc manifest

* Move fizzbuzz and wallet_smart_contract examples to standalone projects

* Add `build-all-examples` script and associated CI passes

This script walks the examples directory and, for every directory
containing a `forc.toml` file, runs `forc build` for that directory.
Examples that encounter a failure of some kind have their `stdout` and
`stderr` piped through so we can easily identify cause of failure in CI.

This also removes the examples from the workspace.

Currently unsure whether or not the added CI pass to install `forc` will
result in `forc` actually being available on the PATH in the CI worker,
but will find out soon.

Still need to work out how to run `forc test` for each project without
having cargo complain about building within the parent sway workspace.

* Add a clear build summary at the end of `build-all-examples`

Currently, it's tricky to get an idea of how many successes/failures
there were without combing through the stdout/stderr. This adds a little
summary to the end that looks something like this:

```
Build all examples summary:
  [✓]: /home/mindtree/programming/rust/fuel/sway/examples/fizzbuzz succeeded!
  [✓]: /home/mindtree/programming/rust/fuel/sway/examples/hello_world succeeded!
  [x]: /home/mindtree/programming/rust/fuel/sway/examples/wallet_smart_contract failed!
  [✓]: /home/mindtree/programming/rust/fuel/sway/examples/subcurrency succeeded!
3 successes, 1 failure
```

* Set build-all-examples script version to 0.0.0

* Exclude examples from workspace, Fix hello_world test harness path

* Temporarily comment out storage related code in wallet example

This example should be updated after #646 lands.

* Install forc with `--debug` to share build artifacts

Currently it takes CI another 7 mins to build and install forc from
scratch. This should allow `cargo` to re-use the artifacts it has
already built during the sway building and testing steps earlier in the
CI job.

* Change author field in examples from mindtree -> Fuel Labs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
The Sway Book Everything to do with the Sway Book
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants