aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThijs Schreijer <thijs@thijsschreijer.nl>2024-03-19 11:05:51 +0100
committerGitHub <noreply@github.com>2024-03-19 11:05:51 +0100
commit7ef8c463484ea8ed0f4277fb75c2beecd22adbe5 (patch)
treece6ffe3714926e2c45a19fe06b956a80bcda2f0c
parent7cef1cf1a74c8e10d9cc61b6f5b748f4f7a26abd (diff)
downloadluasystem-7ef8c463484ea8ed0f4277fb75c2beecd22adbe5.tar.gz
luasystem-7ef8c463484ea8ed0f4277fb75c2beecd22adbe5.tar.bz2
luasystem-7ef8c463484ea8ed0f4277fb75c2beecd22adbe5.zip
chore(ci): macos-latest + windows-latest (#17)
Co-authored-by: Hisham Muhammad <hisham@gobolinux.org>
-rw-r--r--.github/workflows/build.yml109
-rw-r--r--.github/workflows/unix_build.yml59
-rw-r--r--README.md3
-rw-r--r--appveyor.yml29
4 files changed, 110 insertions, 90 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..fe8295e
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,109 @@
1name: "Build"
2
3concurrency:
4 # for PR's cancel the running task, if another commit is pushed
5 group: ${{ github.workflow }} ${{ github.ref }}
6 cancel-in-progress: ${{ github.event_name == 'pull_request' }}
7
8on:
9 # build on PR and push-to-main. This works for short-lived branches, and saves
10 # CPU cycles on duplicated tests.
11 # For long-lived branches that diverge, you'll want to run on all pushes, not
12 # just on push-to-main.
13 pull_request: {}
14 push:
15 branches:
16 - master
17
18jobs:
19 test:
20 strategy:
21 fail-fast: false
22 matrix:
23 os: ['ubuntu-20.04', 'macos-11.0']
24 luaVersion:
25 - "5.1"
26 - "5.2"
27 - "5.3"
28 - "5.4"
29 - "luajit"
30 - "luajit-openresty"
31 include:
32 - os: "macos-latest"
33 luaVersion: "5.4"
34 # On Windows builds:
35 # 'hishamhm/gh-actions-lua' will build the PuC Rio Lua versions using MSVC, and
36 # the LuaJIT version using MinGW/gcc. By running against both below, we test
37 # both toolchains.
38 - os: "windows-latest"
39 toolchain: "msvc"
40 luaVersion: "5.1"
41 - os: "windows-latest"
42 toolchain: "msvc"
43 luaVersion: "5.2"
44 - os: "windows-latest"
45 toolchain: "msvc"
46 luaVersion: "5.3"
47 - os: "windows-latest"
48 toolchain: "msvc"
49 luaVersion: "5.4"
50 - os: "windows-latest"
51 toolchain: "mingw" # unused, other than for display in the UI
52 luaVersion: "luajit"
53
54 runs-on: ${{ matrix.os }}
55
56 steps:
57 - name: Checkout
58 uses: actions/checkout@master
59
60 - name: Setup MSVC
61 # the 'hishamhm/gh-actions-lua' step requires msvc to build PuC Rio Lua
62 # versions on Windows (LuaJIT will be build using MinGW/gcc).
63 if: ${{ matrix.toolchain == 'msvc' }}
64 uses: ilammy/msvc-dev-cmd@v1
65
66 # - name: install Dependencies analyzer
67 # # action step used for troubleshooting if Windows dll's build incorrectly
68 # run: |
69 # $version = "1.11.1"
70 # echo "Installing Dependencies version: $version"
71 # $url = 'https://github.com/lucasg/Dependencies/releases/download/v' + $version + '/Dependencies_x64_Release.zip'
72 # $dest = Join-Path -Path $PWD -ChildPath ".dependencies"
73
74 # # Download and extract Dependencies
75 # New-Item -ItemType Directory -Path "$dest"
76 # Invoke-WebRequest -Uri $url -OutFile "$dest\dependencies.zip"
77 # Expand-Archive -Path "$dest\dependencies.zip" -DestinationPath "$dest"
78 # Remove-Item -Path "$dest\dependencies.zip"
79 # # dir "$dest"
80
81 # # Add Dependencies to PATH
82 # $env:PATH += ";$dest"
83 # echo $env:PATH
84
85 # # Verify Dependencies Installation
86 # dir "$dest\*.exe"
87 # dir ".\.dependencies\Dependencies.exe"
88 # .\.dependencies\Dependencies.exe -help
89
90 - uses: hishamhm/gh-actions-lua@master
91 with:
92 luaVersion: ${{ matrix.luaVersion }}
93
94 - uses: hishamhm/gh-actions-luarocks@master
95 with:
96 luarocksVersion: "3.11.0"
97
98 - name: dependencies
99 run: |
100 luarocks install busted
101
102 - name: install
103 run: |
104 luarocks remove --force luasystem
105 luarocks make
106
107 - name: test
108 run: |
109 busted --Xoutput "--color"
diff --git a/.github/workflows/unix_build.yml b/.github/workflows/unix_build.yml
deleted file mode 100644
index 845a156..0000000
--- a/.github/workflows/unix_build.yml
+++ /dev/null
@@ -1,59 +0,0 @@
1name: "Unix build"
2
3concurrency:
4 # for PR's cancel the running task, if another commit is pushed
5 group: ${{ github.workflow }} ${{ github.ref }}
6 cancel-in-progress: ${{ github.event_name == 'pull_request' }}
7
8on:
9 # build on PR and push-to-main. This works for short-lived branches, and saves
10 # CPU cycles on duplicated tests.
11 # For long-lived branches that diverge, you'll want to run on all pushes, not
12 # just on push-to-main.
13 pull_request: {}
14 push:
15 branches:
16 - master
17
18
19jobs:
20 test:
21 runs-on: ${{ matrix.os }}
22
23 strategy:
24 fail-fast: false
25 matrix:
26 os: ['ubuntu-20.04', 'macos-11.0']
27 luaVersion:
28 - "5.1"
29 - "5.2"
30 - "5.3"
31 - "5.4"
32 - "luajit-2.1.0-beta3"
33 - "luajit-openresty"
34
35 steps:
36 - name: Checkout
37 uses: actions/checkout@v3
38
39 - uses: leafo/gh-actions-lua@v10
40 with:
41 luaVersion: ${{ matrix.luaVersion }}
42
43 - uses: leafo/gh-actions-luarocks@v4
44
45 - name: dependencies
46 run: |
47 luarocks install busted
48 luarocks make
49
50 - name: test
51 run: |
52 busted --Xoutput "--color"
53
54 # - name: Report test coverage
55 # if: success()
56 # continue-on-error: true
57 # run: luacov-coveralls
58 # env:
59 # COVERALLS_REPO_TOKEN: ${{ github.token }}
diff --git a/README.md b/README.md
index 6f3c9f6..34d7882 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,4 @@
1[![Unix build](https://img.shields.io/github/actions/workflow/status/lunarmodules/luasystem/unix_build.yml?branch=master&label=Unix%20build&logo=linux)](https://github.com/lunarmodules/luasystem/actions/workflows/unix_build.yml) 1[![Build](https://img.shields.io/github/actions/workflow/status/lunarmodules/luasystem/build.yml?branch=master&label=Unix%20build&logo=linux)](https://github.com/lunarmodules/luasystem/actions/workflows/build.yml)
2[![AppVeyor build status](https://img.shields.io/appveyor/build/Tieske/luasystem/master?label=Windows%20build&logo=windows)](https://ci.appveyor.com/project/Tieske/luasystem/branch/master)
3[![Lint](https://github.com/lunarmodules/luasystem/workflows/Lint/badge.svg)](https://github.com/lunarmodules/luasystem/actions/workflows/lint.yml) 2[![Lint](https://github.com/lunarmodules/luasystem/workflows/Lint/badge.svg)](https://github.com/lunarmodules/luasystem/actions/workflows/lint.yml)
4[![SemVer](https://img.shields.io/github/v/tag/lunarmodules/luasystem?color=brightgreen&label=SemVer&logo=semver&sort=semver)](CHANGELOG.md) 3[![SemVer](https://img.shields.io/github/v/tag/lunarmodules/luasystem?color=brightgreen&label=SemVer&logo=semver&sort=semver)](CHANGELOG.md)
5 4
diff --git a/appveyor.yml b/appveyor.yml
deleted file mode 100644
index f39445b..0000000
--- a/appveyor.yml
+++ /dev/null
@@ -1,29 +0,0 @@
1# this fails for some reason. Disabled for now.
2
3shallow_clone: true
4
5environment:
6 matrix:
7 - LUA: "lua 5.1"
8 - LUA: "lua 5.2"
9 - LUA: "lua 5.3"
10 - LUA: "lua 5.4"
11 - LUA: "luajit 2.0"
12 - LUA: "luajit 2.0 --compat 5.2"
13 - LUA: "luajit 2.1"
14 - LUA: "luajit 2.1 --compat 5.2"
15
16before_build:
17 - set PATH=C:\Python27\Scripts;%PATH%
18 - pip install --upgrade certifi
19 - FOR /F "tokens=* USEBACKQ" %%F IN (`python -c "import certifi;print(certifi.where())"`) DO ( SET SSL_CERT_FILE=%%F )
20 - pip install hererocks
21 - hererocks here --%LUA% -rlatest
22 - call here\bin\activate
23 - luarocks install busted
24
25build_script:
26 - luarocks make
27
28test_script:
29 - busted --Xoutput "--color"