Use xmake dev for CI (until xmake 2.5.4 is out)
This commit is contained in:
parent
1c69c21a9f
commit
7fd94a2068
|
|
@ -45,6 +45,8 @@ jobs:
|
|||
# Install xmake
|
||||
- name: Setup xmake
|
||||
uses: xmake-io/github-action-setup-xmake@v1
|
||||
with:
|
||||
xmake-version: branch@dev
|
||||
|
||||
# Update xmake repository (in order to have the file that will be cached)
|
||||
- name: Update xmake repository
|
||||
|
|
@ -53,7 +55,7 @@ jobs:
|
|||
# Fetch xmake dephash
|
||||
- name: Retrieve dependencies hash
|
||||
id: dep_hash
|
||||
run: echo "::set-output name=hash::$(xmake dephash)"
|
||||
run: echo "::set-output name=hash::$(xmake l utils.ci.packageskey)"
|
||||
|
||||
# Cache xmake dependencies
|
||||
- name: Retrieve cached xmake dependencies
|
||||
|
|
|
|||
|
|
@ -37,6 +37,8 @@ jobs:
|
|||
# Install xmake
|
||||
- name: Setup xmake
|
||||
uses: xmake-io/github-action-setup-xmake@v1
|
||||
with:
|
||||
xmake-version: branch@dev
|
||||
|
||||
# Update xmake repository (in order to have the file that will be cached)
|
||||
- name: Update xmake repository
|
||||
|
|
@ -45,7 +47,7 @@ jobs:
|
|||
# Fetch xmake dephash
|
||||
- name: Retrieve dependencies hash
|
||||
id: dep_hash
|
||||
run: echo "::set-output name=hash::$(xmake.exe dephash)"
|
||||
run: echo "::set-output name=hash::$(xmake.exe l utils.ci.packageskey)"
|
||||
|
||||
# Cache xmake dependencies
|
||||
- name: Retrieve cached xmake dependencies
|
||||
|
|
|
|||
24
xmake.lua
24
xmake.lua
|
|
@ -190,27 +190,3 @@ rule("build_rendererplugins")
|
|||
end
|
||||
end
|
||||
end)
|
||||
|
||||
-- Generates a hash key made of packages confs/version, for CI
|
||||
task("dephash")
|
||||
on_run(function ()
|
||||
import("core.project.project")
|
||||
import("private.action.require.impl.package")
|
||||
|
||||
local requires, requires_extra = project.requires_str()
|
||||
|
||||
local key = {}
|
||||
for _, instance in irpairs(package.load_packages(requires, {requires_extra = requires_extra})) do
|
||||
table.insert(key, instance:name() .. "-" .. instance:version_str() .. "-" .. instance:buildhash())
|
||||
end
|
||||
|
||||
table.sort(key)
|
||||
|
||||
key = table.concat(key, ",")
|
||||
print(hash.uuid4(key):gsub('-', ''):lower())
|
||||
end)
|
||||
|
||||
set_menu {
|
||||
usage = "xmake dephash",
|
||||
description = "Outputs a hash key of current dependencies version/configuration"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue