Skip to content

Commit f924cdb

Browse files
committed
more ci fixes
1 parent 90a27f4 commit f924cdb

File tree

8 files changed

+48
-6
lines changed

8 files changed

+48
-6
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
uses: dtolnay/rust-toolchain@master
7171
with:
7272
components: clippy
73-
toolchain: stable
73+
toolchain: nightly
7474
- name: install bevy dependencies
7575
run: sudo apt-get update && sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev libxkbcommon-dev
7676
shell: bash

Cargo.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,24 @@ strum = { version = "0.26", features = ["derive"] }
4343
num = "0.4"
4444
bevy_rich_text3d = { version = "0.2", default-features = false, features = ["2d"] }
4545

46+
[features]
47+
deployed_wasm_example = []
48+
4649
[dev-dependencies]
4750
bevy = { version = "0.15", features = ["bevy_dev_tools"] }
4851

52+
[[example]]
53+
name = "custom"
54+
path = "examples/custom.rs"
55+
doc-scrape-examples = true
56+
57+
[[example]]
58+
name = "world"
59+
path = "examples/world.rs"
60+
doc-scrape-examples = true
61+
62+
[[example]]
63+
name = "utils"
64+
path = "examples/utils.rs"
65+
doc-scrape-examples = true
66+
crate-type = ["lib"]

examples/custom.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
//! register custom frontends for any type
2+
3+
mod utils;
4+
use utils::*;
5+
26
use aalo::prelude::*;
37
use bevy::ecs::{component::ComponentId, world::DeferredWorld};
48
use bevy::prelude::*;
@@ -7,7 +11,7 @@ fn main() {
711
register_frontend("bool", custom_bool_frontend);
812
register_frontend("custom::CustomBoolComponent", custom_bool_frontend);
913
App::new()
10-
.add_plugins(DefaultPlugins)
14+
.add_plugins(DefaultPlugins.set(example_window_plugin()))
1115
.add_plugins(AaloPlugin::new().world().with_inspector(|inspector| {
1216
inspector.jump_to(("entity", "custom bool field", "boolcomponent", ".0"))
1317
}))

examples/utils.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#![allow(dead_code)]
2+
3+
use bevy::prelude::*;
4+
5+
pub(crate) fn example_window_plugin() -> WindowPlugin {
6+
WindowPlugin {
7+
primary_window: Some(Window {
8+
#[cfg(feature = "deployed_wasm_example")]
9+
canvas: Some("#bevy".to_string()),
10+
fit_canvas_to_parent: true,
11+
prevent_default_event_handling: true,
12+
..default()
13+
}),
14+
..default()
15+
}
16+
}

examples/world.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
//! basic world inspector, inspired by https://github.com/jakobhellermann/bevy-inspector-egui/blob/main/crates/bevy-inspector-egui/examples/quick/world_inspector.rs
2+
3+
mod utils;
4+
use utils::*;
5+
26
use aalo::prelude::*;
37
use bevy::prelude::*;
48

59
fn main() {
610
App::new()
7-
.add_plugins(DefaultPlugins)
11+
.add_plugins(DefaultPlugins.set(example_window_plugin()))
812
.add_plugins(AaloPlugin::new().world().with_inspector(|inspector| {
913
inspector.jump_to(("entity", "my cube", "transform", ".translation"))
1014
}))

justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ doctest:
1111
test: doctest
1212

1313
clippy *extras:
14-
cargo clippy --all-features --all-targets --locked -- --deny warnings --no-deps {{ extras }}
14+
cargo +nightly clippy --all-features --all-targets --locked -- --deny warnings --no-deps {{ extras }}
1515

1616
# TODO: --all-features flag doesn't work because examples shenanigans
1717
check_all_features:

nickel/ci.ncl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ let { uppercase_fields, sync_name_field, run_on_ubuntu_latest, .. } = import "ut
3030
clippy = {
3131
steps = [
3232
checkout,
33-
rust_toolchain & { with = { components = "clippy" } },
33+
rust_toolchain & { with = { toolchain = "nightly", components = "clippy" } },
3434
bevy_dependencies,
3535
cached_target_populate,
3636
just,

nickel/wasm_example_index_template.ncl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ let global_styles = "height: 100%; width: 100%; margin: 0; padding: 0; border: 0
1111
<meta charset="utf-8" />
1212
<title>haalka %{ example } example</title>
1313
<link data-trunk rel="copy-dir" href="assets" />
14-
<link data-trunk rel="rust" data-cargo-features="debug,deployed_wasm_example,%{ features |> std.string.join "," }" data-wasm-opt="s" href="." />
14+
<link data-trunk rel="rust" data-cargo-features="deployed_wasm_example,%{ features |> std.string.join "," }" data-wasm-opt="s" href="." />
1515
</head>
1616

1717
<body style="%{ global_styles }">

0 commit comments

Comments
 (0)