aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/build.yml
blob: c079a49e890c5f3173bdcab7a18517209f46b843 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Build

on:
  push:
    branches:
      - master
  pull_request:

jobs:
  build:
    name: Test ${{ matrix.luaVersion }} on ${{ matrix.platform }}
    strategy:
      fail-fast: false
      matrix:
        luaVersion: [ "5.4", "5.3", "5.2", "5.1", "luajit", "luajit-openresty" ]
        platform: [ "ubuntu-22.04", "macos-14", "windows-2022" ]
    runs-on: ${{ matrix.platform }}
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: Setup ’msvc’
        if: ${{ startsWith(matrix.platform, 'windows') && !startsWith(matrix.luaVersion, 'luajit') }}
        uses: ilammy/msvc-dev-cmd@v1
      - name: Setup ‘lua’
        uses: luarocks/gh-actions-lua@v10
        with:
          luaVersion: ${{ matrix.luaVersion }}
      - name: Setup ‘luarocks’
        uses: luarocks/gh-actions-luarocks@v5
      - name: Make and install
        run: |
          luarocks make -- luasocket-scm-3.rockspec
        env:
          DEBUG: DEBUG
      - name: Run regression tests
        shell: bash
        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