2022-03-24 21:32:57 +01:00
|
|
|
|
name: Build
|
2022-03-19 18:55:11 +01:00
|
|
|
|
|
2022-03-19 19:23:58 +01:00
|
|
|
|
on:
|
|
|
|
|
push:
|
|
|
|
|
branches:
|
|
|
|
|
- master
|
|
|
|
|
pull_request:
|
2022-03-19 18:55:11 +01:00
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
build:
|
2022-07-27 08:55:54 +02:00
|
|
|
|
name: Test build on ${{ matrix.platform }}
|
2022-03-19 18:55:11 +01:00
|
|
|
|
strategy:
|
|
|
|
|
fail-fast: false
|
|
|
|
|
matrix:
|
2022-07-27 08:55:54 +02:00
|
|
|
|
luaVersion: [ "5.4", "5.3", "5.2", "5.1", "luajit", "luajit-openresty" ]
|
2023-10-27 19:31:18 +02:00
|
|
|
|
platform: [ "ubuntu-20.04", "macos-11", "windows-2022" ]
|
2022-03-19 19:18:54 +01:00
|
|
|
|
runs-on: ${{ matrix.platform }}
|
2022-03-19 18:55:11 +01:00
|
|
|
|
steps:
|
|
|
|
|
- name: Checkout
|
|
|
|
|
uses: actions/checkout@v3
|
2023-10-27 19:31:18 +02:00
|
|
|
|
- name: Setup ’msvc’
|
|
|
|
|
uses: ilammy/msvc-dev-cmd@v1
|
|
|
|
|
if: ${{ !startsWith(matrix.luaVersion, 'luajit') }}
|
2022-03-19 18:55:11 +01:00
|
|
|
|
- name: Setup ‘lua’
|
2023-10-27 19:31:18 +02:00
|
|
|
|
uses: leso-kn/gh-actions-lua@v11-staging
|
2022-03-19 18:55:11 +01:00
|
|
|
|
with:
|
|
|
|
|
luaVersion: ${{ matrix.luaVersion }}
|
|
|
|
|
- name: Setup ‘luarocks’
|
2023-10-27 19:31:18 +02:00
|
|
|
|
uses: hishamhm/gh-actions-luarocks@master
|
2022-03-19 20:42:25 +01:00
|
|
|
|
- name: Make and install
|
2022-03-19 18:55:11 +01:00
|
|
|
|
run: |
|
2022-03-19 20:42:25 +01:00
|
|
|
|
luarocks make -- luasocket-scm-3.rockspec
|
2023-10-27 19:31:18 +02:00
|
|
|
|
env:
|
|
|
|
|
DEBUG: DEBUG
|
2022-03-19 18:58:52 +01:00
|
|
|
|
- name: Run regression tests
|
2023-10-27 19:31:18 +02:00
|
|
|
|
shell: bash
|
2022-03-19 18:58:52 +01:00
|
|
|
|
run: |
|
|
|
|
|
cd test
|
|
|
|
|
lua hello.lua
|
|
|
|
|
lua testsrvr.lua > /dev/null &
|
|
|
|
|
lua testclnt.lua
|
|
|
|
|
lua stufftest.lua
|
|
|
|
|
lua excepttest.lua
|
|
|
|
|
lua test_bind.lua
|
|
|
|
|
lua test_getaddrinfo.lua
|
|
|
|
|
lua ltn12test.lua
|
|
|
|
|
lua mimetest.lua
|
|
|
|
|
lua urltest.lua
|
|
|
|
|
lua test_socket_error.lua
|
|
|
|
|
kill %1
|