Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
62 changes: 62 additions & 0 deletions .github/workflows/io2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: IO2-Main

on:
workflow_dispatch:
push:
branches:
- 'master'
pull_request:
branches: [ master ]


jobs:
Windows:
strategy:
matrix:
build_type: [Release, RelWithDebInfo, MinSizeRel, Debug]
runs-on: windows-2022
env:
BUILD_DIR: D:/a/Lua-io2/Lua-io2/${{ matrix.build_type}}/

steps:
- uses: actions/checkout@v4

- name: Cache Boost
id: cache-LuaBoost
uses: actions/cache@v3
with:
path: |
C:/local/boost_1_80_0/
D:/a/Lua-io2/Lua-io2/LuaJIT/
D:/a/Lua-io2/Lua-io2/sol2/
key: ${{ runner.os }}-LuaBoost

- name: Get Deps (Boost, LuaJIT)
shell: bash
if: steps.cache-LuaBoost.outputs.cache-hit != 'true'
run: CI/get_win_deps.sh

- name: Configure
shell: bash
run: LUA_DIR=LuaJIT/ cmake .

- name: Build
run: |
cmake --build . --config ${{ matrix.build_type }}
mv ${{ env.BUILD_DIR }}/io2.dll ${{ env.BUILD_DIR }}/io2-${{ matrix.build_type }}.dll

- name: Upload Release
if: github.event_name != 'pull_request'
uses: softprops/action-gh-release@v1
with:
tag_name: Stable-CI
files: ${{ env.BUILD_DIR }}/io2-${{ matrix.build_type }}.dll
body: |
CI Build for Dreamweave IO2 fork

- name: Upload Artifact
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v3
with:
path: ${{ env.BUILD_DIR }}/io2-${{ matrix.build_type }}.dll
name: io2-lua-${{ matrix.build_type }}
73 changes: 73 additions & 0 deletions CI/get_win_deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
set -e

CMAKE_OPTS=""
add_cmake_opts() {
CMAKE_OPTS="$CMAKE_OPTS $@"
}

download() {
if [ $# -lt 3 ]; then
echo "Invalid parameters to download."
return 1
fi

NAME=$1
shift

echo "$NAME..."

while [ $# -gt 1 ]; do
URL=$1
FILE=$2
shift
shift

if ! [ -f $FILE ]; then
printf " Downloading $FILE... "

if [ -z $VERBOSE ]; then
RET=0
curl --silent --fail --retry 10 -Ly 5 -o $FILE $URL || RET=$?
else
RET=0
curl --fail --retry 10 -Ly 5 -o $FILE $URL || RET=$?
fi

if [ $RET -ne 0 ]; then
echo "Failed!"
wrappedExit $RET
else
echo "Done."
fi
else
echo " $FILE exists, skipping."
fi
done

if [ $# -ne 0 ]; then
echo "Missing parameter."
fi
}



download "LuaJIT v2.1.0-beta3-452-g7a0cf5fd" \
"https://gitlab.com/OpenMW/openmw-deps/-/raw/main/windows/LuaJIT-v2.1.0-beta3-452-g7a0cf5fd-msvc2019-win64.7z" \
"LuaJIT-v2.1.0-beta3-452-g7a0cf5fd-msvc2019-win64.7z"



download "Boost 1.80.0" \
"https://gitlab.com/OpenMW/openmw-deps/-/raw/main/windows/boost_1_80_0-msvc-14.3-64.exe" \
"boost-1.80.0-msvc14.3-win64.exe"

echo "Installing Boost . . ."
./boost-1.80.0-msvc14.3-win64.exe //DIR="${CWD_DRIVE_ROOT}" //VERYSILENT //NORESTART //SUPPRESSMSGBOXES //LOG='boost_install.log'

echo "Extracting LuaJIT . . ."
eval 7z x -y LuaJIT-v2.1.0-beta3-452-g7a0cf5fd-msvc2019-win64.7z -o./LuaJIT

echo "Praise the Sun!"
git submodule init && git submodule update

ls -laR
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if (CMAKE_CXX_COMPILE_FEATURES MATCHES cxx_std_17 AND HAVE_FILESYSTEM_H)
add_definitions(-DHAVE_FILESYSTEM)
else()
set(CMAKE_CXX_STANDARD 14)
#set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_STATIC_LIBS ON)
find_package(Boost REQUIRED)
find_package(Boost COMPONENTS system filesystem REQUIRED)
endif()
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindLuaJit.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ libfind_pkg_detect(LuaJit luajit
FIND_PATH luajit.h
HINTS $ENV{LUA_DIR}
PATH_SUFFIXES include include/luajit-2.1
FIND_LIBRARY luajit-5.1 luajit
FIND_LIBRARY luajit-5.1 luajit lua51
HINTS $ENV{LUA_DIR}
PATH_SUFFIXES lib
)
Expand Down