Skip to content

Commit

Permalink
Merge pull request #3962 from KBVE/dev
Browse files Browse the repository at this point in the history
Preparing Alpha Branch
  • Loading branch information
h0lybyte authored Feb 18, 2025
2 parents 30c1810 + c5df3d4 commit a2fd0a8
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 26 deletions.
97 changes: 72 additions & 25 deletions .github/workflows/rust-dll-tower-defense-build.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,77 @@
name: Build Rust Windows DLL

on:
workflow_dispatch:
workflow_dispatch:

jobs:
build:
runs-on: windows-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Install Rust Nightly with MSVC
run: |
rustup default nightly
rustup target add x86_64-pc-windows-msvc
rustup component add rust-src --toolchain nightly-x86_64-pc-windows-msvc
- name: Build Rust DLL
run: |
cd apps/rentearth/rust_godot_towerdefense
cargo +nightly build -Z build-std=std,panic_abort -Z unstable-options --target x86_64-pc-windows-msvc --release --out-dir dist/windows
- name: Upload DLL as Artifact
uses: actions/upload-artifact@v4
with:
name: rust_godot_towerdefense
path: apps/rentearth/rust_godot_towerdefense/dist/windows/*.dll
#path: dist/windows/*.dll
build:
runs-on: windows-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Install Rust Nightly with MSVC
run: |
rustup default nightly
rustup target add x86_64-pc-windows-msvc
rustup component add rust-src --toolchain nightly-x86_64-pc-windows-msvc
- name: Build Rust DLL
run: |
cd apps/rentearth/rust_godot_towerdefense
cargo +nightly build -Z build-std=std,panic_abort -Z unstable-options --target x86_64-pc-windows-msvc --release --out-dir dist/windows
- name: Upload DLL as Artifact
uses: actions/upload-artifact@v4
with:
name: rust_godot_towerdefense
path: apps/rentearth/rust_godot_towerdefense/dist/windows/*.dll
#path: dist/windows/*.dll

update-dev-branch:
runs-on: ubuntu-latest
needs: ['build']

steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: dev

- name: Download Built DLL
uses: actions/download-artifact@v4
with:
name: rust_godot_towerdefense
path: temp_dll

- name: Replace Existing DLL
run: |
cp temp_dll/rust_godot_towerdefense.dll apps/rentearth/rust_godot_towerdefense/godot/addons/tower-defense/windows/rust_godot_towerdefense.dll
- name: Generate Timestamp for Branch Name
id: timestamp
run: echo "BRANCH_NAME=patch-atomic-update-rust-dll-towerdefense-$(date +'%Y%m%d-%H%M%S')-${{ github.run_id }}" >> $GITHUB_ENV

- name: Remove temp_dll Folder
run: rm -rf temp_dll

- name: Create Pull Request
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
# Create a new branch based on dev
git checkout -b $BRANCH_NAME
# Add & commit changes
git add apps/rentearth/rust_godot_towerdefense/godot/addons/tower-defense/windows/rust_godot_towerdefense.dll
git commit -m "Update Rust DLL from automated build: Run ID: ${{ github.run_id }}"
# Push the branch
git push origin update-rust-dll
# Create a Pull Request using GitHub CLI
gh pr create --base dev --head update-rust-dll --title "Update Rust DLL" --body "Automated build updating the Rust DLL for Godot."
6 changes: 6 additions & 0 deletions apps/kbve/kbve.com/src/content/journal/02-17.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ import { Adsense } from '@kbve/astropad';
Updating the MSVC github action again, the most recent issue was that we forgot to include the nightly as a rust-src.
This next update will include and I will adjust the path for upload to be exactly where the DLL is exported.

- 10:07PM

The rust dll build went as planned, it was definitely smaller too compared to the gnu build.
That means we can continue the production of the extension, yet I should create a cycle where it automatically updates the extensions on our behalf.
Point of climax here will be once we get more git automation running within our repo, I am going to be super excited to see that level of looping.

### Jedi - User Agents

- 05:14PM
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl ICanvasLayer for GUIManager {

fn input(&mut self, event: Gd<InputEvent>) {
if let Ok(key_event) = event.try_cast::<InputEventKey>() {
if key_event.is_pressed() && key_event.get_keycode() == Key::DOLLAR {
if key_event.is_pressed() && key_event.get_keycode() == Key::QUOTELEFT {
self.toggle_mouse_passthrough();
}
}
Expand Down

0 comments on commit a2fd0a8

Please sign in to comment.