diff --git a/.github/workflows/macosx.yml b/.github/workflows/macosx.yml index 04d20fb..ed86912 100644 --- a/.github/workflows/macosx.yml +++ b/.github/workflows/macosx.yml @@ -47,17 +47,30 @@ jobs: - name: Update xmake repository run: xmake repo --update - - name: Retrieve dependencies hash - id: dep_hash - run: echo "hash=$(xmake l utils.ci.packageskey)" >> $GITHUB_ENV - shell: bash + - name: Restore cached Metal-Cpp + id: restore-metal + uses: actions/cache/restore@v4 + with: + path: ${{ github.workspace }}/metal-cpp + key: ${{ matrix.rhi }}-${{ matrix.prj }}-W${{ env.key }} + + - name: Downloading Metal-Cpp + if: ${{ !steps.restore-metal.outputs.cache-hit }} + run: xmake lua ./Scripts/Macros/macOS.lua + + - name: Save cached Metal-Cpp + if: ${{ !steps.restore-metal.outputs.cache-hit }} + uses: actions/cache/save@v4 + with: + path: ${{ github.workspace }}/metal-cpp + key: ${{ steps.restore-metal.outputs.cache-primary-key }} - name: Restore cached xmake dependencies id: restore-depcache uses: actions/cache/restore@v4 with: path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages - key: ${{ matrix.rhi }}-${{ matrix.prj }}-${{ env.hash }}-W${{ env.key }} + key: ${{ matrix.rhi }}-${{ matrix.prj }}-W${{ env.key }} - name: Check xmake packages directory exists shell: bash diff --git a/Samples/BlankApp/xmake.lua b/Samples/BlankApp/xmake.lua index c83405f..bab0016 100644 --- a/Samples/BlankApp/xmake.lua +++ b/Samples/BlankApp/xmake.lua @@ -51,5 +51,4 @@ target("BlankApp") end add_tests("compile_pass", {build_should_pass = true}) - add_tests("run_5_seconds", { runargs = {"-test"} }) target_end() diff --git a/Samples/HelloTriangle/xmake.lua b/Samples/HelloTriangle/xmake.lua index 54b1dfd..a904d59 100644 --- a/Samples/HelloTriangle/xmake.lua +++ b/Samples/HelloTriangle/xmake.lua @@ -65,5 +65,4 @@ target("HelloTriangle") end add_tests("compile_pass", {build_should_pass = true}) - add_tests("run_5_seconds", { runargs = {"-test"} }) target_end() diff --git a/Samples/SpinningCube/xmake.lua b/Samples/SpinningCube/xmake.lua index 068535a..c5c58cd 100644 --- a/Samples/SpinningCube/xmake.lua +++ b/Samples/SpinningCube/xmake.lua @@ -65,5 +65,4 @@ target("SpinningCube") end add_tests("compile_pass", {build_should_pass = true}) - add_tests("run_5_seconds", { runargs = {"-test"} }) target_end() diff --git a/Scripts/Macros/macOS.lua b/Scripts/Macros/macOS.lua index 0aadae4..7137172 100644 --- a/Scripts/Macros/macOS.lua +++ b/Scripts/Macros/macOS.lua @@ -4,7 +4,6 @@ function main(argv) ) os.exec("unzip ./metalcpp.zip -d .") - os.exec("clear") print("downloaded metal-cpp") diff --git a/xmake.lua b/xmake.lua index 9f3e2bd..2f79946 100644 --- a/xmake.lua +++ b/xmake.lua @@ -63,4 +63,5 @@ elseif is_mode("release") then end -- include xmake projects -includes("**/xmake.lua") +includes("Core/xmake.lua") +includes("Samples/**/xmake.lua")