Adding build with vcpkg github workflow

- updated gitignore
- build-vcpkg
This commit is contained in:
slavi 2020-05-09 08:55:33 +02:00 committed by GitHub
commit de97869384
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 321 additions and 47 deletions

133
.github/workflows/build-vcpkg.yml vendored Normal file
View File

@ -0,0 +1,133 @@
name: Build with vcpkg
on:
push:
branches:
- master
- v*
tags:
- v*
paths:
- cmake/**
- src/**
- CMakeLists.txt
pull_request:
paths:
- cmake/**
- src/**
- CMakeLists.txt
jobs:
job:
name: ${{ matrix.os }}-${{ matrix.cxx }}-${{ matrix.buildtype }}-luajit=${{ matrix.luajit }}
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
max-parallel: 8
matrix:
name: [ubuntu-gcc, ubuntu-clang, macos-clang, windows-msvc]
buildtype: [Debug, Release]
luajit: [on, off]
include:
- name: windows-msvc
os: windows
cxx: cl.exe
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
- 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-filesystem boost-uuid physfs openal-soft libogg libvorbis zlib opengl
- name: ubuntu-clang
os: ubuntu
cxx: clang++
cc: clang
triplet: x64-linux
packages: >
boost-iostreams boost-asio boost-system boost-variant boost-lockfree luajit glew
boost-filesystem boost-uuid physfs openal-soft libogg libvorbis zlib opengl
- name: macos-clang
os: macos
cxx: clang++
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
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Unshallow
run: git fetch --prune --unshallow
- name: Get latest CMake
# 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
if: contains( matrix.os, 'ubuntu')
- name: MacOS - install luajit pkgconfig
run: brew install luajit pkgconfig
if: contains( matrix.os, 'macos')
- uses: lukka/set-shell-env@v1
with:
CXX: ${{ matrix.cxx }}
CC: ${{ matrix.cc }}
- name: Run vcpkg
uses: lukka/run-vcpkg@v2
with:
vcpkgArguments: ${{ matrix.packages }}
vcpkgDirectory: ${{ runner.workspace }}/vcpkg/
vcpkgTriplet: ${{ matrix.triplet }}
vcpkgGitCommitId: 7db401cb1ef1fc559ec9f9ce814d064c328fd767
- name: Build with CMake
uses: lukka/run-cmake@v2
with:
useVcpkgToolchainFile: true
buildDirectory: ${{ runner.workspace }}/build
cmakeBuildType: ${{ matrix.buildtype }}
cmakeAppendedArgs: -DUSE_LUAJIT=${{ matrix.luajit }}
- name: dir
run: find $RUNNER_WORKSPACE
shell: bash
- name: Upload artifact binary
uses: actions/upload-artifact@v2
with:
name: otclient-${{ matrix.name }}-${{ matrix.buildtype }}-luajit=${{ matrix.luajit }}-${{ github.sha }}
path: ${{ runner.workspace }}/build/otclient
if: "! contains( matrix.os, 'windows')"
- name: Upload artifact binary (exe)
uses: actions/upload-artifact@v2
with:
name: otclient-${{ matrix.name }}-${{ matrix.buildtype }}-luajit=${{ matrix.luajit }}-${{ github.sha }}
path: ${{ runner.workspace }}/build/otclient.exe
if: contains( matrix.os, 'windows')
- name: Upload artifact binary (dlls)
uses: actions/upload-artifact@v2
with:
name: otclient-${{ matrix.name }}-${{ matrix.buildtype }}-luajit=${{ matrix.luajit }}-${{ github.sha }}
path: ${{ runner.workspace }}/build/*.dll
if: contains( matrix.os, 'windows')

235
.gitignore vendored
View File

@ -1,49 +1,3 @@
build*
CMakeCache.txt
CMakeFiles
cmake_install.cmake
Makefile
/otclient
/*.h
/*.cxx
*.o
*.gch
*.a
*.exe
*.spr
*.dat
*.kdev*
*.cbp
*~
*.kate-swap
*.autosave
CMakeLists.txt.user*
*.xml
*.otb
*.otbm
*.log
*.bak
*.swp
*.pic
.lvimrc
.clang_complete
config.otml
/modules/otclientrc.lua
/doc
!.gitignore
otclient.map
otclient.layout
otclient.exp
otclient.lib
LOCALTODO
tags
Thumbs.db
.directory
src/framework/graphics/dx/
modules/.project/modules.sublime-workspace
vc14/.vs/
*.dll
#################
## Visual Studio
#################
@ -55,6 +9,8 @@ vc14/.vs/
*.suo
*.user
*.sln.docstates
.idea/
.vscode/
# Build results
@ -64,6 +20,7 @@ x64/
build/
[Bb]in/
[Oo]bj/
cmake-build-*/
# MSTest test Results
[Tt]est[Rr]esult*/
@ -90,16 +47,19 @@ build/
*.vssscc
.builds
*.pidb
*.log
*.scc
*.dll
*.exe
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.opendb
*.sdf
*.cachefile
*.VC.db
# Visual Studio profiler
*.psess
@ -112,3 +72,184 @@ ipch/
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# NCrunch
*.ncrunch*
.*crunch*.local.xml
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.Publish.xml
*.pubxml
# NuGet Packages Directory
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
#packages/
# Windows Azure Build Output
csx
*.build.csdef
# Windows Store app package directory
AppPackages/
# Others
sql/
*.Cache
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.[Pp]ublish.xml
*.pfx
*.publishsettings
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
App_Data/*.mdf
App_Data/*.ldf
#############
## Windows detritus
#############
# Windows image file caches
Thumbs.db
ehthumbs.db
# Folder config file
Desktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Mac crap
.DS_Store
# Installer logs
pip-log.txt
# Unit test / coverage reports
.coverage
.tox
#Translations
*.mo
#Mr Developer
.mr.developer.cfg
# Vim files
*~
.*.swp
.*.swo
#################
## OTClient
#################
/otclient
/modules/otclientrc.lua
src/framework/graphics/dx/
*.o
*.gch
*.a
*.kdev*
*.cbp
*~
*.kate-swap
*.autosave
*.bak
*.swp
.lvimrc
.clang_complete
LOCALTODO
tags
# user-specific files
*.xml
*.otb
*.otbm
*.spr
*.dat
*.pic
config.otml
## Cmake cache
CMakeLists.txt.user
CMakeCache.txt
CMakeFiles
CMakeScripts
Testing
Makefile
cmake_install.cmake
install_manifest.txt
compile_commands.json
CTestTestfile.cmake
_deps
## Sublime
# Cache files for Sublime Text
*.tmlanguage.cache
*.tmPreferences.cache
*.stTheme.cache
# Workspace files are user-specific
*.sublime-workspace
# Project files should be checked into the repository, unless a significant
# proportion of contributors will probably not be using Sublime Text
# *.sublime-project
# SFTP configuration file
sftp-config.json
sftp-config-alt*.json
# Package control specific files
Package Control.last-run
Package Control.ca-list
Package Control.ca-bundle
Package Control.system-ca-bundle
Package Control.cache/
Package Control.ca-certs/
Package Control.merged-ca-bundle
Package Control.user-ca-bundle
oscrypto-ca-bundle.crt
bh_unicode_properties.cache
# Sublime-github package stores a github token in this file
# https://packagecontrol.io/packages/sublime-github
GitHub.sublime-settings