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

Add a CONTRIBUTING.md #1309

Merged
merged 3 commits into from
Jan 26, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Contributing

Please see the [Contributing Code](https://bevyengine.org/learn/book/contributing/code/) section of
[The Book](https://bevyengine.org/learn/book/introduction/).
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ Bevy is still in the _very_ early stages of development. APIs can and will chang

## Community

Before contributing or participating in discussions with the community, you should familiarize yourself with our **[Code of Conduct](https://github.com/bevyengine/bevy/blob/master/CODE_OF_CONDUCT.md)**
Before contributing or participating in discussions with the community, you should familiarize yourself with our **[Code of Conduct](https://github.com/bevyengine/bevy/blob/master/CODE_OF_CONDUCT.md)** and
**[How to Contribute](https://github.com/bevyengine/bevy/blob/master/CONTRIBUTING.md)**
CleanCut marked this conversation as resolved.
Show resolved Hide resolved

* **[Discord](https://discord.gg/gMUk5Ph):** Bevy's official discord server.
* **[Reddit](https://reddit.com/r/bevy):** Bevy's official subreddit.
Expand Down
20 changes: 20 additions & 0 deletions tools/ci
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
Copy link
Member

Choose a reason for hiding this comment

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

To ensure cross-platform compatability, this should probably be a rust-script

i.e. using the xtask pattern

Copy link
Member

Choose a reason for hiding this comment

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

yeah that does seem like a reasonable approach / would allow ci and contributors to use the exact same command on all platforms.

https://github.com/matklad/cargo-xtask

The only downsides that i can see:

  1. more boilerplate (the consistency is worth it imo)
  2. requires adding a default .cargo/config file, which will conflict with our recommendation to rename .cargo/config_fast_builds to .cargo/config.

Copy link
Member

Choose a reason for hiding this comment

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

xtask is a big enough change that i think its probably worth doing in a separate pr


# This script is intended to mimic some CI behavior that we encourage contributors to run locally.
# For the actual CI run on GitHub, see the files in .github/workflows/

# Exit when any command fails
set -e

# Keep track of the last executed command
trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG
# Echo an error message before exiting, so you can see exactly what command and what error code
trap 'echo "\"${last_command}\" command filed with exit code $?."' EXIT

## ACTUAL COMMANDS

# Auto-format Rust files
cargo +nightly fmt --all

# Run a more intensive linter
cargo clippy --all-targets --all-features -- -D warnings -A clippy::type_complexity -A clippy::manual-strip