Skip to content

Commit

Permalink
[11_3] Use xmake dev for wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
da-liii authored Aug 28, 2023
1 parent 75f2a4f commit 1ccaf77
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/ci-xmake-wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
echo "XMAKE_GLOBALDIR=${{ runner.workspace }}/.xmake-global" >> "${{ github.env }}"
- uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: v2.8.2
xmake-version: branch@dev
- name: update repo
run: |
xmake repo -u
Expand All @@ -48,8 +48,10 @@ jobs:
${{ github.workspace }}/build/.build_cache
key: ${{ runner.os }}-xmake-${{ hashFiles('**/xmake.lua') }}
# Force xmake to a specific folder (for cache)
- name: emscripten
run: xrepo install -y emscripten
- name: config
run: elvish bin/config_wasm
run: xmake config --yes -p wasm -vD
- name: build
run: xmake build --yes -vD
- name: test
Expand Down
5 changes: 5 additions & 0 deletions xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ if is_plat("mingw") and is_host("windows") then
set_toolchains("mingw@mingw-w64")
end

if is_plat("wasm") then
add_requires("emscripten")
set_toolchains("emcc@emscripten")
end

includes("check_cxxtypes.lua")
configvar_check_cxxtypes("HAVE_INTPTR_T", "intptr_t", {includes = {"memory"}})
configvar_check_cxxtypes("HAVE_TIME_T", "time_t", {includes = {"memory"}})
Expand Down

0 comments on commit 1ccaf77

Please sign in to comment.