-
Notifications
You must be signed in to change notification settings - Fork 4
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 0bc5af3
Showing
20 changed files
with
2,763 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,14 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: cargo | ||
directory: / | ||
schedule: | ||
interval: weekly | ||
labels: | ||
- "dependencies" | ||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: weekly | ||
labels: | ||
- "github actions" |
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 @@ | ||
name: Dependencies | ||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- "Cargo.toml" | ||
- "Cargo.lock" | ||
- "deny.toml" | ||
pull_request: | ||
paths: | ||
- "Cargo.toml" | ||
- "Cargo.lock" | ||
- "deny.toml" | ||
schedule: | ||
- cron: "0 0 * * 0" | ||
env: | ||
CARGO_TERM_COLOR: always | ||
jobs: | ||
dependencies: | ||
name: Check dependencies | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clone repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Check dependencies | ||
uses: EmbarkStudios/cargo-deny-action@v2 | ||
with: | ||
command-arguments: -D warnings |
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,132 @@ | ||
name: Main | ||
on: | ||
push: | ||
branches: | ||
- master | ||
paths-ignore: | ||
- ".gitignore" | ||
- ".github/dependabot.yml" | ||
- "deny.toml" | ||
pull_request: | ||
paths-ignore: | ||
- ".gitignore" | ||
- ".github/dependabot.yml" | ||
- "deny.toml" | ||
env: | ||
CARGO_TERM_COLOR: always | ||
jobs: | ||
format: | ||
name: Format | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clone repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Cache crates | ||
uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Install Taplo | ||
run: cargo install --locked taplo-cli | ||
|
||
- name: Format | ||
run: | | ||
cargo fmt --all --check | ||
taplo fmt --check | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clone repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install --no-install-recommends libudev-dev libwayland-dev libxkbcommon-dev | ||
- name: Instal stable toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: Cache crates | ||
uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Clippy | ||
run: cargo clippy --tests -- -D warnings | ||
|
||
- name: Rustdoc | ||
run: cargo rustdoc --all-features -- -D warnings | ||
|
||
doctest: | ||
name: Doctest | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clone repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install --no-install-recommends libudev-dev libwayland-dev libxkbcommon-dev | ||
- name: Instal stable toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: Cache crates | ||
uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Test doc | ||
run: cargo test --all-features --doc | ||
|
||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clone repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install --no-install-recommends libudev-dev libwayland-dev libxkbcommon-dev | ||
- name: Instal stable toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: Cache crates | ||
uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Install LLVM tools | ||
run: rustup component add llvm-tools-preview | ||
|
||
- name: Install Tarpaulin | ||
run: cargo install cargo-tarpaulin | ||
|
||
- name: Test | ||
run: cargo tarpaulin --all-features --engine llvm --out lcov | ||
|
||
- name: Upload code coverage results | ||
if: github.actor != 'dependabot[bot]' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: code-coverage-report | ||
path: lcov.info | ||
|
||
codecov: | ||
name: Upload to Codecov | ||
if: github.actor != 'dependabot[bot]' | ||
needs: [format, lint, doctest, test] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clone repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Download code coverage results | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: code-coverage-report | ||
|
||
- name: Upload to Codecov | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} |
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,8 @@ | ||
# Binaries | ||
target | ||
|
||
# Code coverage | ||
html | ||
|
||
# For library | ||
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,39 @@ | ||
[package] | ||
name = "bevy_enhanced_input" | ||
version = "0.1.0" | ||
authors = [ | ||
"Hennadii Chernyshchyk <[email protected]>", | ||
] | ||
edition = "2021" | ||
description = "Dynamic and contextual input mappings for Bevy " | ||
readme = "README.md" | ||
repository = "https://github.com/projectharmonia/bevy_enhanced_input" | ||
keywords = [ | ||
"bevy", | ||
"input", | ||
] | ||
categories = ["game-development"] | ||
license = "MIT OR Apache-2.0" | ||
include = ["/src", "/tests", "/LICENSE*"] | ||
|
||
[dependencies] | ||
bevy = { version = "0.14", default-features = false, features = ["serialize"] } | ||
bevy_egui = { version = "0.30", default-features = false, features = ["immutable_ctx"], optional = true } | ||
serde = "1.0" | ||
bitflags = { version = "2.6", features = ["serde"] } | ||
interpolation = "0.3" | ||
|
||
[dev-dependencies] | ||
bevy = { version = "0.14", default-features = false, features = [ | ||
"bevy_gilrs", | ||
"x11", | ||
] } | ||
|
||
[features] | ||
default = ["ui_priority", "egui_priority"] | ||
|
||
# Prioritizes 'bevy_ui' actions when processing inputs. | ||
ui_priority = ['bevy/bevy_ui'] | ||
|
||
# Prioritizes 'egui' over actions when processing inputs. | ||
egui_priority = ['dep:bevy_egui'] |
Oops, something went wrong.