Update workflow (#1130)

This commit is contained in:
Marcin Michalski 2021-03-26 14:37:02 +01:00 committed by GitHub
parent 9c9b85ac5e
commit b6399a8ad9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 29 additions and 28 deletions

View File

@ -38,15 +38,15 @@ jobs:
cc: cl.exe
triplet: x64-windows
packages: >
boost-iostreams boost-asio boost-system boost-variant boost-lockfree luajit glew
boost-filesystem boost-uuid physfs openal-soft libogg libvorbis zlib opengl
boost-iostreams boost-asio boost-system boost-variant boost-lockfree glew
boost-filesystem boost-uuid physfs openal-soft libogg lua luajit libvorbis zlib opengl
- name: ubuntu-gcc
os: ubuntu
cxx: g++
cc: gcc
triplet: x64-linux
packages: >
boost-iostreams boost-asio boost-system boost-variant boost-lockfree luajit glew
boost-iostreams boost-asio boost-system boost-variant boost-lockfree glew
boost-filesystem boost-uuid physfs openal-soft libogg libvorbis zlib opengl
- name: ubuntu-clang
os: ubuntu
@ -54,7 +54,7 @@ jobs:
cc: clang
triplet: x64-linux
packages: >
boost-iostreams boost-asio boost-system boost-variant boost-lockfree luajit glew
boost-iostreams boost-asio boost-system boost-variant boost-lockfree glew
boost-filesystem boost-uuid physfs openal-soft libogg libvorbis zlib opengl
- name: macos-clang
os: macos
@ -62,8 +62,8 @@ jobs:
cc: clang
triplet: x64-osx
packages: >
boost-iostreams boost-asio boost-system boost-variant boost-lockfree luajit glew
boost-filesystem boost-uuid physfs openal-soft libogg libvorbis zlib opengl
boost-iostreams boost-asio boost-system boost-variant boost-lockfree glew
boost-filesystem boost-uuid openal-soft libogg libvorbis zlib opengl
steps:
- uses: actions/checkout@v2
@ -77,35 +77,35 @@ jobs:
# Using 'latest' branch, the latest CMake is installed.
uses: lukka/get-cmake@latest
- name: Ubuntu - install luajit
run: |
sudo apt-get install libluajit-5.1-dev
- name: Ubuntu - install opengl lua5.1 luajit
# vcpkg has lua 5.2
run: sudo apt-get install libglew-dev liblua5.1-0-dev libluajit-5.1-dev
if: contains( matrix.os, 'ubuntu')
- name: MacOS - install luajit pkgconfig
run: brew install luajit pkgconfig
- name: MacOS - install physfs pkgconfig lua5.1 luajit xquartz
run: brew install physfs pkgconfig lua@5.1 luajit xquartz
if: contains( matrix.os, 'macos')
- uses: lukka/set-shell-env@v1
with:
CXX: ${{ matrix.cxx }}
CC: ${{ matrix.cc }}
- name: Set Environment vars
run: |
echo "CXX=${{ matrix.cxx }}" >> $GITHUB_ENV
echo "CC=${{ matrix.cc }}" >> $GITHUB_ENV
- name: Run vcpkg
uses: lukka/run-vcpkg@v2
uses: lukka/run-vcpkg@v7.1
with:
vcpkgArguments: ${{ matrix.packages }}
vcpkgDirectory: ${{ runner.workspace }}/vcpkg/
vcpkgTriplet: ${{ matrix.triplet }}
vcpkgGitCommitId: 7db401cb1ef1fc559ec9f9ce814d064c328fd767
vcpkgGitCommitId: 9a49e3df7f729655318c59b9985c9c18ad0c99d6
- name: Build with CMake
uses: lukka/run-cmake@v2
uses: lukka/run-cmake@v3
with:
useVcpkgToolchainFile: true
buildDirectory: ${{ runner.workspace }}/build
cmakeBuildType: ${{ matrix.buildtype }}
cmakeAppendedArgs: -DUSE_LUAJIT=${{ matrix.luajit }}
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
cmakeAppendedArgs: '-G Ninja -DCMAKE_BUILD_TYPE="${{ matrix.buildtype }}" -DLUAJIT="${{ matrix.luajit }}"'
useVcpkgToolchainFile: true
- name: dir
run: find $RUNNER_WORKSPACE

View File

@ -148,8 +148,8 @@ else()
set(USE_STATIC_LIBS OFF)
set(USE_LIBCPP ON)
endif()
set(BUILD_COMMIT "devel" CACHE "Git commit string (intended for releases)" STRING)
set(BUILD_REVISION "0" CACHE "Git revision string (intended for releases)" STRING)
set(BUILD_COMMIT "devel" CACHE STRING "Git commit string (intended for releases)")
set(BUILD_REVISION "0" CACHE STRING "Git revision string (intended for releases)")
# default build type
if(NOT CMAKE_BUILD_TYPE)
@ -294,15 +294,16 @@ if(FRAMEWORK_THREAD_SAFE)
set(framework_DEFINITIONS ${framework_DEFINITIONS} -DTHREAD_SAFE)
endif()
set(OpenGL_GL_PREFERENCE "GLVND")
if(FRAMEWORK_GRAPHICS)
set(OPENGLES "OFF" CACHE "Use OpenGL ES 1.0 or 2.0 (for mobiles devices)" STRING)
set(OPENGLES "OFF" CACHE STRING "Use OpenGL ES 1.0 or 2.0 (for mobiles devices)")
if(OPENGLES STREQUAL "2.0")
find_package(OpenGLES2 REQUIRED)
find_package(EGL REQUIRED)
set(framework_DEFINITIONS ${framework_DEFINITIONS} -DOPENGL_ES=2)
set(framework_INCLUDE_DIRS ${framework_INCLUDE_DIRS} ${EGL_INCLUDE_DIR} ${OPENGLES2_INCLUDE_DIR})
set(framework_LIBRARIES ${framework_LIBRARIES} ${EGL_LIBRARY} ${OPENGLES2_LIBRARY})
ELSEif(OPENGLES STREQUAL "1.0")
elseif(OPENGLES STREQUAL "1.0")
find_package(OpenGLES1 REQUIRED)
find_package(EGL REQUIRED)
set(framework_DEFINITIONS ${framework_DEFINITIONS} -DOPENGL_ES=1)

View File

@ -4,7 +4,7 @@
# LUAJIT_LIBRARY - the lua library
# LUAJIT_LIBRARIES - the lua library and it's dependencies
FIND_PATH(LUAJIT_INCLUDE_DIR NAMES lua.h PATH_SUFFIXES luajit-2.0)
FIND_PATH(LUAJIT_INCLUDE_DIR NAMES lua.h PATH_SUFFIXES luajit-2.0 luajit-2.1)
SET(_LUAJIT_STATIC_LIBS libluajit51.a libluajit5.1.a libluajit-5.1.a libluajit.a)
SET(_LUAJIT_SHARED_LIBS libluajit51.dll.a libluajit5.1.dll.a libluajit-5.1.dll.a libluajit.dll.a luajit51 luajit5.1 luajit-5.1 luajit)
IF(USE_STATIC_LIBS)