diff --git a/.github/workflows/mingw_msys2.yml b/.github/workflows/mingw_msys2.yml index 05e1dee52..681d1ed1a 100644 --- a/.github/workflows/mingw_msys2.yml +++ b/.github/workflows/mingw_msys2.yml @@ -33,7 +33,7 @@ jobs: - name: Prepare shell: msys2 {0} run: | - git clone https://github.com/xmake-io/xmake.git --recurse-submodules -b dev + git clone https://github.com/xmake-io/xmake.git --recurse-submodules -b master cd xmake ./configure make -j4 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 127cbc1dd..a580eff90 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -35,11 +35,20 @@ jobs: - name: Tests run: | - git clone https://github.com/xmake-io/xmake.git -b master xmakesrc + git clone https://github.com/xmake-io/xmake.git --recurse-submodules -b master xmakesrc + cd xmakesrc/core + xmake + cd ../.. + Copy-Item ./xmakesrc/core/build/xmake.exe ./xmakesrc/xmake + Copy-Item ./xmakesrc/scripts/xrepo.bat ./xmakesrc/xmake + Copy-Item ./xmakesrc/scripts/xrepo.ps1 ./xmakesrc/xmake + $Env:XMAKE_MAIN_REPO = "https://github.com/xmake-io/xmake-repo.git" $Env:XMAKE_PROGRAM_DIR = $(Resolve-Path ./xmakesrc/xmake) + Set-Item -Path Env:Path -Value ($Env:XMAKE_PROGRAM_DIR + ";" + $Env:Path) + xmake --version if ("${{ matrix.os }}" -eq "windows-2019") { - xmake l ./scripts/test.lua -vD -a ${{ matrix.arch }} -k ${{ matrix.kind }} --runtimes=${{ matrix.runtimes }} --vs_sdkver=10.0.19041.0 --linkjobs=2 + xmake l ./scripts/test.lua -vD -a ${{ matrix.arch }} -k ${{ matrix.kind }} --runtimes=${{ matrix.runtimes }} --vs_sdkver=10.0.19041.0 --linkjobs=2 cosmocc } else { - xmake l ./scripts/test.lua -vD -a ${{ matrix.arch }} -k ${{ matrix.kind }} --runtimes=${{ matrix.runtimes }} --linkjobs=2 + xmake l ./scripts/test.lua -vD -a ${{ matrix.arch }} -k ${{ matrix.kind }} --runtimes=${{ matrix.runtimes }} --linkjobs=2 cosmocc } diff --git a/packages/c/cosmocc/xmake.lua b/packages/c/cosmocc/xmake.lua index f8d5f17d0..a4000177c 100644 --- a/packages/c/cosmocc/xmake.lua +++ b/packages/c/cosmocc/xmake.lua @@ -7,7 +7,11 @@ package("cosmocc") "https://github.com/xmake-mirror/cosmopolitan/releases/download/$(version)/cosmocc-$(version).zip") add_versions("3.2.4", "d2fa6dbf6f987310494581deff5b915dbdc5ca701f20f7613bb0dcf1de2ee511") - on_install("@macosx", "@linux", "@bsd", "@cygwin", "@msys", function (package) + on_install("@windows", "@macosx", "@linux", "@bsd", "@cygwin", "@msys", function (package) + if is_host("windows") then + import("lib.detect.find_tool") + assert(find_tool("sh"), "cosmocc need sh/bash, please install it first!") + end os.cp("*", package:installdir(), {symlink = true}) end)