Compare commits

..

5 Commits

Author SHA1 Message Date
4bbcde461d add import-asset rule
All checks were successful
Linux arm64 / Build (push) Successful in 38s
2024-08-13 19:57:27 +02:00
cba15111e7 add debug flags 2024-08-13 19:57:08 +02:00
3bc95acf7b Update .gitea/workflows/linux.yml
All checks were successful
Linux arm64 / Build (push) Successful in 47s
2024-08-11 18:54:25 +02:00
4986fd1940 remove xmake setup
All checks were successful
Linux arm64 / Build (push) Successful in 41m36s
2024-08-11 17:03:42 +02:00
a7bc4abbae add linux actions
Some checks failed
Linux arm64 / Build (push) Has been cancelled
2024-08-11 14:56:09 +02:00
3 changed files with 67 additions and 7 deletions

View File

@@ -0,0 +1,32 @@
name: Linux arm64
run-name: Build And Test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
Build:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Packages cache
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/build/.packages
key: ${{ runner.os }}-xmake_cache
- name: XMake config
run: xmake f -p linux -y
- name: Build
run: xmake
- name: Test
run: xmake test

View File

@@ -1,3 +1,9 @@
if is_mode("debug") then
add_defines("DEBUG_ENABLED")
end
-- more on https://xmake.io/#/manual/project_target
target(PROJECT_NAME)
set_kind("shared")
@@ -35,8 +41,9 @@ target(PROJECT_NAME)
on_run(
(function(godot_project_folder)
return function(target)
os.execv("echo", {"godot --path", godot_project_folder})
os.exec("godot --path " .. godot_project_folder)
local cmd = format("godot --path %s", godot_project_folder)
os.execv("echo", {cmd})
os.exec(cmd)
end
end)(GODOT_PROJECT_FOLDER)
)

View File

@@ -6,7 +6,7 @@
-- target_platform: the target platform, like "Windows Desktop"
-- name: the export execute name, it will be endswith ".exe" on windows
task("export")
on_run((function(godot_project_folder, publish_folder)
on_run((function(godot_project_folder, publish_folder, project_name)
return function(target_platform)
local name = godot_project_folder
@@ -35,13 +35,15 @@ task("export")
local godot_project_file = path.join(godot_project_folder, "project.godot")
local export_path = path.absolute(path.join(publish_folder, name))
local export_path = path.absolute(path.join(publish_folder, project_name))
os.execv("echo", {"godot", godot_project_file, export_mode, target_platform, export_path})
os.exec("godot %s --headless --%s %s %s", godot_project_file, export_mode, "\"" .. target_platform .. "\"", export_path)
local cmd = format("godot %s --headless --%s %s %s", godot_project_file, export_mode, "\"" .. target_platform .. "\"", export_path)
os.execv("echo", {cmd})
os.exec(cmd)
end
end)(GODOT_PROJECT_FOLDER, PUBLISH_FOLDER))
end)(GODOT_PROJECT_FOLDER, PUBLISH_FOLDER, PROJECT_NAME))
task_end()
@@ -202,3 +204,22 @@ android.release.arm64 = "res://lib/libProjectName.android_release_arm64.so"
description = "Generate gdextension file",
}
task_end()
task("import-assets")
on_run((function(godot_project_folder, project_name)
return function ()
local godot_project_file = path.join(godot_project_folder, "project.godot")
local cmd = format("godot --headless --import %s", godot_project_file)
os.execv("echo", {cmd})
os.exec(cmd)
end
end)(GODOT_PROJECT_FOLDER, PROJECT_NAME))
set_menu {
usage = "xmake import-assets",
description = "Import project assets",
}
task_end()