Skip to content

Keep going with Windows makefile #611

Keep going with Windows makefile

Keep going with Windows makefile #611

Workflow file for this run

name: CI
on: [ push ]
jobs:
testing:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system:
- ubuntu-latest
- macos-latest
lua-version:
- "5.1"
- "5.2"
- "5.3"
- "5.4"
# We can't specifically select versions of LuaJIT as of August 2024. This may or
# may not be fixable.
# https://github.com/leafo/gh-actions-lua/issues/49
- "luajit-openresty" # Judging from the docs, this is basically LuaJIT 2.1
unicorn-version:
- "1.0.3"
- "2.0.1.post1"
- "2.1.0"
exclude:
# Unicorn 1.x breaks on macOS 14+
- operating-system: macos-latest
unicorn-version: "1.0.3"
include:
- operating-system: macos-13
unicorn-version: "1.0.3"
lua-version: "5.1"
- operating-system: macos-13
unicorn-version: "1.0.3"
lua-version: "5.2"
- operating-system: macos-13
unicorn-version: "1.0.3"
lua-version: "5.3"
- operating-system: macos-13
unicorn-version: "1.0.3"
lua-version: "5.4"
- operating-system: macos-13
unicorn-version: "1.0.3"
lua-version: "luajit-openresty"
steps:
- uses: actions/[email protected]
with:
persist-credentials: false
- name: Install Lua
uses: leafo/[email protected]
with:
luaVersion: ${{ matrix.lua-version }}
# We need LUAJIT_ENABLE_GC64 on MacOS: https://github.com/moonjit/moonjit/issues/121
luaCompileFlags: XCFLAGS="-DLUAJIT_ENABLE_GC64=1"
- name: Install LuaRocks
uses: leafo/[email protected]
with:
luaRocksVersion: "3.11.1"
- name: Install Unicorn
run: make -C tools/ci install_unicorn UNICORN_VERSION=${{ matrix.unicorn-version }}
- name: Environment
run: luarocks config
- name: Install Binding
run: luarocks build
env:
USER_CXX_FLAGS: -Wall -Wextra -Werror -Wpedantic -pedantic-errors
- name: Run tests
run: luarocks test
env:
USER_CXX_FLAGS: -Wall -Wextra -Werror -Wpedantic -pedantic-errors
testing-windows:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
# Keep this identical to the *NIX one
# https://github.com/actions/runner/issues/1182
lua-version:
- "5.1"
- "5.2"
- "5.3"
- "5.4"
- "luajit-openresty"
steps:
- uses: actions/[email protected]
with:
persist-credentials: false
- name: Lua prereqs on Windows
uses: ilammy/msvc-dev-cmd@v1
- name: Install Lua
uses: leafo/[email protected]
with:
luaVersion: ${{ matrix.lua-version }}
- name: Install LuaRocks
# Note: This is a fork of the original by leafo. Switch back to that once
# https://github.com/leafo/gh-actions-luarocks/pull/14 has been merged.
uses: hishamhm/gh-actions-luarocks@5013277f6f115c27478f18c1f647f8de98390628
with:
luaRocksVersion: "3.11.1"
- name: Install Unicorn
run: |
Expand-Archive -Path 'tools\ci\win64-8e6499f.zip'
Move-Item -Path '.\win64-8e6499f\windows_mingw64-shared\bin\libunicorn.dll' -Destination 'C:\Windows\System32'
New-Item -Path 'C:\Windows\System32' -Name 'include' -ItemType 'directory' -Force
Move-Item -Path '.\win64-8e6499f\windows_mingw64-shared\include\unicorn' -Destination 'C:\Windows\System32\include'
- name: Environment
run: luarocks config
- name: Install Binding
run: luarocks build
- name: Run tests
run: luarocks test