enable windows for cosmocc (#3248)

* enable windows for cosmocc

* use newest xmake core

* fix cosmocc

* update ci
xcb
ruki 12 months ago committed by GitHub
parent 1a847b5fd4
commit b5cff0d153
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      .github/workflows/mingw_msys2.yml
  2. 15
      .github/workflows/windows.yml
  3. 6
      packages/c/cosmocc/xmake.lua

@ -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

@ -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
}

@ -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)

Loading…
Cancel
Save