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" ]
|
2022-03-19 19:23:58 +01:00
|
|
|
|
platform: [ "ubuntu-20.04", "macos-11" ] # "windows-2022" not supported by gh-actions-lua
|
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
|
|
|
|
|
- name: Setup ‘lua’
|
|
|
|
|
uses: leafo/gh-actions-lua@v9
|
|
|
|
|
with:
|
|
|
|
|
luaVersion: ${{ matrix.luaVersion }}
|
|
|
|
|
- name: Setup ‘luarocks’
|
|
|
|
|
uses: leafo/gh-actions-luarocks@v4
|
2022-03-19 20:42:25 +01:00
|
|
|
|
- name: Make and install
|
2022-03-19 18:55:11 +01:00
|
|
|
|
run: |
|
2022-03-19 18:58:52 +01:00
|
|
|
|
export DEBUG=DEBUG
|
2022-03-19 20:42:25 +01:00
|
|
|
|
luarocks make -- luasocket-scm-3.rockspec
|
2022-03-19 18:58:52 +01:00
|
|
|
|
- name: Run regression tests
|
|
|
|
|
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
|