aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build.yml50
-rw-r--r--.github/workflows/deploy.yml34
-rw-r--r--.github/workflows/luacheck.yml13
3 files changed, 97 insertions, 0 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..49c2c73
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,50 @@
1name: Build
2
3on:
4 push:
5 branches:
6 - master
7 pull_request:
8
9jobs:
10 build:
11 name: Test ${{ matrix.luaVersion }} on ${{ matrix.platform }}
12 strategy:
13 fail-fast: false
14 matrix:
15 luaVersion: [ "5.4", "5.3", "5.2", "5.1", "luajit", "luajit-openresty" ]
16 platform: [ "ubuntu-22.04", "macos-11", "windows-2022" ]
17 runs-on: ${{ matrix.platform }}
18 steps:
19 - name: Checkout
20 uses: actions/checkout@v4
21 - name: Setup ’msvc’
22 if: ${{ startsWith(matrix.platform, 'windows') && !startsWith(matrix.luaVersion, 'luajit') }}
23 uses: ilammy/msvc-dev-cmd@v1
24 - name: Setup ‘lua’
25 uses: leso-kn/gh-actions-lua@v11-staging
26 with:
27 luaVersion: ${{ matrix.luaVersion }}
28 - name: Setup ‘luarocks’
29 uses: hishamhm/gh-actions-luarocks@master
30 - name: Make and install
31 run: |
32 luarocks make -- luasocket-scm-3.rockspec
33 env:
34 DEBUG: DEBUG
35 - name: Run regression tests
36 shell: bash
37 run: |
38 cd test
39 lua hello.lua
40 lua testsrvr.lua > /dev/null &
41 lua testclnt.lua
42 lua stufftest.lua
43 lua excepttest.lua
44 lua test_bind.lua
45 lua test_getaddrinfo.lua
46 lua ltn12test.lua
47 lua mimetest.lua
48 lua urltest.lua
49 lua test_socket_error.lua
50 kill %1
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
new file mode 100644
index 0000000..acd66ea
--- /dev/null
+++ b/.github/workflows/deploy.yml
@@ -0,0 +1,34 @@
1name: Deploy
2
3on: [ push, workflow_dispatch ]
4
5jobs:
6
7 affected:
8 uses: lunarmodules/.github/.github/workflows/list_affected_rockspecs.yml@main
9
10 build:
11 needs: affected
12 if: ${{ needs.affected.outputs.rockspecs }}
13 uses: lunarmodules/.github/.github/workflows/test_build_rock.yml@main
14 with:
15 rockspecs: ${{ needs.affected.outputs.rockspecs }}
16
17 upload:
18 needs: [ affected, build ]
19 # Only run upload if:
20 # 1. We are on the canonical repository (no uploads from forks)
21 # 2. The current commit is either tagged or on the default branch (the workflow will upload dev/scm rockspecs any
22 # time they are touched, tagged ones whenever the edited rockspec and tag match)
23 # 3. Some rockspecs were changed — this implies the commit changing the rockspec is the same one that gets tagged
24 if: >-
25 ${{
26 github.repository == 'lunarmodules/luasocket' &&
27 ( github.ref_name == 'master' || startsWith(github.ref, 'refs/tags/') ) &&
28 needs.affected.outputs.rockspecs
29 }}
30 uses: lunarmodules/.github/.github/workflows/upload_to_luarocks.yml@main
31 with:
32 rockspecs: ${{ needs.affected.outputs.rockspecs }}
33 secrets:
34 apikey: ${{ secrets.LUAROCKS_APIKEY }}
diff --git a/.github/workflows/luacheck.yml b/.github/workflows/luacheck.yml
new file mode 100644
index 0000000..9cb784c
--- /dev/null
+++ b/.github/workflows/luacheck.yml
@@ -0,0 +1,13 @@
1name: Luacheck
2
3on: [push, pull_request]
4
5jobs:
6
7 luacheck:
8 runs-on: ubuntu-22.04
9 steps:
10 - name: Checkout
11 uses: actions/checkout@v4
12 - name: Luacheck
13 uses: lunarmodules/luacheck@v1