diff --git a/.github/build_godot_cache.sh b/.github/build_godot_cache.sh index 02777a3..c3b52d2 100755 --- a/.github/build_godot_cache.sh +++ b/.github/build_godot_cache.sh @@ -27,4 +27,4 @@ done godot_job=$(jobs -p) -kill $godot_job \ No newline at end of file +kill -s TERM $godot_job diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9578448..57bfdd1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -130,27 +130,53 @@ jobs: uses: actions/download-artifact@v3 with: name: libnative-linux-x86_64 - path: native/target/x86_64-unknown-linux-gnu/release/ + path: native/target/x86_64-unknown-linux-gnu/debug/ - name: download x86_64 libs if: matrix.x86_64 uses: actions/download-artifact@v3 with: name: libnative-${{ matrix.platform }}-x86_64 - path: native/target/x86_64-${{ matrix.vendor }}-${{ matrix.platform }}${{ matrix.env }}/release/ + path: native/target/x86_64-${{ matrix.vendor }}-${{ matrix.platform }}${{ matrix.env }}/debug/ - name: download aarch64 libs if: matrix.aarch64 uses: actions/download-artifact@v3 with: name: libnative-${{ matrix.platform }}-aarch64 - path: native/target/aarch64-${{ matrix.vendor }}-${{ matrix.platform }}${{ matrix.env }}/release/ + path: native/target/aarch64-${{ matrix.vendor }}-${{ matrix.platform }}${{ matrix.env }}/debug/ - name: create universal libnative if: matrix.platform == 'darwin' run: | platform_dir="${{ matrix.vendor }}-${{ matrix.platform }}" - mkdir -p native/target/universal-$platform_dir/release/ - lipo -create native/target/x86_64-$platform_dir/release/${{ matrix.lib }} native/target/aarch64-$platform_dir/release/${{ matrix.lib }} -output native/target/universal-$platform_dir/release/${{ matrix.lib }} + mkdir -p native/target/universal-$platform_dir/debug/ + lipo -create native/target/x86_64-$platform_dir/debug/${{ matrix.lib }} native/target/aarch64-$platform_dir/debug/${{ matrix.lib }} -output native/target/universal-$platform_dir/debug/${{ matrix.lib }} + - name: copy libs + run: | + set -x + platform_dir="${{ matrix.vendor }}-${{ matrix.platform }}${{ matrix.env }}" + x86_64="native/target/x86_64-$platform_dir" + aarch64="native/target/aarch64-$platform_dir" + universal="native/target/universal-$platform_dir" + + if [[ -d "$x86_64/debug/" ]]; then + mkdir -p "$x86_64/release/" + cp $x86_64/debug/* "$x86_64/release/" + fi + + if [[ -d "$aarch64/debug/" ]]; then + mkdir -p "$aarch64/release/" + cp $aarch64/debug/* "$aarch64/release/" + fi + + if [[ -d "$universal/debug/" ]]; then + mkdir -p "$universal/release/" + cp $universal/debug/* "$universal/release/" + fi - name: import godot project - run: .github/build_godot_cache.sh + run: | + # import assets + .github/build_godot_cache.sh + # restart to make sure all rust scripts are detected + .github/build_godot_cache.sh - name: export-debug if: ${{ !inputs.release }} run: | diff --git a/native/Cargo.lock b/native/Cargo.lock index 64d3c2c..10a9e5c 100644 --- a/native/Cargo.lock +++ b/native/Cargo.lock @@ -270,7 +270,7 @@ dependencies = [ [[package]] name = "godot-rust-script" version = "0.1.0" -source = "git+https://github.com/titannano/godot-rust-script?rev=e36bf269cdac05b1a2280dbf39229f9279ec871a#e36bf269cdac05b1a2280dbf39229f9279ec871a" +source = "git+https://github.com/titannano/godot-rust-script?rev=5d96527d48544521b44a2952b7e5f0257f5110ae#5d96527d48544521b44a2952b7e5f0257f5110ae" dependencies = [ "const-str", "godot", @@ -283,7 +283,7 @@ dependencies = [ [[package]] name = "godot-rust-script-derive" version = "0.1.0" -source = "git+https://github.com/titannano/godot-rust-script?rev=e36bf269cdac05b1a2280dbf39229f9279ec871a#e36bf269cdac05b1a2280dbf39229f9279ec871a" +source = "git+https://github.com/titannano/godot-rust-script?rev=5d96527d48544521b44a2952b7e5f0257f5110ae#5d96527d48544521b44a2952b7e5f0257f5110ae" dependencies = [ "darling", "proc-macro2", diff --git a/native/Cargo.toml b/native/Cargo.toml index 77b0278..368f536 100644 --- a/native/Cargo.toml +++ b/native/Cargo.toml @@ -15,4 +15,4 @@ rayon = "1.5.1" itertools = "0.10.3" num_enum = "0.7.1" -godot-rust-script = { git = "https://github.com/titannano/godot-rust-script", rev = "e36bf269cdac05b1a2280dbf39229f9279ec871a" } +godot-rust-script = { git = "https://github.com/titannano/godot-rust-script", rev = "5d96527d48544521b44a2952b7e5f0257f5110ae" }