@@ -21,15 +21,33 @@ jobs:
2121 run : xcodebuild -configuration Release -scheme https
2222 - name : Test
2323 working-directory : ./build/src/Release
24- run : lua -l "https" -e "assert(require('https').request('https://httpbin.org/post', {method='post', data='lotsa=data'}) == 200)"
25- - uses : actions/upload-artifact@v3
24+ run : lua -l "https" ../../../example/test.lua
25+ - name : Artifact
26+ if : always()
27+ uses : actions/upload-artifact@v3
2628 with :
2729 name : https-macos.zip
2830 path : build/src/**/https.so
2931
3032 Linux :
33+ name : ${{ matrix.mode.name }}
3134 runs-on : ubuntu-latest
3235 timeout-minutes : 30
36+ strategy :
37+ matrix :
38+ mode :
39+ - name : Linux cURL
40+ curl : 1
41+ openssl : 0
42+ artifact : 0
43+ - name : Linux OpenSSL
44+ curl : 0
45+ openssl : 1
46+ artifact : 0
47+ - name : Linux cURL & OpenSSL
48+ curl : 1
49+ openssl : 1
50+ artifact : 1
3351 steps :
3452 - name : Checkout
3553 uses : actions/checkout@v3
@@ -38,16 +56,19 @@ jobs:
3856 - name : Install Dependencies
3957 run : sudo apt-get install -y lua5.1 luajit liblua5.1-0-dev libcurl4-openssl-dev g++ libssl-dev
4058 - name : Configure
41- run : cmake -Bbuild -S. -DCMAKE_INSTALL_PREFIX=$PWD/install -DCMAKE_BUILD_TYPE=RelWithDebInfo
59+ run : cmake -Bbuild -S. -DCMAKE_INSTALL_PREFIX=$PWD/install -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUSE_CURL_BACKEND=${{ matrix.mode.curl }} -DUSE_OPENSSL_BACKEND=${{ matrix.mode.openssl }}
4260 - name : Build
4361 run : cmake --build build --config RelWithDebInfo --target install -j$(nproc)
4462 - name : Test (Lua)
63+ if : matrix.mode.artifact == 0
4564 working-directory : ./install
46- run : lua -l "https" -e "assert(require('https').request('https://httpbin.org/post', {method='post', data='lotsa=data'}) == 200)"
65+ run : lua -l "https" ../example/test.lua
4766 - name : Test (LuaJIT)
67+ if : matrix.mode.artifact == 0
4868 working-directory : ./install
49- run : luajit -l "https" -e "assert(require('https').request('https://httpbin.org/post', {method='post', data='lotsa=data'}) == 200)"
69+ run : luajit -l "https" ../example/test.lua
5070 - name : Artifact
71+ if : matrix.mode.artifact == 1
5172 uses : actions/upload-artifact@v3
5273 with :
5374 name : https-ubuntu.zip
6081 arch :
6182 - Win32
6283 - x64
84+ defaults :
85+ run :
86+ shell : cmd
6387 steps :
6488 - name : Checkout
6589 uses : actions/checkout@v3
@@ -74,25 +98,17 @@ jobs:
7498 with :
7599 arch : ${{ matrix.arch }}
76100 - name : Compile LuaJIT
77- shell : cmd
78101 working-directory : ./LuaJIT/src
79- env :
80- BUILD_ARCH : ${{ matrix.arch }}
81102 run : msvcbuild.bat amalg
82103 - name : Configure
83- shell : cmd
84104 run : cmake -Bbuild -S. -DCMAKE_INSTALL_PREFIX=%CD%\install -A ${{ matrix.arch }} -DLUA_INCLUDE_DIR=%CD%\LuaJIT\src -DLUA_LIBRARIES=%CD%\LuaJIT\src\lua51.lib
85105 - name : Build
86- shell : cmd
87106 run : cmake --build build --config Release --target install
88- - name : Copy https.dll For testing
89- shell : cmd
90- run : copy /y install\https.dll LuaJIT\src\https.dll
91107 - name : Test
92- shell : cmd
93- working-directory : ./LuaJIT/src
94- run : luajit ..\..\example\example.lua
108+ working-directory : ./install
109+ run : ..\LuaJIT\src\luajit ..\example\test.lua
95110 - name : Artifact
111+ if : always()
96112 uses : actions/upload-artifact@v3
97113 with :
98114 name : https-windows-${{ matrix.arch }}.zip
0 commit comments