Skip to content

Creature/Monster Icons #3194

Creature/Monster Icons

Creature/Monster Icons #3194

Workflow file for this run

name: Build with vcpkg
on:
push:
branches:
- master
- v*
paths:
- cmake/**
- src/**
- CMakeLists.txt
- CMakePresets.json
- vcpkg.json
pull_request:
paths:
- cmake/**
- src/**
- CMakeLists.txt
- CMakePresets.json
- vcpkg.json
jobs:
build-vcpkg:
name: ${{ matrix.os }}-${{ matrix.buildtype }}-luajit=${{ matrix.luajit }}
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
os: [ubuntu, macos, windows]
buildtype: [Debug, Release]
luajit: [on, off]
steps:
- uses: actions/checkout@v3
- name: Get latest CMake
# Using 'latest' branch, the latest CMake is installed.
uses: lukka/get-cmake@latest
- name: Enable LuaJIT
if: ${{ matrix.luajit }} == "on"
run: echo "VCPKG_FEATURE_FLAGS=luajit" >> $GITHUB_ENV
- name: Run vcpkg
uses: lukka/run-vcpkg@v11
- name: Build with CMake
uses: lukka/run-cmake@v10
with:
buildPreset: vcpkg
buildPresetAdditionalArgs: "['--config ${{ matrix.buildtype }}', '--clean-first']"
configurePreset: vcpkg
configurePresetAdditionalArgs: "['-G Ninja']"
- name: Upload artifact binary
uses: actions/upload-artifact@v3
if: ${{ !startsWith(matrix.os, 'windows') }}
with:
name: tfs-${{ matrix.name }}-${{ matrix.buildtype }}-luajit=${{ matrix.luajit }}-${{ github.sha }}
path: ${{ runner.workspace }}/build/tfs
- name: Upload artifact binary (exe)
uses: actions/upload-artifact@v3
if: ${{ startsWith(matrix.os, 'windows') }}
with:
name: tfs-${{ matrix.name }}-${{ matrix.buildtype }}-luajit=${{ matrix.luajit }}-${{ github.sha }}
path: |
${{ runner.workspace }}/build/tfs.exe
${{ 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@v3
with:
name: tfs-${{ matrix.name }}-${{ matrix.buildtype }}-luajit=${{ matrix.luajit }}-${{ github.sha }}
path: ${{ github.workspace }}