Skip to content

Commit

Permalink
Fixed workflow file for macOS (#49)
Browse files Browse the repository at this point in the history
* fixed workflow: macosx.yml

* fixed typo

* removed 5sec run test
  • Loading branch information
Thirulogeswaren authored Aug 26, 2024
1 parent 21b73ad commit 78a108a
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 10 deletions.
23 changes: 18 additions & 5 deletions .github/workflows/macosx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion Samples/BlankApp/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,4 @@ target("BlankApp")
end

add_tests("compile_pass", {build_should_pass = true})
add_tests("run_5_seconds", { runargs = {"-test"} })
target_end()
1 change: 0 additions & 1 deletion Samples/HelloTriangle/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,4 @@ target("HelloTriangle")
end

add_tests("compile_pass", {build_should_pass = true})
add_tests("run_5_seconds", { runargs = {"-test"} })
target_end()
1 change: 0 additions & 1 deletion Samples/SpinningCube/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,4 @@ target("SpinningCube")
end

add_tests("compile_pass", {build_should_pass = true})
add_tests("run_5_seconds", { runargs = {"-test"} })
target_end()
1 change: 0 additions & 1 deletion Scripts/Macros/macOS.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ function main(argv)
)

os.exec("unzip ./metalcpp.zip -d .")
os.exec("clear")

print("downloaded metal-cpp")

Expand Down
3 changes: 2 additions & 1 deletion xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,5 @@ elseif is_mode("release") then
end

-- include xmake projects
includes("**/xmake.lua")
includes("Core/xmake.lua")
includes("Samples/**/xmake.lua")

0 comments on commit 78a108a

Please sign in to comment.