@@ -52,31 +52,49 @@ jobs:
5252 path : https.so
5353
5454 Windows :
55- runs-on : " windows-latest"
56- timeout-minutes : 30
55+ runs-on : " windows-2019"
56+ strategy :
57+ matrix :
58+ arch :
59+ - Win32
60+ - x64
5761 steps :
58- - uses : actions/checkout@v2
59- -
uses :
carlosperate/[email protected] 60- with :
61- file-url : " https://master.dl.sourceforge.net/project/luabinaries/5.1.5/Windows%20Libraries/Dynamic/lua-5.1.5_Win64_dll14_lib.zip"
62- file-name : " lua51.zip"
63- -
uses :
carlosperate/[email protected] 64- with :
65- file-url : " https://iweb.dl.sourceforge.net/project/luabinaries/5.1.5/Tools%20Executables/lua-5.1.5_Win64_bin.zip"
66- file-name : " lua51bin.zip"
67- - run : |
68- 7z x lua51.zip -o${{ runner.workspace }}/lua-51
69- 7z x lua51bin.zip -o${{ runner.workspace }}/lua-51/bin
70- - uses : ashutoshvarma/action-cmake-build@master
62+ - name : Checkout
63+ uses : actions/checkout@v3
64+ - name : Download LuaJIT
65+ uses : actions/checkout@v3
7166 with :
72- build-dir : ${{ runner.workspace }}/build
73- build-type : Release
74- # Extra options pass to cmake while configuring project
75- configure-options : " -H. -A x64 -T v140 -DLUA_INCLUDE_DIR=${{ runner.workspace }}/lua-51/include -DLUA_LIBRARIES=${{ runner.workspace }}/lua-51/lua5.1.lib"
76- - run : |
77- cd ${{ runner.workspace }}/build/src/Release
78- ${{ runner.workspace }}/lua-51/bin/lua5.1.exe -l "https" -e "assert(require('https').request('https://httpbin.org/post', {method='post', data='lotsa=data'}) == 200)"
67+ repository : LuaJIT/LuaJIT
68+ ref : v2.1
69+ path : LuaJIT
70+ - name : Compile LuaJIT
71+ shell : cmd
72+ env :
73+ BUILD_ARCH : ${{ matrix.arch }}
74+ run : |
75+ rem Compile LuaJIT using MSVC Command Prompt
76+ rem https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md#visual-studio-enterprise-2019
77+ set VCBT="C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat"
78+ if %BUILD_ARCH% == Win32 (
79+ call %VCBT% x86
80+ ) else (
81+ call %VCBT% x86_amd64
82+ )
83+ cd LuaJIT\src
84+ msvcbuild.bat amalg
85+ - name : Configure
86+ shell : cmd
87+ run : cmake -Bbuild -S. -DCMAKE_INSTALL_PREFIX=%CD%\install -T v142 -A ${{ matrix.arch }} -DLUA_INCLUDE_DIR=%CD%\LuaJIT\src -DLUA_LIBRARIES=%CD%\LuaJIT\src\lua51.lib
88+ - name : Build
89+ shell : cmd
90+ run : cmake --build build --config Release --target install
91+ - name : Copy https.dll For testing
92+ shell : cmd
93+ run : copy /y install\https.dll LuaJIT\src\https.dll
94+ - name : Test
95+ shell : cmd
96+ run : cd LuaJIT\src && luajit ..\..\example\example.lua
7997 - uses : actions/upload-artifact@v2
8098 with :
81- name : https-windows.zip
82- path : ${{ runner.workspace }}/build/src/**/ https.dll
99+ name : https-windows-${{ matrix.arch }} .zip
100+ path : install\ https.dll
0 commit comments