From 939b1eaa690c3478d8c1fa00dd35c155491f395e Mon Sep 17 00:00:00 2001 From: QueenOfSquiggles <8940604+QueenOfSquiggles@users.noreply.github.com> Date: Mon, 9 Sep 2024 13:33:47 -0500 Subject: [PATCH] Upgraded to bevy 0.14.0; All tests and examples passing (#43) * Upgraded to bevy 0.14.0; All tests and examples passing * Made error handling in example more clear * Revert to simple unwrap * Switched to git repo for crate Git version of the crate seems to more reliably provide the steamworks SDK, which will cause strange errors at startup if not prooperly configured. Targeting the same specific tag that the version of crates.io so this shouldn't cause unecessary problems. Manual upgrades will need to be done over time. At this point I might just be willing to maintain this crate since it's so useful for publishing games on steam! * More robust CI --- .github/workflows/ci.yml | 31 +++++++++++++++++++++---------- Cargo.toml | 12 ++++++------ examples/basic.rs | 2 +- src/lib.rs | 4 ++-- 4 files changed, 30 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d67f4cb..96921b6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,6 @@ name: CI -on: [push, pull_request] +on: [push, pull_request, workflow_dispatch] env: CARGO_TERM_COLOR: always @@ -8,23 +8,29 @@ env: jobs: build: strategy: + fail-fast: false matrix: os: [windows-latest, ubuntu-latest, macos-latest] - toolchain: [stable] + toolchain: [stable, nightly] + op: [build, test, clippy] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v2 - - uses: dtolnay/rust-toolchain@stable + - uses: actions-rs/toolchain@v1 + id: toolchain with: + toolchain: ${{ matrix.toolchain }} + profile: minimal components: rustfmt, clippy + override: true - name: Install alsa and udev run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev if: runner.os == 'linux' - name: Setup cache - uses: actions/cache@v4 + uses: actions/cache@v2 with: path: | ~/.cargo/registry @@ -32,10 +38,15 @@ jobs: target key: ${{ runner.os }}-test-rustc-${{ steps.toolchain.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.lock') }} - - run: cargo fmt --all -- --check - if: runner.os == 'linux' - - - run: cargo clippy --all-features + - uses: actions-rs/cargo@v1 if: runner.os == 'linux' + with: + command: fmt + args: --all -- --check - - run: cargo test --workspace \ No newline at end of file + - uses: actions-rs/cargo@v1 + with: + command: ${{ matrix.op }} + env: + CARGO_INCREMENTAL: 0 + RUSTFLAGS: "-C debuginfo=0" diff --git a/Cargo.toml b/Cargo.toml index 1dd1472..30dc94b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,11 +13,11 @@ default = [] serde = ["steamworks/serde"] [dependencies] -bevy_log = "0.13" -bevy_app = "0.13" -bevy_ecs = "0.13" -bevy_utils = "0.13" -steamworks = "0.11" +bevy_log = "0.14" +bevy_app = "0.14" +bevy_ecs = "0.14" +bevy_utils = "0.14" +steamworks = { git = "https://github.com/Noxime/steamworks-rs.git", tag="v0.11.0"} [dev-dependencies] -bevy = "0.13" +bevy = "0.14" diff --git a/examples/basic.rs b/examples/basic.rs index b9db844..7b0aaa1 100644 --- a/examples/basic.rs +++ b/examples/basic.rs @@ -19,5 +19,5 @@ fn main() { .add_plugins(SteamworksPlugin::init_app(480).unwrap()) .add_plugins(DefaultPlugins) .add_systems(Startup, steam_system) - .run() + .run(); } diff --git a/src/lib.rs b/src/lib.rs index 7dc3f63..125dde6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -21,7 +21,7 @@ //! // it is important to add the plugin before `RenderPlugin` that comes with `DefaultPlugins` //! .add_plugins(SteamworksPlugin::init_app(480).unwrap()) //! .add_plugins(DefaultPlugins) -//! .run() +//! .run(); //! } //! ``` //! @@ -52,7 +52,7 @@ //! .add_plugins(SteamworksPlugin::init_app(480).unwrap()) //! .add_plugins(DefaultPlugins) //! .add_systems(Startup, steam_system) -//! .run() +//! .run(); //! } //! ```