update for github action windows

This commit is contained in:
fasiondog 2021-04-03 17:41:43 +08:00
parent 9940c75c09
commit 8210f91a62
3 changed files with 16 additions and 10 deletions

View File

@ -17,17 +17,23 @@ jobs:
git clone https://github.com/fasiondog/hikyuu.git --recursive --depth 1
- name: download_boost
run: |
Invoke-WebRequest "https://dl.bintray.com/boostorg/release/1.74.0/source/boost_1_74_0.zip" -UseBasicParsing -OutFile ./boost_1_74_0.zip
Expand-Archive ./boost_1_74_0.zip -DestinationPath .
Copy-Item ./boost_1_74_0 ./hikyuu
- name: build
Invoke-WebRequest "https://dl.bintray.com/boostorg/release/1.75.0/source/boost_1_75_0.zip" -UseBasicParsing -OutFile ./boost_1_75_0.zip
Expand-Archive ./boost_1_75_0.zip -DestinationPath .
Copy-Item ./boost_1_75_0 ./hikyuu
- name: build_boost
shell: cmd
run: |
python3 -m pip install click
cd hikyuu
python3 setup.py build
cd hikyuu/boost_1_75_0
bootstrap.bat --with-python=python3
b2 release link=static runtime-link=shared address-model=64 -j 4 --with-date_time --with-filesystem --with-system --with-test
b2 release link=shared runtime-link=shared address-model=64 -j 4 --with-python --with-serialization
- name: test
shell: cmd
run: |
cd hikyuu
python3 setup.py test
set BOOST_ROOT=./boost_1_75_0
set BOOST_LIB=./boost_1_75_0/stage/lib
xmake f --confirm=y --test=small
xmake -bvD small-test
xmake r small-test

View File

@ -48,7 +48,7 @@ target("core")
import("lib.detect.find_tool")
if is_plat("windows") then
-- detect installed python3
local python = assert(find_tool("python", {version = true}), "python not found, please install it first! note: python version must > 3.0")
local python = assert(find_tool("python3", {version = true}), "python not found, please install it first! note: python version must > 3.0")
assert(python.version > "3", python.version .. " python version must > 3.0, please use python3.0 or later!")
-- find python include and libs directory

View File

@ -3,7 +3,7 @@ import("lib.detect.find_tool")
function main(target)
if is_plat("windows") then
-- detect installed python3
local python = assert(find_tool("python", {version = true}), "python not found, please install it first! note: python version must > 3.0")
local python = assert(find_tool("python3", {version = true}), "python not found, please install it first! note: python version must > 3.0")
assert(python.version > "3", python.version .. " python version must > 3.0, please use python3.0 or later!")
-- find python include and libs directory