Skip to content

Commit

Permalink
Merge remote-tracking branch 'raze/main' into cargo-raze
Browse files Browse the repository at this point in the history
  • Loading branch information
UebelAndre committed Feb 20, 2021
2 parents c21d894 + fd33d67 commit c965cee
Show file tree
Hide file tree
Showing 799 changed files with 88,935 additions and 0 deletions.
19 changes: 19 additions & 0 deletions cargo/cargo_raze/.bazelci/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
buildifier: latest
tasks:
# TODO(acmcarther): Add check to verify that examples are up-to-date.
ubuntu1804:
build_targets:
- "..."
test_targets:
- "..."
windows:
build_targets:
- "..."
test_targets:
- "..."
macos:
build_targets:
- "..."
test_targets:
- "..."
1 change: 1 addition & 0 deletions cargo/cargo_raze/.bazelignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
examples
1 change: 1 addition & 0 deletions cargo/cargo_raze/.bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4.0.0
88 changes: 88 additions & 0 deletions cargo/cargo_raze/.github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
on: [push, pull_request]

name: CI

jobs:
check:
name: Check
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- 1.45.0
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- uses: actions-rs/cargo@v1
with:
command: check
args: --manifest-path impl/Cargo.toml

test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
# 1.45 triggers bug in parse_raze_settings_any_package
# with settings_packages.len() == 0
- 1.46.0
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path impl/Cargo.toml

fmt:
name: Rustfmt
runs-on: ubuntu-latest
strategy:
matrix:
rust:
# The rustfmt.toml appears to use nightly only features
- nightly-2021-01-31
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --manifest-path impl/Cargo.toml --all -- --check

clippy:
name: Clippy
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- 1.45.0
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- run: rustup component add clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path impl/Cargo.toml -- -D warnings
2 changes: 2 additions & 0 deletions cargo/cargo_raze/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
**/bazel-*
**/target/
43 changes: 43 additions & 0 deletions cargo/cargo_raze/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
dist: trusty
sudo: required
language: rust
addons:
apt:
sources:
- george-edison55-precise-backports
packages:
- cmake-data
- cmake

# Thanks, github.com/pubref/rules_protobuf!
# https://github.com/bazelbuild/bazel/issues/29#issuecomment-271428146
before_install:
- OS=linux
- ARCH=x86_64
- V="$(cat ./.bazelversion)"
- GH_BASE="https://github.com/bazelbuild/bazel/releases/download/$V"
- GH_ARTIFACT="bazel-$V-installer-$OS-$ARCH.sh"
- URL="$GH_BASE/$GH_ARTIFACT"
- echo $URL
- wget -O install.sh $URL
- chmod +x install.sh
- ./install.sh --user
- rm -f install.sh

rust:
- stable
matrix:
allow_failures:
- rust: nightly

script:
- bazel build //... && bazel test //...
# Check that /examples has no changes
- |
bazel run //tools:examples_raze
if [ -n "$(git status --porcelain)" ]; then
echo '/examples is out of date. Please rerun all tests and commit the changes generated from this command' >&2
exit 1
fi
# Run Buildifier as a linter step
- bazel run //:buildifier_check
39 changes: 39 additions & 0 deletions cargo/cargo_raze/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
load("@com_github_bazelbuild_buildtools//buildifier:def.bzl", "buildifier")

alias(
name = "cargo_raze",
actual = "//impl:cargo_raze",
visibility = ["//visibility:public"],
)

alias(
name = "cargo_raze_bin",
actual = "//impl:cargo_raze_bin",
visibility = ["//visibility:public"],
)

alias(
name = "bootstrap",
actual = "//tools:bootstrap",
visibility = ["//visibility:private"],
)

alias(
name = "publish_new_version",
actual = "//tools:publish_new_version",
visibility = ["//visibility:private"],
)

test_suite(
name = "examples_tests",
tests = [
"@cargo_raze_examples//tests:examples_tests",
],
visibility = ["//visibility:private"],
)

buildifier(
name = "buildifier_check",
mode = "check",
visibility = ["//visibility:private"],
)
3 changes: 3 additions & 0 deletions cargo/cargo_raze/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Code owners of cargo-raze

* @acmcarther
23 changes: 23 additions & 0 deletions cargo/cargo_raze/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# How to Contribute

We'd love to accept your patches and contributions to this project. There are
just a few small guidelines you need to follow.

## Contributor License Agreement

Contributions to this project must be accompanied by a Contributor License
Agreement. You (or your employer) retain the copyright to your contribution;
this simply gives us permission to use and redistribute your contributions as
part of the project. Head over to <https://cla.developers.google.com/> to see
your current agreements on file or to sign a new one.

You generally only need to submit a CLA once, so if you've already submitted one
(even if it was for a different project), you probably don't need to do it
again.

## Code reviews

All submissions, including submissions by project members, require review. We
use GitHub pull requests for this purpose. Consult
[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more
information on using pull requests.
Loading

0 comments on commit c965cee

Please sign in to comment.