Skip to content

Commit

Permalink
feat: prepare for v0.2.0 release
Browse files Browse the repository at this point in the history
* update the `release.yml` workflow to be functional once again
* reinstate cargo +nightly fmt requirement, and run it
* make `ci.yml` use cargo +nightly fmt
* move networking crates to a networking feature to reduce dependencies until networking is added
* add a bundle feature to change the path of where assets are found when bundling (e.g. making it "../Resources/assets" on macos for the .app)
* update recommended-config.toml
* add `PhysicsPlugins` in preparation
* cleanup Cross.toml
* remove bevy_editor_egui
* update README.md
  • Loading branch information
Sycrosity committed Sep 1, 2023
1 parent 69b6cc2 commit fa56819
Show file tree
Hide file tree
Showing 19 changed files with 193 additions and 270 deletions.
4 changes: 2 additions & 2 deletions .cargo/recommended-config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ rd = "run --features debug"
bd = "build --features debug"
rf = "run --features fast_compile"
bf = "build --features fast_compile"
w = "r --target wasm32-unknown-unknown --profile wasm --no-default-features"
bw = "b --target wasm32-unknown-unknown --profile wasm --no-default-features"
w = "run --target wasm32-unknown-unknown --profile wasm --no-default-features"
bw = "build --target wasm32-unknown-unknown --profile wasm --no-default-features"

[target.x86_64-unknown-linux-gnu]
linker = "clang"
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ jobs:
- name: Checkout source
uses: actions/checkout@v3

- name: Install rustfmt
run: rustup component add rustfmt
- name: Install nightly rustfmt
run: |
rustup override set nightly
rustup component add rustfmt --toolchain nightly
- name: Run cargo fmt
run: cargo fmt --all -- --check
run: cargo +nightly fmt --all -- --check

test:
runs-on: ubuntu-latest
Expand Down
18 changes: 8 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,37 +88,35 @@ jobs:
- name: Cache rust dependencies
uses: Swatinem/rust-cache@v2
with:
shared-key: build-${{ matrix.config.name }}
shared-key: release-${{ matrix.config.name }}
prefix-key: v0 #increment this to bust the cache if needed
save-if: ${{ github.event_name != 'schedule' }}

- name: Install cargo-bundle [Unix]
if: matrix.config.os != 'windows-latest'
run: |
curl -L https://github.com/cosmiccrew/cargo-bundle/releases/download/binaries/cargo-bundle-${{ matrix.config.os }} -o cargo-bundle
chmod +x cargo-bundle
mv cargo-bundle $HOME/.cargo/bin/cargo-bundle
run: cargo install --git https://github.com/burtonageo/cargo-bundle

- name: Install ${{ matrix.config.target }} target
run: rustup target add ${{ matrix.config.target }}


- name: 🛠 Build [windows]
if: matrix.config.os == 'windows-latest'
run: cargo build --release --locked --target ${{ matrix.config.target }}
run: |
cargo build --release --locked --features bundle --target ${{ matrix.config.target }}
- name: 🛠 Build + Bundle [Linux]
if: matrix.config.os == 'ubuntu-latest'
run: |
cargo install cross --locked
cross build --release --target ${{ matrix.config.target }}
CARGO_BUNDLE_SKIP_BUILD=1 cargo bundle --release --target ${{ matrix.config.target }}
CARGO_BUNDLE_SKIP_BUILD=1 cargo bundle --release --features bundle --target ${{ matrix.config.target }}
- name: 🛠 Build + Bundle [Macos]
if: matrix.config.os == 'macos-latest'
run: cargo bundle --release --target ${{ matrix.config.target }}

run: |
cargo build --release --target --locked --features bundle ${{ matrix.config.target }}
CARGO_BUNDLE_SKIP_BUILD=1 cargo bundle --release --features bundle --target ${{ matrix.config.target }}
- name: Prepare artifacts [Windows]
shell: bash
Expand Down
137 changes: 1 addition & 136 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 12 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "galaxy"
version = "0.1.0"
version = "0.2.0"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/cosmiccrew/galaxy"
Expand All @@ -21,15 +21,13 @@ resources = ["assets"]
[dependencies]
#the bevy game engine itself
bevy = { version = "0.11.2", default-features = false, features = [ "android_shared_stdcxx", "animation", "bevy_animation", "bevy_asset", "bevy_audio", "bevy_core_pipeline", "bevy_gilrs", "bevy_gizmos", "bevy_gltf", "bevy_pbr", "bevy_render", "bevy_scene", "bevy_sprite", "bevy_text", "bevy_ui", "bevy_winit", "default_font", "filesystem_watcher", "hdr", "ktx2", "png", "serialize", "tonemapping_luts", "vorbis", "zstd", "multi-threaded"] } #the removal of default-features is needed to enable webgpu wasm backend.
#full on basic editor/debug engine for bevy.
bevy_editor_pls = { git = "https://github.com/jakobhellermann/bevy_editor_pls.git", optional = true }
#resource and asset inspection in bevy
bevy-inspector-egui = "0.19.0"
bevy-inspector-egui = { version = "0.19.0", optional = true }
#2d physics engine in bevy
bevy_xpbd_2d = { git = "https://github.com/Jondolf/bevy_xpbd", features = ["enhanced-determinism"] }
#bevu "rollback" ggrs networking library
bevy_ggrs = { version = "0.13.0", features = ["wasm-bindgen"] }
bevy_matchbox = { version = "0.7.0", features = ["ggrs"] }
bevy_ggrs = { version = "0.13.0", features = ["wasm-bindgen"], optional = true }
bevy_matchbox = { version = "0.7.0", features = ["ggrs"], optional = true }

#helps with loading assets in a logical, dynamic format.
bevy_asset_loader = { version = "0.17.0", features = ["2d", "standard_dynamic_assets"] }
Expand All @@ -47,12 +45,17 @@ clap = { version = "4.4.0", features = ["derive"] }


[features]
default = ["debug"]
default = []

fast_compile = ["bevy/dynamic_linking"]
ci_testing = ["bevy/bevy_ci_testing"]

debug = ["bevy_editor_pls", "bevy_xpbd_2d/debug-plugin"]
debug = ["bevy-inspector-egui", "bevy_xpbd_2d/debug-plugin"]

#to reduce the number of dependencies until networking is a feature
networking = ["bevy_ggrs", "bevy_matchbox"]

#used to set the correct asset paths for bundling
bundle = []

# long_description

Expand Down
6 changes: 3 additions & 3 deletions Cross.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[target.x86_64-unknown-linux-gnu]
pre-build = [
"dpkg --add-architecture $CROSS_DEB_ARCH",
"apt-get update && apt-get install -y pkg-config libasound2-dev:$CROSS_DEB_ARCH libudev-dev:$CROSS_DEB_ARCH",
"apt-get update && apt-get install -y pkg-config libasound2-dev:$CROSS_DEB_ARCH libudev-dev:$CROSS_DEB_ARCH --no-install-recommends",
]

[target.aarch64-unknown-linux-gnu]
pre-build = [
"dpkg --add-architecture $CROSS_DEB_ARCH",
"apt-get update && apt-get install -y pkg-config libasound2-dev:$CROSS_DEB_ARCH libudev-dev:$CROSS_DEB_ARCH",
]
"apt-get update && apt-get install -y pkg-config libasound2-dev:$CROSS_DEB_ARCH libudev-dev:$CROSS_DEB_ARCH --no-install-recommends",
]
Loading

0 comments on commit fa56819

Please sign in to comment.