chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 12:24:51 +08:00
commit e74a3762b8
963 changed files with 299400 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
# These are supported funding model platforms
custom: https://fyrox.rs/sponsor.html
+23
View File
@@ -0,0 +1,23 @@
---
name: Bug report
about: Report a bug you encountered
title: ''
assignees: ''
---
## Description
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.
+13
View File
@@ -0,0 +1,13 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
assignees: ''
---
## Problem this feature should fix
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
## Expected solution
A clear and concise description of what you want to happen.
+23
View File
@@ -0,0 +1,23 @@
## Description
<!-- Provide a clear and concise description of what this PR accomplishes -->
Write here.
## Related Issue(s)
<!-- Link to the issue that this PR addresses (if applicable) -->
Fixes #(issue number)
## Review Guidance
<!-- Provide any additional information that would help reviewing your work -->
Write here.
## Screenshots/GIFs
<!-- If applicable, add screenshots or GIFs demonstrating the changes -->
Write here.
## Checklist
<!-- Mark items with 'x' (no spaces around x) -->
- [ ] My code follows the project's code style guidelines
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have updated the documentation accordingly
- [ ] My changes don't generate new warnings or errors
- [ ] No unsafe code introduced (or if introduced, thoroughly justified and documented)
+201
View File
@@ -0,0 +1,201 @@
name: CI
on:
push:
pull_request:
workflow_dispatch:
# This allows running it on any branch manually:
# https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
env:
CARGO_TERM_COLOR: always
# Deny warns here as a catch-all and because some commands (e.g. cargo build) don't accept `--deny warnings`
# but also deny them on all individual cargo invocations where available because:
# 1) Some commands might not support rustflags (e.g. clippy didn't at first, cargo doc uses a different var, ...)
# 2) People might copy paste the commands into CI where this flag is missing without noticing.
RUSTFLAGS: --deny warnings
jobs:
tests:
name: Tests CI
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
rust: [ stable ]
# For reference: https://github.com/actions/virtual-environments#available-environments
os: [ ubuntu-latest, windows-latest, macos-latest ]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
# Caching must be after toolchain selection
- uses: Swatinem/rust-cache@v2
- name: Install linux deps
if: ${{ matrix.os == 'ubuntu-latest' }}
# Note that for running your Fyrox game on CI, you might need additinal deps like libxkbcommon-x11 and OpenGL
# and you might need to run it using xvfb-run even in headless mode.
run: |
sudo apt-get update # Run update first or install might start failing eventually.
sudo apt-get install --no-install-recommends -y libasound2-dev libudev-dev pkg-config xorg-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev libdbus-1-dev
- run: rustc --version && cargo --version
- name: Build and test
env:
RUSTFLAGS: -C prefer-dynamic=yes
run: |
cargo build --verbose --workspace --all-targets --all-features --profile github-ci
cargo test --verbose --workspace --all-features --profile github-ci
wasm:
name: Wasm CI
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust: [ stable ]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
targets: wasm32-unknown-unknown
# Caching must be after toolchain selection
- uses: Swatinem/rust-cache@v2
- run: rustc --version && cargo --version
- name: Build
# Build only fyrox package here, because there's fyrox-dylib package which cannot be compiled on wasm.
run: |
cargo build --verbose --target=wasm32-unknown-unknown --package fyrox
format:
name: Rustfmt CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Use rust-toolchain because GHA tends to still have an old version for a few days after a new Rust release.
- uses: dtolnay/rust-toolchain@stable
- run: rustup component add rustfmt
- run: cargo fmt --version
- run: cargo fmt -- --check
clippy:
name: Clippy CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Use rust-toolchain because GHA tends to still have an old version for a few days after a new Rust release.
- uses: dtolnay/rust-toolchain@stable
# Caching must be after toolchain selection
- uses: Swatinem/rust-cache@v2
- name: Install linux deps
run: |
sudo apt-get update # Run update first or install might start failing eventually.
sudo apt-get install --no-install-recommends -y libasound2-dev libudev-dev pkg-config xorg-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev libdbus-1-dev
- run: rustup component add clippy
- run: cargo clippy --version
# Using --all-targets to also check tests and examples.
# Note that technically --all-features doesn't check all code when something is *disabled* by a feature.
- run: cargo clippy --workspace --all-targets --all-features -- --deny warnings
docs:
name: Documentation CI
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
# Caching must be after toolchain selection
- uses: Swatinem/rust-cache@v2
- run: rustc --version && cargo --version
- name: Build Docs
run: cargo doc --all-features
env:
RUSTDOCFLAGS: --deny warnings
template_pc:
name: Project Template (PC)
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Install Tools
run: |
cargo install fyrox-template --path=template --force
- name: Generate and Build Projects
run: |
cd ../
fyrox-template init --name test_project --style=3d
cd test_project
fyrox-template upgrade --version=latest --local
cargo build --package editor
template_android:
name: Project Template (Android)
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: actions/setup-java@v4
with:
java-version: "17"
distribution: "temurin"
- uses: android-actions/setup-android@v3
with:
cmdline-tools-version: 10406996
- run: sdkmanager tools "platforms;android-30"
- uses: nttld/setup-ndk@v1
with:
ndk-version: r26
- name: Install Tools
run: |
cargo install fyrox-template --path=template --force
cargo install cargo-apk
rustup target add armv7-linux-androideabi
- name: Generate and Build Projects
run: |
cd ../
fyrox-template init --name test_project --style=3d
cd test_project
fyrox-template upgrade --version=latest --local
cargo-apk apk build --package executor-android --target armv7-linux-androideabi
template_wasm:
name: Project Template (WASM)
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Install Tools
run: |
cargo install fyrox-template --path=template --force
cargo install wasm-pack
rustup target add wasm32-unknown-unknown
- name: Generate and Build Projects
run: |
cd ../
fyrox-template init --name test_project --style=3d
cd test_project
fyrox-template upgrade --version=latest --local
cd executor-wasm
wasm-pack build --target=web
project_manager:
name: Project Manager
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Build Project Manager
run: |
cargo build --package fyrox-project-manager