Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed workflow file for macOS #49

Merged
merged 3 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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")
Loading