Skip to content

Commit

Permalink
prefer-dynamic
Browse files Browse the repository at this point in the history
  • Loading branch information
naomijub committed Apr 7, 2024
1 parent c3af306 commit 9b530df
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 12 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,15 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo_${{ hashFiles('**/Cargo.toml') }}
key: ${{ runner.os }}-cargo-nofeatures_${{ hashFiles('**/Cargo.toml') }}
- name: Install stable@stable toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install Dependencies
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev
- name: Run cargo test
run: cargo test --workspace --no-default-features --profile=ci --features "dynamic_linking"
env:
RUSTFLAGS: "-C debuginfo=0 -C prefer-dynamic"

test_all:
name: Test all features
Expand All @@ -73,6 +75,8 @@ jobs:
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev
- name: Run cargo test
run: cargo test --workspace --all-features --profile=ci
env:
RUSTFLAGS: "-C debuginfo=0 -C prefer-dynamic"

test_all_macos_n_windows:
strategy:
Expand All @@ -99,7 +103,7 @@ jobs:
- name: Run cargo test
run: cargo test --workspace --all-features --profile=ci
env:
RUSTFLAGS: "-C debuginfo=0"
RUSTFLAGS: "-C debuginfo=0 -C prefer-dynamic"


# Run cargo clippy -- -D warnings
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/example_validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ jobs:
# this uses the same command as when running the example to ensure build is reused
run: CARGO_PROFILE_RELEASE_DEBUG=true TRACE_CHROME=trace-platformer.json CI_TESTING_CONFIG=.github/example-run/platformer.ron cargo +nightly build --example platformer --profile=ci --features "bevy_xpbd_3d,bevy/bevy_ci_testing,bevy/trace_chrome,bevy/trace,backtrace"
env:
RUSTFLAGS: "-C debuginfo=0"
RUSTFLAGS: "-C debuginfo=0 -C prefer-dynamic"
- name: Run examples
env:
RUSTFLAGS: "-C debuginfo=0"
RUSTFLAGS: "-C debuginfo=0 -C prefer-dynamic"
run: |
example_name=`basename plaformer.ron`
echo -n $example_name > last_example_run
Expand Down Expand Up @@ -122,10 +122,10 @@ jobs:
# this uses the same command as when running the example to ensure build is reused
run: TRACE_CHROME=trace-spawn_prefab_with_physics.json CI_TESTING_CONFIG=.github/example-run/spawn_prefab_with_physics.ron cargo +nightly build --example spawn_prefab_with_physics --profile=ci --features "bevy_xpbd_3d,bevy/bevy_ci_testing,bevy/trace_chrome,bevy/trace"
env:
RUSTFLAGS: "-C debuginfo=0"
RUSTFLAGS: "-C debuginfo=0 -C prefer-dynamic"
- name: Run examples
env:
RUSTFLAGS: "-C debuginfo=0"
RUSTFLAGS: "-C debuginfo=0 -C prefer-dynamic"
run: |
example_name=`basename plaformer.ron`
echo -n $example_name > last_example_run
Expand Down Expand Up @@ -190,10 +190,10 @@ jobs:
# this uses the same command as when running the example to ensure build is reused
run: TRACE_CHROME=trace-external_plugin.json CI_TESTING_CONFIG=.github/example-run/external_plugin.ron cargo +nightly build --bin plugin_test --profile=ci --features "bevy/bevy_ci_testing,bevy/trace_chrome,bevy/trace"
env:
RUSTFLAGS: "-C debuginfo=0"
RUSTFLAGS: "-C debuginfo=0 -C prefer-dynamic"
- name: Run examples
env:
RUSTFLAGS: "-C debuginfo=0"
RUSTFLAGS: "-C debuginfo=0 -C prefer-dynamic"
run: |
example_name=`basename plaformer.ron`
echo -n $example_name > last_example_run
Expand Down
2 changes: 1 addition & 1 deletion crates/editor_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ homepage.workspace = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[lib]
crate-type = ["dylib"]
crate-type = ["rlib", "dylib"]

[dependencies]
bevy.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crates/editor_tabs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repository.workspace = true
homepage.workspace = true

[lib]
crate-type = ["dylib"]
crate-type = ["rlib", "dylib"]

[features]
dynamic_linking = ["bevy/dynamic_linking",]
Expand Down
2 changes: 1 addition & 1 deletion crates/editor_ui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ homepage.workspace = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[lib]
crate-type = ["dylib"]
crate-type = ["rlib", "dylib"]

[features]
dynamic_linking = [
Expand Down
2 changes: 1 addition & 1 deletion crates/persistence/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ homepage.workspace = true

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lib]
crate-type = ["dylib"]
crate-type = ["rlib", "dylib"]

[features]
dynamic_linking = ["bevy/dynamic_linking",]
Expand Down

0 comments on commit 9b530df

Please sign in to comment.