Skip to content
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

Include debug file in windows builds #77

Merged
merged 6 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: wrong release script
  • Loading branch information
emilnorsker authored and AsbjornOlling committed Jan 9, 2025
commit dccac537101f601af6fe48049e79dfa274822797
1 change: 0 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@ jobs:
needs: [build]

release:
if: startsWith(github.ref, 'refs/tags/v')
needs: [build, test]
uses: ./.github/workflows/release.yml
57 changes: 34 additions & 23 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,45 @@ jobs:
zip-distributable:
AsbjornOlling marked this conversation as resolved.
Show resolved Hide resolved
runs-on: ubuntu-24.04
steps:
- uses: actions/download-artifact@v3
with:
path: binaries

- name: Create ZIP files
run: |
cd binaries
zip -j linux-release.zip linux-binary/*
zip -j windows-release.zip windows-binary/*
zip -j macos-release.zip macos-binary/*

- uses: actions/upload-artifact@v3
with:
name: release-zips
path: binaries/*.zip
- uses: actions/checkout@v4

- name: "Download all build artifacts"
uses: actions/download-artifact@v4
with:
path: ./artifacts

- name: "Make directory structure for release zip"
run: |
mkdir -p nobodywho-release/bin/addons/nobodywho
# copy in nobodywho libs
cp ./artifacts/*/*nobodywho* ./nobodywho-release/bin/addons/nobodywho/
# copy in gdextension metadata
cp ./nobodywho/nobodywho.gdextension ./nobodywho-release/bin/addons/nobodywho/
cp ./assets/icon.svg ./nobodywho-release/bin/addons/nobodywho/
- name: "Upload zipped build artifacts"
uses: actions/upload-artifact@v4
with:
name: nobodywho-all-platforms
path: ./nobodywho-release

create-github-release:
needs: [zip-distributable]
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-24.04
steps:
- uses: actions/download-artifact@v3
- name: "Download build artifacts"
uses: actions/download-artifact@v4
with:
name: release-zips

- name: Create Release
name: nobodywho-all-platforms
path: ./nobodywho-release

- name: "Make zip file"
working-directory: ./nobodywho-release
run: zip -r "../nobodywho-${{ github.ref_name }}.zip" ./**

- name: "Create GitHub Release"
uses: softprops/action-gh-release@v1
with:
files: |
linux-release.zip
windows-release.zip
macos-release.zip
files: "./nobodywho-${{ github.ref_name }}.zip"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40 changes: 40 additions & 0 deletions .vscode/justfile
AsbjornOlling marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/usr/bin/env just --justfile

# Set the default recipe to build
default: build

# Main build recipe that runs both rust and copy-files
build: rust copy-files

# Build the Rust project
rust:
cd ../nobodywho && \
RUST_BACKTRACE=full \
CARGO_PROFILE_DEV_BUILD_OVERRIDE_DEBUG=true \
VULKAN_SDK="C:\\VulkanSDK\\vulkan" \
cargo build

# Copy the built files to the Godot project
copy-files:
mkdir -p ../example-game/addons/nobodywho
cp ../nobodywho/target/debug/nobodywho.dll "../example-game/addons/nobodywho/nobodywho-x86_64-pc-windows-msvc-release.dll"
cp ../nobodywho/nobodywho.gdextension "../example-game/addons/nobodywho/nobodywho.gdextension"
cp ../assets/icon.svg "../example-game/addons/nobodywho/icon.svg"

# Debug extension task to check file locations
debug-extension:
@echo "Checking source files..."
ls -l ../nobodywho/target/debug/nobodywho.dll
@echo
@echo "Checking addon..."
ls -l "../example-game/addons/nobodywho/nobodywho-x86_64-pc-windows-msvc-release.dll"
ls -l "../example-game/addons/nobodywho/nobodywho.gdextension"
ls -l "../example-game/addons/nobodywho/icon.svg"
@echo
@echo "Checking gdextension content..."
cat "../example-game/addons/nobodywho/nobodywho.gdextension"

# Clean build artifacts
clean:
cd ../nobodywho && cargo clean
rm -rf "../example-game/addons/nobodywho"
11 changes: 11 additions & 0 deletions .vscode/settings.json
AsbjornOlling marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"rust-analyzer.linkedProjects": [
"./nobodywho/Cargo.toml"
],
"rust-analyzer.checkOnSave.command": "clippy",
"workbench.colorCustomizations": {
"terminal.background": "#00000000",
"minimap.background": "#00000000",
"scrollbar.shadow": "#00000000"
}
}