Skip to content

Commit 6d82fc2

Browse files
authored
chore(ci): move Windows CI to Github Actions (#508)
1 parent 2936b22 commit 6d82fc2

File tree

3 files changed

+96
-84
lines changed

3 files changed

+96
-84
lines changed

.github/workflows/unix_build.yml

Lines changed: 95 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,105 @@
11
name: "Unix build"
22

3-
on: [push, pull_request]
3+
concurrency:
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+
8+
on:
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
417

518
jobs:
619
test:
7-
runs-on: ubuntu-latest
8-
920
strategy:
1021
fail-fast: false
1122
matrix:
12-
luaVersion: ["5.1", "5.2", "5.3", "5.4", "5.5", "luajit-2.1.0-beta3", "luajit-openresty"]
23+
os:
24+
- "ubuntu-24.04"
25+
- "macos-latest"
26+
luaVersion:
27+
- "5.1"
28+
- "5.2"
29+
- "5.3"
30+
- "5.4"
31+
- "5.5"
32+
- "luajit"
33+
- "luajit-openresty"
34+
include:
35+
# On Windows builds:
36+
# 'hishamhm/gh-actions-lua' will build the PuC Rio Lua versions using
37+
# MSVC, and the LuaJIT version using MinGW/gcc. By running against
38+
# both below, we test both toolchains.
39+
- os: "windows-latest"
40+
toolchain: "msvc"
41+
luaVersion: "5.1"
42+
- os: "windows-latest"
43+
toolchain: "msvc"
44+
luaVersion: "5.2"
45+
- os: "windows-latest"
46+
toolchain: "msvc"
47+
luaVersion: "5.3"
48+
- os: "windows-latest"
49+
toolchain: "msvc"
50+
luaVersion: "5.4"
51+
- os: "windows-latest"
52+
toolchain: "msvc"
53+
luaVersion: "5.5"
54+
- os: "windows-latest"
55+
toolchain: "mingw" # unused, other than for display in the UI
56+
luaVersion: "luajit"
57+
58+
runs-on: ${{ matrix.os }}
1359

1460
steps:
15-
- uses: actions/checkout@v4
16-
17-
- uses: hishamhm/gh-actions-lua@master
18-
with:
19-
luaVersion: ${{ matrix.luaVersion }}
20-
21-
- uses: hishamhm/gh-actions-luarocks@master
22-
with:
23-
luaRocksVersion: "3.13.0"
24-
25-
- name: dependencies
26-
run: |
27-
luarocks install busted
28-
luarocks install luacov-coveralls
29-
30-
- name: build
31-
run: |
32-
luarocks remove penlight --force
33-
luarocks make
34-
35-
- name: Busted tests
36-
run: |
37-
busted --coverage --Xoutput "--color"
38-
39-
- name: Old test suite
40-
run: |
41-
lua run.lua tests --luacov
42-
43-
- name: Examples
44-
run: |
45-
lua run.lua examples
46-
47-
- name: Report test coverage
48-
if: success()
49-
continue-on-error: true
50-
run: luacov-coveralls
51-
env:
52-
COVERALLS_REPO_TOKEN: ${{ github.token }}
61+
- name: Checkout
62+
uses: actions/checkout@master
63+
64+
- name: Setup MSVC
65+
# the 'hishamhm/gh-actions-lua' step requires msvc to build PuC Rio Lua
66+
# versions on Windows (LuaJIT will be build using MinGW/gcc).
67+
if: ${{ matrix.toolchain == 'msvc' }}
68+
uses: ilammy/msvc-dev-cmd@v1
69+
70+
- uses: hishamhm/gh-actions-lua@master
71+
with:
72+
luaVersion: ${{ matrix.luaVersion }}
73+
74+
- uses: hishamhm/gh-actions-luarocks@master
75+
with:
76+
luaRocksVersion: "3.13.0"
77+
78+
- name: dependencies
79+
run: |
80+
luarocks install busted
81+
luarocks install luacov-coveralls
82+
luarocks remove penlight --force
83+
84+
- name: build
85+
run: |
86+
luarocks make
87+
88+
- name: Busted tests
89+
run: |
90+
busted --coverage --Xoutput "--color"
91+
92+
- name: Old test suite
93+
run: |
94+
lua run.lua tests --luacov
95+
96+
- name: Examples
97+
run: |
98+
lua run.lua examples
99+
100+
- name: Report test coverage
101+
if: success()
102+
continue-on-error: true
103+
run: luacov-coveralls
104+
env:
105+
COVERALLS_REPO_TOKEN: ${{ github.token }}

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Penlight Lua Libraries
22

3-
[![Unix build](https://img.shields.io/github/actions/workflow/status/lunarmodules/penlight/unix_build.yml?branch=master&label=Unix%20build&logo=linux)](https://github.com/lunarmodules/Penlight/actions)
4-
[![AppVeyor build status](https://img.shields.io/appveyor/build/Tieske/penlight-ta1gi/master?label=Windows%20build&logo=windows)](https://ci.appveyor.com/project/Tieske/penlight-ta1gi/branch/master)
3+
[![Build](https://img.shields.io/github/actions/workflow/status/lunarmodules/penlight/unix_build.yml?branch=master&label=Build)](https://github.com/lunarmodules/Penlight/actions)
54
[![Coveralls code coverage](https://img.shields.io/coveralls/github/lunarmodules/Penlight?logo=coveralls)](https://coveralls.io/github/lunarmodules/Penlight)
65
[![Luacheck](https://github.com/lunarmodules/Penlight/workflows/Luacheck/badge.svg)](https://github.com/lunarmodules/Penlight/actions)
76
[![SemVer](https://img.shields.io/github/v/tag/lunarmodules/Penlight?color=brightgreen&label=SemVer&logo=semver&sort=semver)](CHANGELOG.md)

appveyor.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)