|
@@ -21,15 +21,33 @@ jobs:
|
|
run: xcodebuild -configuration Release -scheme https
|
|
run: xcodebuild -configuration Release -scheme https
|
|
- name: Test
|
|
- name: Test
|
|
working-directory: ./build/src/Release
|
|
working-directory: ./build/src/Release
|
|
- run: lua -l "https" -e "assert(require('https').request('https://httpbin.org/post', {method='post', data='lotsa=data'}) == 200)"
|
|
|
|
- - uses: actions/upload-artifact@v3
|
|
|
|
|
|
+ run: lua -l "https" ../../../example/test.lua
|
|
|
|
+ - name: Artifact
|
|
|
|
+ if: always()
|
|
|
|
+ uses: actions/upload-artifact@v3
|
|
with:
|
|
with:
|
|
name: https-macos.zip
|
|
name: https-macos.zip
|
|
path: build/src/**/https.so
|
|
path: build/src/**/https.so
|
|
|
|
|
|
Linux:
|
|
Linux:
|
|
|
|
+ name: ${{ matrix.mode.name }}
|
|
runs-on: ubuntu-latest
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
timeout-minutes: 30
|
|
|
|
+ strategy:
|
|
|
|
+ matrix:
|
|
|
|
+ mode:
|
|
|
|
+ - name: Linux cURL
|
|
|
|
+ curl: 1
|
|
|
|
+ openssl: 0
|
|
|
|
+ artifact: 0
|
|
|
|
+ - name: Linux OpenSSL
|
|
|
|
+ curl: 0
|
|
|
|
+ openssl: 1
|
|
|
|
+ artifact: 0
|
|
|
|
+ - name: Linux cURL & OpenSSL
|
|
|
|
+ curl: 1
|
|
|
|
+ openssl: 1
|
|
|
|
+ artifact: 1
|
|
steps:
|
|
steps:
|
|
- name: Checkout
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
uses: actions/checkout@v3
|
|
@@ -38,16 +56,19 @@ jobs:
|
|
- name: Install Dependencies
|
|
- name: Install Dependencies
|
|
run: sudo apt-get install -y lua5.1 luajit liblua5.1-0-dev libcurl4-openssl-dev g++ libssl-dev
|
|
run: sudo apt-get install -y lua5.1 luajit liblua5.1-0-dev libcurl4-openssl-dev g++ libssl-dev
|
|
- name: Configure
|
|
- name: Configure
|
|
- run: cmake -Bbuild -S. -DCMAKE_INSTALL_PREFIX=$PWD/install -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
|
|
|
|
|
+ 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 }}
|
|
- name: Build
|
|
- name: Build
|
|
run: cmake --build build --config RelWithDebInfo --target install -j$(nproc)
|
|
run: cmake --build build --config RelWithDebInfo --target install -j$(nproc)
|
|
- name: Test (Lua)
|
|
- name: Test (Lua)
|
|
|
|
+ if: matrix.mode.artifact == 0
|
|
working-directory: ./install
|
|
working-directory: ./install
|
|
- run: lua -l "https" -e "assert(require('https').request('https://httpbin.org/post', {method='post', data='lotsa=data'}) == 200)"
|
|
|
|
|
|
+ run: lua -l "https" ../example/test.lua
|
|
- name: Test (LuaJIT)
|
|
- name: Test (LuaJIT)
|
|
|
|
+ if: matrix.mode.artifact == 0
|
|
working-directory: ./install
|
|
working-directory: ./install
|
|
- run: luajit -l "https" -e "assert(require('https').request('https://httpbin.org/post', {method='post', data='lotsa=data'}) == 200)"
|
|
|
|
|
|
+ run: luajit -l "https" ../example/test.lua
|
|
- name: Artifact
|
|
- name: Artifact
|
|
|
|
+ if: matrix.mode.artifact == 1
|
|
uses: actions/upload-artifact@v3
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
with:
|
|
name: https-ubuntu.zip
|
|
name: https-ubuntu.zip
|
|
@@ -60,6 +81,9 @@ jobs:
|
|
arch:
|
|
arch:
|
|
- Win32
|
|
- Win32
|
|
- x64
|
|
- x64
|
|
|
|
+ defaults:
|
|
|
|
+ run:
|
|
|
|
+ shell: cmd
|
|
steps:
|
|
steps:
|
|
- name: Checkout
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
uses: actions/checkout@v3
|
|
@@ -74,25 +98,17 @@ jobs:
|
|
with:
|
|
with:
|
|
arch: ${{ matrix.arch }}
|
|
arch: ${{ matrix.arch }}
|
|
- name: Compile LuaJIT
|
|
- name: Compile LuaJIT
|
|
- shell: cmd
|
|
|
|
working-directory: ./LuaJIT/src
|
|
working-directory: ./LuaJIT/src
|
|
- env:
|
|
|
|
- BUILD_ARCH: ${{ matrix.arch }}
|
|
|
|
run: msvcbuild.bat amalg
|
|
run: msvcbuild.bat amalg
|
|
- name: Configure
|
|
- name: Configure
|
|
- shell: cmd
|
|
|
|
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
|
|
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
|
|
- name: Build
|
|
- name: Build
|
|
- shell: cmd
|
|
|
|
run: cmake --build build --config Release --target install
|
|
run: cmake --build build --config Release --target install
|
|
- - name: Copy https.dll For testing
|
|
|
|
- shell: cmd
|
|
|
|
- run: copy /y install\https.dll LuaJIT\src\https.dll
|
|
|
|
- name: Test
|
|
- name: Test
|
|
- shell: cmd
|
|
|
|
- working-directory: ./LuaJIT/src
|
|
|
|
- run: luajit ..\..\example\example.lua
|
|
|
|
|
|
+ working-directory: ./install
|
|
|
|
+ run: ..\LuaJIT\src\luajit ..\example\test.lua
|
|
- name: Artifact
|
|
- name: Artifact
|
|
|
|
+ if: always()
|
|
uses: actions/upload-artifact@v3
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
with:
|
|
name: https-windows-${{ matrix.arch }}.zip
|
|
name: https-windows-${{ matrix.arch }}.zip
|