generated from EmbarkStudios/opensource-template
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ea67052
Showing
14 changed files
with
787 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
param ( | ||
[string]$filename = $(throw "-filename is required.") | ||
) | ||
|
||
$ErrorActionPreference="Stop" | ||
|
||
# Get-FileHash is sha256 by default, but explicit is better! | ||
# Most (all?) of powerhshell's string output stuff is the wildly terrible | ||
# UTf-16, which unnecessarily inflates the output and makes it more annoying | ||
# to read, so we force it to ASCII, and tell it remove newlines so the actual | ||
# contents are exactly 64 bytes, like god intended | ||
(Get-FileHash "${filename}" -Algorithm SHA256).Hash | Out-File -Encoding ASCII -NoNewline "${filename}.sha256" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
travis_fold start "apt-get.musl" | ||
travis_time_start | ||
sudo apt-get update && sudo -E apt-get -yq --no-install-suggests --no-install-recommends install musl-tools | ||
travis_time_finish | ||
travis_fold end "apt-get.musl" | ||
|
||
travis_fold start "rustup.target.musl" | ||
travis_time_start | ||
rustup target add x86_64-unknown-linux-musl | ||
travis_time_finish | ||
travis_fold end "rustup.target.musl" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
travis_fold start "rustup.component.install" | ||
travis_time_start | ||
rustup component add rustfmt clippy | ||
travis_time_finish | ||
travis_fold end "rustup.component.install" | ||
|
||
# Ensure everything has been rustfmt'ed | ||
travis_fold start "rustfmt" | ||
travis_time_start | ||
cargo fmt -- --check | ||
travis_time_finish | ||
travis_fold end "rustfmt" | ||
|
||
# Download in a separate step to separate | ||
# building from fetching dependencies | ||
travis_fold start "cargo.fetch" | ||
travis_time_start | ||
cargo fetch | ||
travis_time_finish | ||
travis_fold end "cargo.fetch" | ||
|
||
# Because rust isn't brutal enough itself | ||
travis_fold start "clippy" | ||
travis_time_start | ||
cargo clippy -- -D warnings | ||
travis_time_finish | ||
travis_fold end "clippy" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# Fetch dependencies in a different step to clearly | ||
# delineate between downloading and building | ||
travis_fold start "cargo.fetch" | ||
travis_time_start | ||
cargo fetch --target "$TARGET" | ||
travis_time_finish | ||
travis_fold end "cargo.fetch" | ||
|
||
# Build without running to clearly delineate between | ||
# building and packaging | ||
travis_fold start "cargo.build" | ||
travis_time_start | ||
cargo build --release --target "$TARGET" | ||
travis_time_finish | ||
travis_fold end "cargo.build" | ||
|
||
travis_fold start "package.release" | ||
travis_time_start | ||
name="$REPO_NAME" | ||
release_name="$name-$TRAVIS_TAG-$TARGET" | ||
mkdir "$release_name" | ||
|
||
if [ "$TARGET" == "x86_64-pc-windows-msvc" ]; then | ||
# We don't use name again, so just add the exe extension | ||
# to it and call it a day | ||
name="$name.exe" | ||
else | ||
# If we're not on windows, strip the binary to remove | ||
# debug symbols and minimize the resulting release | ||
# size without much effort | ||
strip "target/$TARGET/release/$name" | ||
fi | ||
|
||
# Copy the files into a versioned directorya and tarball + gzip it | ||
# we do this regardless of the platform, because Windows can still | ||
# untar stuff, no need for zip! | ||
cp "target/$TARGET/release/$name" "$release_name/" | ||
cp README.md LICENSE-APACHE LICENSE-MIT "$release_name/" | ||
tar czvf "$release_name.tar.gz" "$release_name" | ||
|
||
rm -r "$release_name" | ||
|
||
stat "$release_name.tar.gz" | ||
|
||
# Get the sha-256 checksum w/o filename and newline, on windows we use | ||
# powershell because git bash only includes md5/sha1sum | ||
if [ "$TARGET" == "x86_64-pc-windows-msvc" ]; then | ||
powershell -NoLogo -ExecutionPolicy Bypass -File .ci/checksum.ps1 "$release_name.tar.gz" | ||
else | ||
echo -n "$(shasum -ba 256 "$release_name.tar.gz" | cut -d " " -f 1)" > "$release_name.tar.gz.sha256" | ||
fi | ||
|
||
stat "$release_name.tar.gz.sha256" | ||
travis_time_finish | ||
travis_fold end "package.release" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
HOST_OS_NAME=$(uname -s) | ||
TARGET="" | ||
|
||
if [ "$(uname)" == "Darwin" ]; then | ||
TARGET="apple-darwin" | ||
elif [ "${HOST_OS_NAME::5}" == "Linux" ]; then | ||
# If we're on linux, always build for musl | ||
TARGET="unknown-linux-musl" | ||
.ci/install_musl.sh | ||
elif [ "${HOST_OS_NAME::10}" == "MINGW64_NT" ]; then | ||
TARGET="pc-windows-msvc" | ||
elif [ "${HOST_OS_NAME::7}" == "MSYS_NT" ]; then # travis uses msys | ||
TARGET="pc-windows-msvc" | ||
elif [ "${HOST_OS_NAME::10}" == "MINGW32_NT" ]; then | ||
echo "Why are you on a 32-bit machine?" | ||
exit 1 | ||
else | ||
echo "Unknown host platform! '$HOST_OS_NAME'" | ||
exit 1 | ||
fi | ||
|
||
TARGET="x86_64-$TARGET" | ||
|
||
# Fetch dependencies in a different step to clearly | ||
# delineate between downloading and building | ||
travis_fold start "cargo.fetch" | ||
travis_time_start | ||
cargo fetch | ||
travis_time_finish | ||
travis_fold end "cargo.fetch" | ||
|
||
# Build without running to clearly delineate between | ||
# building and running the tests | ||
travis_fold start "cargo.build" | ||
travis_time_start | ||
cargo test --no-run --target $TARGET | ||
travis_time_finish | ||
travis_fold end "cargo.build" | ||
|
||
# Run the actual tests | ||
travis_fold start "cargo.test" | ||
travis_time_start | ||
cargo test --target $TARGET | ||
travis_time_finish | ||
travis_fold end "cargo.test" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: bug | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Device:** | ||
- OS: [e.g. iOS] | ||
- Browser [e.g. chrome, safari] | ||
- Version [e.g. 22] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: enhancement | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/target | ||
**/*.rs.bk | ||
Cargo.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# Contributor Covenant Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
In the interest of fostering an open and welcoming environment, we as | ||
contributors and maintainers pledge to making participation in our project and | ||
our community a harassment-free experience for everyone, regardless of age, body | ||
size, disability, ethnicity, sex characteristics, gender identity and expression, | ||
level of experience, education, socio-economic status, nationality, personal | ||
appearance, race, religion, or sexual identity and orientation. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to creating a positive environment | ||
include: | ||
|
||
* Using welcoming and inclusive language | ||
* Being respectful of differing viewpoints and experiences | ||
* Gracefully accepting constructive criticism | ||
* Focusing on what is best for the community | ||
* Showing empathy towards other community members | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
* The use of sexualized language or imagery and unwelcome sexual attention or | ||
advances | ||
* Trolling, insulting/derogatory comments, and personal or political attacks | ||
* Public or private harassment | ||
* Publishing others' private information, such as a physical or electronic | ||
address, without explicit permission | ||
* Other conduct which could reasonably be considered inappropriate in a | ||
professional setting | ||
|
||
## Our Responsibilities | ||
|
||
Project maintainers are responsible for clarifying the standards of acceptable | ||
behavior and are expected to take appropriate and fair corrective action in | ||
response to any instances of unacceptable behavior. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or | ||
reject comments, commits, code, wiki edits, issues, and other contributions | ||
that are not aligned to this Code of Conduct, or to ban temporarily or | ||
permanently any contributor for other behaviors that they deem inappropriate, | ||
threatening, offensive, or harmful. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies both within project spaces and in public spaces | ||
when an individual is representing the project or its community. Examples of | ||
representing a project or community include using an official project e-mail | ||
address, posting via an official social media account, or acting as an appointed | ||
representative at an online or offline event. Representation of a project may be | ||
further defined and clarified by project maintainers. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be | ||
reported by contacting the project team at [email protected]. All | ||
complaints will be reviewed and investigated and will result in a response that | ||
is deemed necessary and appropriate to the circumstances. The project team is | ||
obligated to maintain confidentiality with regard to the reporter of an incident. | ||
Further details of specific enforcement policies may be posted separately. | ||
|
||
Project maintainers who do not follow or enforce the Code of Conduct in good | ||
faith may face temporary or permanent repercussions as determined by other | ||
members of the project's leadership. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, | ||
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html | ||
|
||
[homepage]: https://www.contributor-covenant.org | ||
|
||
For answers to common questions about this code of conduct, see | ||
https://www.contributor-covenant.org/faq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Embark Contributor Guidelines | ||
|
||
Welcome! This project is created by the team at [Embark Studios](https://embark.games). We're glad you're interested in contributing! We welcome contributions from people of all backgrounds who are interested in making great software with us. | ||
|
||
At Embark, we aspire to empower everyone to create interactive experiences. To do this, we're exploring and pushing the boundaries of new technologies, and sharing our learnings with the open source community. | ||
|
||
If you have ideas for collaboration, email us at [email protected]. | ||
|
||
We're also hiring full-time engineers to work with us in Stockholm! Check out our current job postings [here](https://embark.games/careers). | ||
|
||
## Issues | ||
|
||
### Feature Requests | ||
|
||
If you have ideas or how to improve our projects, you can suggest features by opening a GitHub issue. Make sure to include details about the feature or change, and describe any uses cases it would enable. | ||
|
||
Feature requests will be tagged as `enhancement` and their status will be updated in the comments of the issue. | ||
|
||
### Bugs | ||
|
||
When reporting a bug or unexpected behaviour in a project, make sure your issue descibes steps to reproduce the behaviour, including the platform you were using, what steps you took, and any error messages. | ||
|
||
Reproducible bugs will be tagged as `bug` and their status will be updated in the comments of the issue. | ||
|
||
### Wontfix | ||
|
||
Issues will be closed and tagged as `wontfix` if we decide that we do not wish to implement it, usually due to being misaligned with the project vision or out of scope. We will comment on the issue with more detailed reasoning. | ||
|
||
## Contribution Workflow | ||
|
||
### Open Issues | ||
|
||
If you're ready to contribute, start by looking at our open issues tagged as [`help wanted`](../../issues?q=is%3Aopen+is%3Aissue+label%3A"help+wanted") or [`good first issue`](../../issues?q=is%3Aopen+is%3Aissue+label%3A"good+first+issue"). | ||
|
||
You can comment on the issue to let others know you're interested in working on it or to ask questions. | ||
|
||
### Making Changes | ||
|
||
1. Fork the repository. | ||
|
||
2. Create a new feature branch. | ||
|
||
3. Make your changes. Ensure that there are no build errors by running the project with your changes locally. | ||
|
||
4. Open a pull request with a name and description of what you did. You can read more about working with pull requests on GitHub [here](https://help.github.com/en/articles/creating-a-pull-request-from-a-fork). | ||
|
||
5. A maintainer will review your pull request and may ask you to make changes. | ||
|
||
## Code Guidelines | ||
|
||
You can read about our standards and recommendations for working with Rust [here](https://github.com/EmbarkStudios/rust-ecosystem/blob/master/guidelines.md). | ||
|
||
## Licensing | ||
|
||
Unless otherwise specified, all Embark open source projects are licensed under a dual MIT OR Apache-2.0 license, allowing licensees to chose either at their option. You can read more in each project's respective README. | ||
|
||
## Code of Conduct | ||
|
||
Please note that our projects are released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md) to ensure that they are welcoming places for everyone to contribute. By participating in any Embark open source project, you agree to abide by these terms. |
Oops, something went wrong.