Update tools.h #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build with vcpkg | |
on: | |
push: | |
branches: | |
- 8.60 | |
- v* | |
tags: | |
- v* | |
paths: | |
- cmake/** | |
- src/** | |
- CMakeLists.txt | |
pull_request: | |
paths: | |
- cmake/** | |
- src/** | |
- CMakeLists.txt | |
jobs: | |
unix: | |
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] | |
buildtype: [Debug, Release] | |
luajit: [on, off] | |
include: | |
- name: ubuntu-gcc | |
os: ubuntu | |
cxx: g++ | |
cc: gcc | |
triplet: x64-linux | |
packages: > | |
boost-asio boost-iostreams boost-system boost-filesystem boost-variant boost-lockfree | |
lua libmariadb pugixml cryptopp fmt | |
- name: ubuntu-clang | |
os: ubuntu | |
cxx: clang++ | |
cc: clang | |
triplet: x64-linux | |
packages: > | |
boost-asio boost-iostreams boost-system boost-filesystem boost-variant boost-lockfree | |
lua libmariadb pugixml cryptopp fmt | |
- name: macos-clang | |
os: macos | |
cxx: clang++ | |
cc: clang | |
triplet: x64-osx | |
packages: > | |
boost-asio boost-iostreams boost-system boost-filesystem boost-variant boost-lockfree | |
lua libmariadb pugixml cryptopp fmt | |
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, remove libmysqlclient-dev | |
run: | | |
sudo apt-get install libluajit-5.1-dev | |
sudo apt-get remove -y libmysqlclient-dev | |
if: contains( matrix.os, 'ubuntu') | |
- name: MacOS - install luajit pkgconfig | |
run: brew install luajit pkgconfig | |
if: contains( matrix.os, 'macos') | |
- name: Set Environment vars | |
run: | | |
echo "CXX=${{ matrix.cxx }}" >> $GITHUB_ENV | |
echo "CC=${{ matrix.cc }}" >> $GITHUB_ENV | |
- name: Run vcpkg | |
uses: lukka/run-vcpkg@main | |
with: | |
vcpkgArguments: ${{ matrix.packages }} | |
vcpkgDirectory: ${{ runner.workspace }}/vcpkg/ | |
vcpkgTriplet: ${{ matrix.triplet }} | |
vcpkgGitCommitId: 5568f110b509a9fd90711978a7cb76bae75bb092 | |
- name: Build with CMake | |
uses: lukka/run-cmake@main | |
with: | |
useVcpkgToolchainFile: true | |
buildDirectory: ${{ runner.workspace }}/build | |
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced | |
cmakeAppendedArgs: '-G Ninja -DCMAKE_BUILD_TYPE="${{ matrix.buildtype }}" -DUSE_LUAJIT="${{ matrix.luajit }}"' | |
- name: dir | |
run: find $RUNNER_WORKSPACE | |
shell: bash | |
- name: Upload artifact binary | |
uses: actions/upload-artifact@v2 | |
with: | |
name: tfs-${{ matrix.name }}-${{ matrix.buildtype }}-luajit=${{ matrix.luajit }}-${{ github.sha }} | |
path: ${{ runner.workspace }}/build/tfs | |
- name: Prepare datapack contents | |
run: find . -maxdepth 1 ! -name data ! -name config.lua.dist ! -name key.pem ! -name LICENSE ! -name README.md ! -name schema.sql -exec rm -r {} \; | |
shell: bash | |
- name: Upload datapack contents | |
uses: actions/upload-artifact@v2 | |
with: | |
name: tfs-${{ matrix.name }}-${{ matrix.buildtype }}-luajit=${{ matrix.luajit }}-${{ github.sha }} | |
path: ${{ github.workspace }} | |
windows: | |
name: ${{ matrix.os }}-${{ matrix.cxx }}-${{ matrix.buildtype }}-luajit=on | |
runs-on: ${{ matrix.os }}-latest | |
strategy: | |
fail-fast: false | |
max-parallel: 8 | |
matrix: | |
name: [windows-msvc] | |
buildtype: [Debug, Release] | |
include: | |
- name: windows-msvc | |
os: windows | |
cxx: cl.exe | |
cc: cl.exe | |
triplet: x64-windows | |
packages: > | |
boost-asio boost-iostreams boost-system boost-filesystem boost-variant boost-lockfree | |
lua luajit libmariadb pugixml cryptopp fmt | |
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: Windows - remove C:/mysql* | |
run: rm -r -fo C:/mysql-5.7.21-winx64 | |
- name: Set Environment vars | |
run: | | |
echo "CXX=${{ matrix.cxx }}" >> $GITHUB_ENV | |
echo "CC=${{ matrix.cc }}" >> $GITHUB_ENV | |
- name: Run vcpkg | |
uses: lukka/run-vcpkg@main | |
with: | |
vcpkgArguments: ${{ matrix.packages }} | |
vcpkgDirectory: ${{ runner.workspace }}/vcpkg/ | |
vcpkgTriplet: ${{ matrix.triplet }} | |
vcpkgGitCommitId: 5568f110b509a9fd90711978a7cb76bae75bb092 | |
- name: Build with CMake | |
uses: lukka/run-cmake@main | |
with: | |
useVcpkgToolchainFile: true | |
buildDirectory: ${{ runner.workspace }}/build | |
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced | |
cmakeAppendedArgs: '-G Ninja -DCMAKE_BUILD_TYPE="${{ matrix.buildtype }}" -DUSE_LUAJIT="on"' | |
- name: dir | |
run: find $RUNNER_WORKSPACE | |
shell: bash | |
- name: Upload artifact binary (exe) | |
uses: actions/upload-artifact@v2 | |
with: | |
name: tfs-${{ matrix.name }}-${{ matrix.buildtype }}-luajit=on-${{ github.sha }} | |
path: ${{ runner.workspace }}/build/tfs.exe | |
- name: Upload artifact binary (dlls) | |
uses: actions/upload-artifact@v2 | |
with: | |
name: tfs-${{ matrix.name }}-${{ matrix.buildtype }}-luajit=on-${{ github.sha }} | |
path: ${{ runner.workspace }}/build/*.dll | |
- name: Prepare datapack contents | |
run: find . -maxdepth 1 ! -name data ! -name config.lua.dist ! -name key.pem ! -name LICENSE ! -name README.md ! -name schema.sql -exec rm -r {} \; | |
shell: bash | |
- name: Upload datapack contents | |
uses: actions/upload-artifact@v2 | |
with: | |
name: tfs-${{ matrix.name }}-${{ matrix.buildtype }}-luajit=on-${{ github.sha }} | |
path: ${{ github.workspace }} |