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

feat: build scripts (rust 1.81) #149

Merged
merged 14 commits into from
Sep 11, 2024
Merged

Conversation

dj8yfo
Copy link
Contributor

@dj8yfo dj8yfo commented Sep 10, 2024

  • chore: add components to rust-toolchain.toml
  • chore: update rust 1.75.0 -> 1.81.0 in rust-toolchain.toml
  • chore: add better errors in tests around std::fs:read of wasm inputs
  • chore: add --no-docker everywhere after cargo near build
  • feat: add build script for community -> discussions
  • feat: add build script for community-factory -> community
  • chore: add building of contracts for tests into tests themselves

@dj8yfo dj8yfo changed the title build scripts rust 1.81 feat: build scripts rust 1.81 Sep 10, 2024
@dj8yfo dj8yfo changed the title feat: build scripts rust 1.81 feat: build scripts (rust 1.81) Sep 10, 2024
@dj8yfo dj8yfo marked this pull request as ready for review September 10, 2024 13:34
@dj8yfo
Copy link
Contributor Author

dj8yfo commented Sep 10, 2024

@race-of-sloths ping

@race-of-sloths
Copy link

race-of-sloths commented Sep 10, 2024

@dj8yfo Thank you for your contribution! Your pull request is now a part of the Race of Sloths!
Weekly streak is on the road, smart strategy! Secure your streak with another PR!

Shows profile picture for the author of the PR

Current status: executed
Reviewer Score
@petersalomonsen 5
@frol 8

Your contribution is much appreciated with a final score of 6!
You have received 63 (60 base + 5% lifetime bonus) Sloth points for this contribution

What is the Race of Sloths

Race of Sloths is a friendly competition where you can participate in challenges and compete with other open-source contributors within your normal workflow

For contributors:

  • Tag @race-of-sloths inside your pull requests
  • Wait for the maintainer to review and score your pull request
  • Check out your position in the Leaderboard
  • Keep weekly and monthly streaks to reach higher positions
  • Boast your contributions with a dynamic picture of your Profile

For maintainers:

  • Score pull requests that participate in the Race of Sloths
  • Engage contributors with fair scoring and fast responses so they keep their streaks
  • Promote the Race to the point where the Race starts promoting you
  • Grow the community of your contributors

Feel free to check our website for additional details!

Bot commands
  • For contributors
    • Include a PR: @race-of-sloths include to enter the Race with your PR
  • For maintainers:
    • Invite contributor @race-of-sloths invite to invite the contributor to participate in a race or include it, if it's already a runner.
    • Assign points: @race-of-sloths score [1/2/3/5/8/13] to award points based on your assessment.
    • Reject this PR: @race-of-sloths exclude to send this PR back to the drawing board.
    • Exclude repo: @race-of-sloths pause to stop bot activity in this repo until @race-of-sloths unpause command is called

@petersalomonsen
Copy link
Collaborator

@frol @dj8yfo Should we merge #148 first? It also has the --no-docker build setup.

@petersalomonsen
Copy link
Collaborator

@race-of-sloths score 5

@petersalomonsen
Copy link
Collaborator

Great to see the new build scripts and that they are now integrated into the tests!

Copy link
Collaborator

@petersalomonsen petersalomonsen left a comment

Choose a reason for hiding this comment

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

Looking good to me, but please check the codespace issue ( consider merging #148 first )

cargo near build
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/near/near-cli-rs/releases/latest/download/near-cli-rs-installer.sh | sh

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/near/cargo-near/releases/latest/download/cargo-near-installer.sh | sh
Copy link
Collaborator

Choose a reason for hiding this comment

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

Cargo-near fails to install in the ghcr.io/near/near-devcontainer image.

2024-09-10 19:39:47.137Z: downloading cargo-near 0.8.2 x86_64-unknown-linux-gnu
2024-09-10 19:39:48.739Z: installing to /usr/local/cargo/bin
2024-09-10 19:39:48.743Z: cp: cannot create regular file '/usr/local/cargo/bin/cargo-near': Permission denied
2024-09-10 19:39:48.748Z: ERROR�(B�[m: command failed: cp /tmp/tmp.NHfv1kPqDY/cargo-near /usr/local/cargo/bin

Consider applying the change from here:

https://github.com/NEAR-DevHub/neardevhub-contract/pull/148/files#diff-24ad71c8613ddcf6fd23818cb3bb477a1fb6d83af4550b0bad43099813088686

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@petersalomonsen i overlooked that change in .devcontainer/devcontainer.json when copying from #148 ,
only copied from .devcontainer/post-create.sh.

i'll add it too

@dj8yfo dj8yfo marked this pull request as draft September 10, 2024 20:26
@dj8yfo dj8yfo marked this pull request as ready for review September 10, 2024 21:12
@dj8yfo
Copy link
Contributor Author

dj8yfo commented Sep 11, 2024

@petersalomonsen i've added back ghcr.io/near/near-devcontainer:latest .
it appears to have everything needed
e5b5e44

@petersalomonsen
Copy link
Collaborator

@petersalomonsen i've added back ghcr.io/near/near-devcontainer:latest . it appears to have everything needed e5b5e44

Great ! Thanks!

community-factory/Cargo.toml Outdated Show resolved Hide resolved
rust-toolchain.toml Show resolved Hide resolved
community/build.rs Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
tests/test_env.rs Outdated Show resolved Hide resolved
@frol frol merged commit 685e8a1 into NEAR-DevHub:main Sep 11, 2024
1 check passed
@frol
Copy link
Collaborator

frol commented Sep 11, 2024

@race-of-sloths score 8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants