Compare commits
18 Commits
main
...
878f2fd801
| Author | SHA1 | Date | |
|---|---|---|---|
| 878f2fd801 | |||
| 2f86ef7771 | |||
| 631d3059f2 | |||
| dd38a03165 | |||
| 6307cd8ed8 | |||
| e1a072d6c3 | |||
| f26e2df0b2 | |||
| abc3278a04 | |||
| 4acbde4606 | |||
| 26e7badaaa | |||
| e222e01225 | |||
| 8d728d8f55 | |||
| 442a4d4e5e | |||
| 011254d6ae | |||
| 7bb2cfdc20 | |||
| bb46ac92ae | |||
| 08b2f79529 | |||
| 5858ea5cbe |
@@ -1,32 +1,39 @@
|
|||||||
name: Linux arm64
|
name: Linux arm64
|
||||||
run-name: Build And Test
|
run-name: Build And Test
|
||||||
|
|
||||||
on:
|
on: [push]
|
||||||
push:
|
|
||||||
branches:
|
env:
|
||||||
- main
|
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 60
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Build:
|
Build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-test
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository code
|
- name: 🧾 Check out
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Packages cache
|
- name: 📦 Packages cache
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ${{ github.workspace }}/build/.packages
|
path: ${{ github.workspace }}/build/.packages
|
||||||
key: ${{ runner.os }}-xmake_cache
|
key: ${{ runner.os }}-xmake_cache
|
||||||
|
|
||||||
- name: XMake config
|
- name: 🤖 Setup Godot
|
||||||
run: xmake f -p linux -y
|
uses: chickensoft-games/setup-godot@v2
|
||||||
|
with:
|
||||||
|
version: 4.2.2
|
||||||
|
use-dotnet: false
|
||||||
|
include-templates: true
|
||||||
|
|
||||||
- name: Build
|
- name: ⚙️ XMake config
|
||||||
|
run: xmake f -m release -p linux -y
|
||||||
|
|
||||||
|
- name: 🏗️ Build
|
||||||
run: xmake
|
run: xmake
|
||||||
|
|
||||||
- name: Test
|
- name: 🧐 Test
|
||||||
run: xmake test
|
run: xmake test
|
||||||
|
|
||||||
|
- name: 🚀 Publish
|
||||||
|
run: xmake p
|
||||||
|
|||||||
@@ -1,9 +1,3 @@
|
|||||||
|
|
||||||
if is_mode("debug") then
|
|
||||||
add_defines("DEBUG_ENABLED")
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
-- more on https://xmake.io/#/manual/project_target
|
-- more on https://xmake.io/#/manual/project_target
|
||||||
target(PROJECT_NAME)
|
target(PROJECT_NAME)
|
||||||
set_kind("shared")
|
set_kind("shared")
|
||||||
@@ -41,9 +35,8 @@ target(PROJECT_NAME)
|
|||||||
on_run(
|
on_run(
|
||||||
(function(godot_project_folder)
|
(function(godot_project_folder)
|
||||||
return function(target)
|
return function(target)
|
||||||
local cmd = format("godot --path %s", godot_project_folder)
|
os.execv("echo", {"godot --path", godot_project_folder})
|
||||||
os.execv("echo", {cmd})
|
os.exec("godot --path " .. godot_project_folder)
|
||||||
os.exec(cmd)
|
|
||||||
end
|
end
|
||||||
end)(GODOT_PROJECT_FOLDER)
|
end)(GODOT_PROJECT_FOLDER)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
-- target_platform: the target platform, like "Windows Desktop"
|
-- target_platform: the target platform, like "Windows Desktop"
|
||||||
-- name: the export execute name, it will be endswith ".exe" on windows
|
-- name: the export execute name, it will be endswith ".exe" on windows
|
||||||
task("export")
|
task("export")
|
||||||
on_run((function(godot_project_folder, publish_folder, project_name)
|
on_run((function(godot_project_folder, publish_folder)
|
||||||
return function(target_platform)
|
return function(target_platform)
|
||||||
local name = godot_project_folder
|
local name = godot_project_folder
|
||||||
|
|
||||||
@@ -35,15 +35,13 @@ task("export")
|
|||||||
|
|
||||||
local godot_project_file = path.join(godot_project_folder, "project.godot")
|
local godot_project_file = path.join(godot_project_folder, "project.godot")
|
||||||
|
|
||||||
local export_path = path.absolute(path.join(publish_folder, project_name))
|
local export_path = path.absolute(path.join(publish_folder, name))
|
||||||
|
|
||||||
local cmd = format("godot %s --headless --%s %s %s", godot_project_file, export_mode, "\"" .. target_platform .. "\"", export_path)
|
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)
|
||||||
os.execv("echo", {cmd})
|
|
||||||
os.exec(cmd)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end)(GODOT_PROJECT_FOLDER, PUBLISH_FOLDER, PROJECT_NAME))
|
end)(GODOT_PROJECT_FOLDER, PUBLISH_FOLDER))
|
||||||
task_end()
|
task_end()
|
||||||
|
|
||||||
|
|
||||||
@@ -204,22 +202,3 @@ android.release.arm64 = "res://lib/libProjectName.android_release_arm64.so"
|
|||||||
description = "Generate gdextension file",
|
description = "Generate gdextension file",
|
||||||
}
|
}
|
||||||
task_end()
|
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()
|
|
||||||
Reference in New Issue
Block a user