From 7fd94a2068675e58f42f4ae006fe5ef739a72087 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Leclercq?= Date: Sat, 8 May 2021 17:05:25 +0200 Subject: [PATCH] Use xmake dev for CI (until xmake 2.5.4 is out) --- .github/workflows/linux-build.yml | 4 +++- .github/workflows/windows-build.yml | 4 +++- xmake.lua | 24 ------------------------ 3 files changed, 6 insertions(+), 26 deletions(-) diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml index 4f1b0370b..e4a7507fd 100644 --- a/.github/workflows/linux-build.yml +++ b/.github/workflows/linux-build.yml @@ -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 diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index 85c61c548..135950066 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -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 diff --git a/xmake.lua b/xmake.lua index b2429a5d8..9e9f44ea0 100644 --- a/xmake.lua +++ b/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" - }