Skip to content

chore: release v0.9.0-alpha.2 #188

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 223 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
223 commits
Select commit Hold shift + click to select a range
5d7d7c9
Bevy 0.15 Support (#139)
makspll Nov 9, 2024
0a7a22b
Fix typo in workflow (#142)
makspll Nov 9, 2024
2afb31f
Bump Bevy release candidate (#143)
makspll Nov 10, 2024
b3615f9
chore: release v0.8.0-alpha.1 (#145)
github-actions[bot] Nov 10, 2024
553f02e
Fix failing doctest (#146)
makspll Nov 10, 2024
1dfe12e
fix: bug when compiling without `teal` feature (#148)
makspll Nov 10, 2024
16f4652
migrate work on core improvements from feature/better-trait-system to…
makspll Nov 10, 2024
1eb98b4
bring over bevy api gen work
makspll Nov 10, 2024
44f66c3
don't check for all std traits being present
makspll Nov 10, 2024
1a783f3
bring in bms_lua changes
makspll Nov 10, 2024
2959959
Finally get a world proxy going for lua :sparkles:
makspll Nov 13, 2024
37eb231
FIRST PASSING LUA WORLD API TESTS
makspll Nov 13, 2024
8a36f8f
Lua integration tests with some of the API's working!
makspll Nov 14, 2024
8c16d8c
Add lua test API and add pass more tests
makspll Nov 14, 2024
19985af
remove git repo in test_utils
makspll Nov 14, 2024
01dcf8e
add tests for api availability
makspll Nov 14, 2024
0f64852
remove unused file
makspll Nov 14, 2024
9022289
make things clone
makspll Nov 14, 2024
691b02b
Fix some tests
makspll Nov 14, 2024
b9ca2b0
more tests
makspll Nov 14, 2024
21e3333
Complete test suite for world methods
makspll Nov 15, 2024
0b9e277
re-implement dynamic queries
makspll Nov 15, 2024
debaa16
Re-implement changes to rhai and rune, and fix event recipients example
makspll Nov 19, 2024
1f329aa
update more examples
makspll Nov 19, 2024
d1f37a8
register option lua types for ALL THE TYPES BABY
makspll Nov 24, 2024
60857bb
register vec lua types FOR ALL THE TYPES BABY
makspll Nov 25, 2024
e347a8b
improve type data, and add iterator to reflect ref
makspll Dec 1, 2024
5f34f88
WIP
makspll Dec 2, 2024
c222a03
Bump bevy & bevy console (#153)
makspll Dec 3, 2024
7a7299d
Luau support attempt (#154)
makspll Dec 3, 2024
c76b062
Small fixes (#155)
makspll Dec 3, 2024
85aa070
Begin work on docs book (#156)
makspll Dec 3, 2024
f35103e
chore: release v0.8.0-alpha.2 (#147)
github-actions[bot] Dec 3, 2024
b238bfc
chore: Require conventional titles (#157)
makspll Dec 3, 2024
48cc5b8
Merge branch 'staging' into feature/bevy-system-refactor
makspll Dec 3, 2024
34164ed
Merge branch 'main' into feature/bevy-system-refactor
makspll Dec 3, 2024
e01c516
merge
makspll Dec 3, 2024
d11ff2a
WIP, refactor things
makspll Dec 6, 2024
29b9e6f
Finish generic implementations for insert,pop,clear etc..
makspll Dec 7, 2024
2ba0b4e
Add back metamethods for math types
makspll Dec 9, 2024
3c37ff2
360 turn - WIP, implementing dynamic dispatch
makspll Dec 12, 2024
8bfd501
DYNAMIC CALLS WOOOOOOO
makspll Dec 14, 2024
7743b2e
Implement ScriptValue things
makspll Dec 14, 2024
f2905c7
re-do newindex
makspll Dec 15, 2024
85f2e9e
dynamic get and set calls
makspll Dec 15, 2024
f10ad4c
refactor errors considerably
makspll Dec 15, 2024
fb9f71b
fix errors
makspll Dec 15, 2024
ffe2441
properly re-catch mlua errors
makspll Dec 15, 2024
69a1344
add comments to error type
makspll Dec 15, 2024
05001fc
update to mlua 10.0
makspll Dec 15, 2024
c805a2b
add support for list
makspll Dec 15, 2024
6c339ce
refactor a bit
makspll Dec 15, 2024
6b1f041
move script value things into another module
makspll Dec 16, 2024
defd052
WIP
makspll Dec 16, 2024
d40838b
Big things coming
makspll Dec 17, 2024
811ef75
fix lifetime issue, allow refs
makspll Dec 17, 2024
4af4331
refactor accesses slightly
makspll Dec 17, 2024
56fa757
change core functions to script functions
makspll Dec 17, 2024
e4cbb26
remove older stuff
makspll Dec 17, 2024
db825a5
shift to bakery paradigm
makspll Dec 17, 2024
b5f85e7
initial from_script_ref
maksymilian-mozolewski Dec 20, 2024
2901273
handle errors properly
maksymilian-mozolewski Dec 20, 2024
7f1c7f5
re-enable list applies
maksymilian-mozolewski Dec 20, 2024
cfa9a01
WIP
maksymilian-mozolewski Dec 20, 2024
06c6d00
work out function type dependency registration basics
maksymilian-mozolewski Dec 21, 2024
5de0fec
properly register the top level types too
maksymilian-mozolewski Dec 21, 2024
ef60be3
bump bevy api gen
maksymilian-mozolewski Dec 22, 2024
ccb56d5
move bindings gen to actions
maksymilian-mozolewski Dec 27, 2024
d0f5ce6
call bindgen in bevy_api_gen workflow
makspll Dec 27, 2024
c8f3690
fix typo
makspll Dec 27, 2024
063c804
change deps
makspll Dec 27, 2024
33ad952
fix missing dir
makspll Dec 27, 2024
5c9abd8
more fix
makspll Dec 27, 2024
fc6af04
fix typos
makspll Dec 27, 2024
405763f
fix dirs
makspll Dec 27, 2024
63d39f8
split steps
makspll Dec 27, 2024
c9e6a9c
git clone into folder
makspll Dec 27, 2024
9bb68ac
print more
makspll Dec 27, 2024
857f801
fix tpyo
makspll Dec 27, 2024
eb6b888
fix relative things
makspll Dec 27, 2024
e0f85a8
fix ci creds
makspll Dec 27, 2024
d1392bf
permissions write
makspll Dec 27, 2024
f75443f
change pr logic
makspll Dec 27, 2024
52043ae
pull request write perms
makspll Dec 27, 2024
7a8737a
update pr logic
makspll Dec 27, 2024
fe57c1e
prune json files
makspll Dec 27, 2024
08da08a
update pr opening logic
makspll Dec 27, 2024
ff95931
change description
makspll Dec 27, 2024
ec1b101
don't do anything if no changes
makspll Dec 27, 2024
6110b50
modify templates
makspll Dec 28, 2024
2d01122
fix commas
makspll Dec 28, 2024
76a2443
chore(codegen): update bevy bindings (#170)
github-actions[bot] Dec 28, 2024
4d92a58
fix small issues
makspll Dec 28, 2024
675ae80
chore(codegen): update bevy bindings (#171)
github-actions[bot] Dec 28, 2024
b83e9db
fix small thing
makspll Dec 28, 2024
88c361e
chore(codegen): update bevy bindings (#172)
github-actions[bot] Dec 28, 2024
5a95c6b
try into args
makspll Dec 28, 2024
a2bdf4a
fix typo
makspll Dec 28, 2024
d081eb7
chore(codegen): update bevy bindings (#173)
github-actions[bot] Dec 28, 2024
b1f47c6
imports
makspll Dec 28, 2024
3d5123d
chore(codegen): update bevy bindings (#174)
github-actions[bot] Dec 28, 2024
cbcfd5f
move bindings under different module
makspll Dec 28, 2024
183ec61
change imports
makspll Dec 28, 2024
34ff684
chore(codegen): update bevy bindings (#175)
github-actions[bot] Dec 28, 2024
7d4af77
fix arg conversions and import
makspll Dec 28, 2024
8cc21cf
fix nightly toolchain in check ci
makspll Dec 28, 2024
dde1d60
chore(codegen): update bevy bindings (#176)
github-actions[bot] Dec 28, 2024
7a5c327
Merge branch 'feature/bevy-system-refactor' of github.com:makspll/bev…
makspll Dec 28, 2024
da0ed0c
imports..
makspll Dec 28, 2024
0eb4d6c
clean up imports and fix spacing
makspll Dec 28, 2024
c499d15
add windows utils for local dev
makspll Dec 28, 2024
427a92d
imports
makspll Dec 28, 2024
593f1c0
trigger CI
makspll Dec 28, 2024
9724fd1
chore(codegen): update bevy bindings (#177)
github-actions[bot] Dec 28, 2024
3a3a8c1
trait things
makspll Dec 28, 2024
972ee1f
clean up versions from last pre-release
makspll Dec 28, 2024
287ea6b
select new pre-release version
makspll Dec 28, 2024
2311322
chore(codegen): update bevy bindings (#178)
github-actions[bot] Dec 28, 2024
14bb044
fix mutability
makspll Dec 28, 2024
e62186b
clippyies
makspll Dec 28, 2024
7722258
chore(codegen): update bevy bindings (#179)
github-actions[bot] Dec 28, 2024
506022b
Merge branch 'feature/bevy-system-refactor' of github.com:makspll/bev…
makspll Dec 28, 2024
8e03e54
trait calls
makspll Dec 28, 2024
f8f778c
chore(codegen): update bevy bindings (#180)
github-actions[bot] Dec 28, 2024
98319a2
get bindings compiling, add more impls
makspll Dec 29, 2024
ef90872
get static calls working
makspll Dec 29, 2024
4034c1c
delete deprecated code
makspll Dec 29, 2024
fe90eaf
actually release access after function calls
makspll Dec 29, 2024
c7fba03
remove need for world jerry-rig, use static reference
makspll Dec 29, 2024
c211f87
compilation error
makspll Dec 30, 2024
68ba256
implement the rest of reflect reference functions
makspll Dec 30, 2024
9b29247
add script function registry and update registrations
makspll Dec 31, 2024
1899ffa
chore(codegen): update bevy bindings (#181)
github-actions[bot] Dec 31, 2024
4f20f12
fix conversion
makspll Dec 31, 2024
0f46de6
make overloading work for subtraction
makspll Dec 31, 2024
6540642
fill in all the other operators in lua
makspll Dec 31, 2024
5848e6f
implement iterators, and add function passing
makspll Dec 31, 2024
4b7622e
allow passing more arguments than needed
makspll Dec 31, 2024
9b269c4
just lookup length for iteration for now
makspll Dec 31, 2024
258ba8f
make iteration work
makspll Dec 31, 2024
dce02e8
feat: Complete Crate Re-write (#160)
makspll Dec 31, 2024
341f0f1
update relesae plz config
makspll Dec 31, 2024
70ab8af
Merge branch 'staging' of github.com:makspll/bevy_mod_scripting into …
makspll Dec 31, 2024
514fef5
change release plz config
makspll Dec 31, 2024
31d720f
fix typo
makspll Dec 31, 2024
d6e329f
fix readme
makspll Dec 31, 2024
c599bff
remove macro tests, start publishing book, update readme
makspll Jan 2, 2025
483ab27
remove teal features
makspll Jan 2, 2025
53eb35f
complete first book deployment
makspll Jan 2, 2025
5f1296f
enable more flags in bevy functions
makspll Jan 2, 2025
93f0cb2
update docs and check.sh
makspll Jan 2, 2025
068e695
remove comment
makspll Jan 2, 2025
548eeb7
update docs
makspll Jan 2, 2025
478efdf
enable bevy input in functions for smol_str
makspll Jan 2, 2025
079ff47
it doens't exist
makspll Jan 2, 2025
71e6260
add summary entry
makspll Jan 2, 2025
ca62197
add heading
makspll Jan 2, 2025
1d578d4
update check.ps1 and generate exe
makspll Jan 2, 2025
a12b3e6
make headings better
makspll Jan 2, 2025
d247deb
add argument conversion notes
makspll Jan 2, 2025
c3a4efe
pin smol str, begin rhai work
makspll Jan 2, 2025
4872759
don't number installation page
makspll Jan 2, 2025
7ee53aa
allow optionally disabling bindings
makspll Jan 2, 2025
bb3e18d
add error conversions for rhai
makspll Jan 2, 2025
6a0ef28
fix issue with unsafe_lua_modules and rhai
makspll Jan 2, 2025
144eaae
change handle to weak so unloading strong handle is enough to delete …
makspll Jan 2, 2025
9adbe3f
add more conversions
makspll Jan 2, 2025
ca05cce
start cleaning up examples, use ScriptValue as argument for all things
makspll Jan 3, 2025
b27dc46
compile rune
makspll Jan 3, 2025
5734de1
update docs
makspll Jan 3, 2025
1cac0aa
make the generics more tenable, and update docs
makspll Jan 3, 2025
bc9b207
keep working on docs and fixing bugs
makspll Jan 4, 2025
a8664d1
add some js
makspll Jan 4, 2025
140c93c
separate out modules
makspll Jan 4, 2025
8e8bb3d
add nicer headings
makspll Jan 4, 2025
4347d50
add introduction
makspll Jan 4, 2025
9932a86
finally
makspll Jan 4, 2025
d52d896
improve logs and things
makspll Jan 4, 2025
0307fb9
add on load and unload hooks
makspll Jan 4, 2025
c42963a
add docs about callbacks
makspll Jan 4, 2025
f4d2125
change query signature slightly
makspll Jan 4, 2025
7bafd98
cleanup some imports
makspll Jan 4, 2025
e6beb49
clippy fixes
makspll Jan 4, 2025
7924df0
clippy fixes
makspll Jan 4, 2025
6aab6f0
clippy fixes
makspll Jan 4, 2025
c85c1c5
more clippy
makspll Jan 4, 2025
f811df5
fmt
makspll Jan 4, 2025
8190504
remove unnecessary examples
makspll Jan 4, 2025
3c96f44
remove trailing whitespace
makspll Jan 4, 2025
e903e67
remove doc gen for now
makspll Jan 4, 2025
aa34b7e
remove unused dependencies
makspll Jan 4, 2025
bdf9bfd
exclude rhai example for now
makspll Jan 4, 2025
705c10b
remove preludes, remove more crates
makspll Jan 4, 2025
5ba4cb4
further clean up
makspll Jan 5, 2025
1813cda
make display without world more sensible
makspll Jan 5, 2025
1c25ca9
fix test and small refactor
makspll Jan 5, 2025
466e718
fix typo
makspll Jan 5, 2025
9661c33
start integrating xtasks
makspll Jan 5, 2025
16c806d
improve xtasks and start integrating with ci
makspll Jan 5, 2025
c511936
add contributing guides and improve messages
makspll Jan 5, 2025
0f0daec
add docs command
makspll Jan 5, 2025
34b74f3
add docs command
makspll Jan 5, 2025
3d244c1
fix CI
makspll Jan 5, 2025
5721f82
fix typos
makspll Jan 5, 2025
e0c35b5
typo
makspll Jan 5, 2025
a662f52
parameterize more commands
makspll Jan 5, 2025
52461e1
fix command name
makspll Jan 5, 2025
93b14a3
add commands in the right place
makspll Jan 5, 2025
bcef798
add components to correct action
makspll Jan 5, 2025
7fefc13
add component installation to init
makspll Jan 5, 2025
e00d661
add coverage report
makspll Jan 5, 2025
2fd8426
fix bug
makspll Jan 5, 2025
cf08549
fix ci
makspll Jan 5, 2025
81373a0
Merge remote-tracking branch 'origin' into staging
makspll Jan 5, 2025
809e8fe
simplify ci, remove cross
makspll Jan 5, 2025
01c52d8
optimize powersets slightly, and change to ephemereal profile for spe…
makspll Jan 5, 2025
8022f2a
fix flipped condition and remove lua from features
makspll Jan 5, 2025
3a7264e
reduce feature combinations to test
makspll Jan 5, 2025
976d8c2
correct flags
makspll Jan 5, 2025
6a852e7
fix
makspll Jan 5, 2025
51ca262
fix possible errors
makspll Jan 5, 2025
87612ec
don't fail on coverage upload failure
makspll Jan 5, 2025
07d67cb
chore: release v0.9.0-alpha.2
github-actions[bot] Jan 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
[env]
TARGET_DIR = { value = "target", relative = true }

[alias]
xtask = "run --package xtask --"
22 changes: 17 additions & 5 deletions .github/workflows/bevy_api_gen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@ on:
paths:
- "crates/bevy_api_gen/**"
- ".github/workflows/bevy_api_gen.yml"
- ".github/workflows/generate_bindings.yml"



name: Check and Lint - bevy_api_gen

env:
RUST_TOOLCHAIN: nightly-2024-12-15

jobs:
check:
name: Check - bevy_api_gen
Expand All @@ -25,7 +30,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2024-11-05
toolchain: ${{ env.RUST_TOOLCHAIN }}
override: true
- name: Rust Cache
uses: Swatinem/[email protected]
Expand All @@ -52,7 +57,7 @@ jobs:
with:
profile: minimal
components: rustfmt
toolchain: nightly-2024-11-05
toolchain: ${{ env.RUST_TOOLCHAIN }}
override: true
- name: Rust Cache
uses: Swatinem/[email protected]
Expand All @@ -75,7 +80,7 @@ jobs:
rm -rf crates
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2024-11-05
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: clippy
override: true
- name: Rust Cache
Expand All @@ -98,7 +103,7 @@ jobs:
rm -rf crates
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2024-11-05
toolchain: ${{ env.RUST_TOOLCHAIN }}
override: true
- name: Rust Cache
uses: Swatinem/[email protected]
Expand All @@ -120,7 +125,7 @@ jobs:
rm -rf crates
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2024-11-05
toolchain: ${{ env.RUST_TOOLCHAIN }}
override: true
- name: Rust Cache
uses: Swatinem/[email protected]
Expand All @@ -131,3 +136,10 @@ jobs:
with:
command: doc
args: --profile=ephemeral-build
bindings:
permissions:
contents: write
pull-requests: write
name: Generate Bindings - bevy_api_gen
uses: ./.github/workflows/generate_bindings.yml
secrets: inherit
114 changes: 16 additions & 98 deletions .github/workflows/bevy_mod_scripting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,93 +21,27 @@ concurrency:
cancel-in-progress: true

jobs:
check:
check:
permissions:
pull-requests: write
name: Check - ${{ matrix.run_args.label }}
runs-on: ${{ matrix.run_args.os }}
strategy:
matrix:
run_args: [
{label: Windows - All Features, os: windows-latest, features: "lua54,rhai,teal,lua_script_api,rhai_script_api,rune", cross: x86_64-pc-windows-msvc },
{label: MacOS - All Features, os: macOS-latest, features: "lua54,rhai,teal,lua_script_api,rhai_script_api,rune", cross: x86_64-apple-darwin },
{label: Ubuntu - All Features, os: ubuntu-latest, features: "lua54,lua_script_api,rhai,teal,rhai_script_api,rune", cross: x86_64-unknown-linux-gnu },
{label: Ubuntu Aarch64 - All Features, os: ubuntu-latest, features: "lua54,rhai,teal,lua_script_api,rhai_script_api,rune", cross: aarch64-unknown-linux-gnu },
{label: Ubuntu - Lua51, os: ubuntu-latest, features: "lua51,lua_script_api", cross: x86_64-unknown-linux-gnu },
{label: Ubuntu - Lua52, os: ubuntu-latest, features: "lua52,lua_script_api", cross: x86_64-unknown-linux-gnu },
{label: Ubuntu - Lua53, os: ubuntu-latest, features: "lua53,lua_script_api", cross: x86_64-unknown-linux-gnu },
{label: Ubuntu - Luajit, os: ubuntu-latest, features: "luajit,lua_script_api", cross: x86_64-unknown-linux-gnu },
{label: Ubuntu - Luajit52, os: ubuntu-latest, features: "luajit52,lua_script_api", cross: x86_64-unknown-linux-gnu },
{label: Ubuntu - Luau, os: ubuntu-latest, features: "luau,lua_script_api", cross: x86_64-unknown-linux-gnu }

{label: Windows, os: windows-latest },
{label: MacOS, os: macOS-latest },
{label: Ubuntu, os: ubuntu-latest },
{label: Ubuntu Aarch64, os: ubuntu-latest }
]
steps:
- if: runner.os == 'linux'
name: Install alsa and udev
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Rust Cache
uses: Swatinem/[email protected]
- if: runner.os != 'windows'
name: Clear space
run: rm -rf /usr/share/dotnet; rm -rf /opt/ghc; rm -rf "/usr/local/share/boost"; rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: houseabsolute/actions-rust-cross@v0
with:
command: check
target: ${{ matrix.run_args.cross }}
args: --workspace --features=${{ matrix.run_args.features }} --profile=ephemeral-build

fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- name: Install alsa and udev
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
components: rustfmt
toolchain: stable
override: true
- name: Rust Cache
uses: Swatinem/[email protected]
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- name: Install alsa and udev
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy
override: true
- name: Rust Cache
uses: Swatinem/[email protected]
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --features=lua54,rhai,teal,lua_script_api,rhai_script_api,rune --profile=ephemeral-build -- -D warnings
tests:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Clear space
run: sudo rm -rf /usr/share/dotnet; sudo rm -rf /opt/ghc; sudo rm -rf "/usr/local/share/boost"; sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Checkout
uses: actions/checkout@v3
- 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'
run: |
sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
sudo rm -rf /usr/share/dotnet; sudo rm -rf /opt/ghc; sudo rm -rf "/usr/local/share/boost"; sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
Expand All @@ -116,25 +50,9 @@ jobs:
uses: Swatinem/[email protected]
- uses: actions-rs/cargo@v1
with:
command: test
args: --workspace --features=lua54,rhai,teal,lua_script_api,rhai_script_api,rune --profile=ephemeral-build
docs:
name: Docs
runs-on: ubuntu-latest
steps:
- name: Install alsa and udev
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Rust Cache
uses: Swatinem/[email protected]
- name: Find docs.rs features
run: echo "DOCS_FEATURES=$(cargo metadata --no-deps | python -c "import sys,json; [print(','.join(x['metadata']['docs.rs']['features'])) for x in json.load(sys.stdin)['packages'] if x['name'] == 'bevy_mod_scripting']")" >> $GITHUB_OUTPUT
id: features
- uses: actions-rs/cargo@v1
command: xtask
args: ci-check
- uses: romeovs/[email protected]
continue-on-error: true
with:
command: doc
args: --workspace --features=${{ steps.features.outputs.DOCS_FEATURES }} --profile=ephemeral-build
lcov-file: ./target/coverage/lcov.info
60 changes: 0 additions & 60 deletions .github/workflows/doc_gen.yml

This file was deleted.

93 changes: 93 additions & 0 deletions .github/workflows/generate_bindings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Generate Bindings (Bevy, Glam)

on:
workflow_call:
# inputs:
# config-path:
# required: true
# type: string
# secrets:
# token:
# required: true
workflow_dispatch:

env:
RUST_TOOLCHAIN: nightly-2024-12-15
BEVY_API_GEN_PATH: ${{ github.workspace }}/crates/bevy_api_gen
BEVY_PATH: ${{ github.workspace }}/target/codegen/bevy
OUTPUT_PATH: ${{ github.workspace }}/crates/bevy_mod_scripting_functions/src/bevy_bindings/
BEVY_FEATURES: bevy_asset,bevy_animation,bevy_core_pipeline,bevy_ui,bevy_pbr,bevy_render,bevy_text,bevy_sprite,file_watcher,multi_threaded
BRANCH_NAME: __update-bevy-bindings-${{ github.head_ref || github.ref_name }}
GH_TOKEN: ${{ github.token }}

jobs:
generate_bindings:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bot GitHub Credentials
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Install Rust Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: rust-src, rustc-dev, llvm-tools-preview
override: true
- name: Install bevy_api_gen Binaries
run: cargo install --path ${{ env.BEVY_API_GEN_PATH }}
- name: read bevy workspace version
uses: SebRollen/[email protected]
id: read_toml
with:
file: 'Cargo.toml'
field: 'workspace.dependencies.bevy.version'
- name: Prepare Directories
run: |
mkdir -p ${{ env.OUTPUT_PATH }}
mkdir -p ${{ env.BEVY_PATH }}
- name: Clone Bevy
run: |
git clone https://github.com/bevyengine/bevy --branch v${{ steps.read_toml.outputs.value }} --depth 1 ${{ env.BEVY_PATH }}
cd ${{ env.BEVY_PATH }} && git fetch --tags && git checkout v${{ steps.read_toml.outputs.value }}
ls -la ${{ env.BEVY_PATH }}
- name: Generate Bevy Bindings
run: |
cd ${{ env.BEVY_PATH }} && cargo bevy-api-gen generate --output ${{ env.OUTPUT_PATH }} --template-args '{ "self_is_bms_lua": true}' --features ${{ env.BEVY_FEATURES }} -vv
- name: Collect Bevy Bindings
run: |
ls -la ${{ env.BEVY_PATH }}
cd ${{ env.BEVY_PATH }} && cargo bevy-api-gen collect --output ${{ env.OUTPUT_PATH }} --template-args '{ "self_is_bms_lua": true}'
- name: Prune Output
run: |
find ${{ env.OUTPUT_PATH }} -type f ! -name "*.rs" -delete
- name: Check for changes
id: check_changes
run: |
if [[ -n $(git status --porcelain) ]]; then
echo "changes=true" >> "$GITHUB_OUTPUT";
fi
- name: Commit Changes
if: steps.check_changes.outputs.changes
run: |
git checkout -b ${{ env.BRANCH_NAME }} || git checkout ${{ env.BRANCH_NAME }}
git add -A
git commit -m "chore(codegen): update bevy bindings"
git push -u origin ${{ env.BRANCH_NAME }} --force
- uses: jwalton/gh-find-current-pr@master
if: steps.check_changes.outputs.changes
id: findPR
with:
state: all
- name: Create Or Update PR
if: steps.check_changes.outputs.changes && success() && steps.findPR.outputs.number
run: |
gh pr list --base feature/bevy-system-refactor --search "chore(codegen): update bevy bindings" --json number > prs.json
if [ $(jq '. | length' prs.json) -eq 0 ]; then
gh pr create --title "chore(codegen): update bevy bindings" --body "This PR updates the bevy bindings for #${{ steps.findPR.outputs.number }}" --base ${{ github.ref }} --head ${{ env.BRANCH_NAME }} || true
fi
Loading