Don't recreate stackables every move #3819
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: | |
- master | |
- v* | |
paths: | |
- .github/workflows/build-vcpkg.yml | |
- cmake/** | |
- src/** | |
- CMakeLists.txt | |
- CMakePresets.json | |
- vcpkg.json | |
pull_request: | |
paths: | |
- .github/workflows/build-vcpkg.yml | |
- 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] | |
env: | |
VCPKG_BUILD_TYPE: release | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v3 | |
with: | |
languages: cpp | |
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs | |
queries: +security-extended,security-and-quality | |
if: ${{ matrix.os == 'ubuntu' && matrix.buildtype == 'Debug' }} | |
- name: Get latest CMake | |
# Using 'latest' branch, the latest CMake is installed. | |
uses: lukka/get-cmake@latest | |
- name: Run vcpkg | |
uses: lukka/run-vcpkg@v11 | |
- name: Build with CMake | |
uses: lukka/run-cmake@v10 | |
with: | |
buildPreset: vcpkg | |
buildPresetAdditionalArgs: "['--config', '${{ matrix.buildtype }}']" | |
configurePreset: vcpkg | |
configurePresetAdditionalArgs: "['-DUSE_LUAJIT=${{ matrix.luajit }}']" | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v3 | |
with: | |
category: "/language:cpp" | |
if: ${{ matrix.os == 'ubuntu' && matrix.buildtype == 'Debug' }} | |
- name: Upload artifact binary | |
uses: actions/upload-artifact@v4 | |
if: ${{ !startsWith(matrix.os, 'windows') }} | |
with: | |
name: tfs-${{ matrix.os }}-${{ matrix.buildtype }}-luajit=${{ matrix.luajit }}-${{ github.sha }} | |
path: ${{ runner.workspace }}/build/${{ matrix.buildtype }}/tfs | |
- name: Upload artifact binary (exe) | |
uses: actions/upload-artifact@v4 | |
if: ${{ startsWith(matrix.os, 'windows') }} | |
with: | |
name: tfs-${{ matrix.os }}-${{ matrix.buildtype }}-luajit=${{ matrix.luajit }}-${{ github.sha }} | |
path: | | |
${{ runner.workspace }}/build/${{ matrix.buildtype }}/tfs.exe | |
${{ runner.workspace }}/build/${{ matrix.buildtype }}/*.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@v4 | |
with: | |
name: tfs-${{ matrix.os }}-${{ matrix.buildtype }}-luajit=${{ matrix.luajit }}-${{ github.sha }} | |
path: ${{ github.workspace }} |