Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix Windows tests + enable for PRs #9

Merged
merged 11 commits into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .busted
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
return {
_all = {
coverage = false,
lpath = "src/?.lua;src/?/init.lua",
},
default = {
verbose = true,
ROOT = {"test"},
},
tests = {
verbose = true,
},
}
33 changes: 17 additions & 16 deletions .github/workflows/spec.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: build

on: [push]
on:
push:
pull_request:

jobs:
build:
Expand All @@ -9,32 +11,31 @@ jobs:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
lua: ["lua 5.1", "lua 5.2", "lua 5.3", "lua 5.4", "luajit 2.1"]
lua: ["5.1", "5.2", "5.3", "5.4", "luajit"]
mrcjkb marked this conversation as resolved.
Show resolved Hide resolved

steps:
- uses: actions/checkout@v3

- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install MSVC Compiler Toolchain
uses: ilammy/msvc-dev-cmd@v1
if: runner.os == 'Windows'

- name: Install Lua
env:
# luajit fails to build on macos without this
MACOSX_DEPLOYMENT_TARGET: "10.15"
run: |
python -m pip install hererocks
python -m hererocks lua_install --${{ matrix.lua }} -rlatest
. lua_install/bin/activate
luarocks install busted
uses: leafo/gh-actions-lua@v10
with:
luaVersion: ${{ matrix.lua }}

- name: Install Luarocks
# NOTE: This is a fork with Windows support
uses: hishamhm/gh-actions-luarocks@master

- name: Build
run: |
. lua_install/bin/activate
luarocks make

- name: Test
run: |
. lua_install/bin/activate
luarocks test
# FIXME: There seems to be a bug causing busted
# to fail on Windows, because it can't find LuaFileSystem
if: runner.os != 'Windows'
2 changes: 0 additions & 2 deletions src/match.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>

#include "bonus.h"


Expand Down
Loading