Skip to content

only build requested features #64

only build requested features

only build requested features #64

Workflow file for this run

name: CMake
on: push
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build:
strategy:
matrix:
# os: [ubuntu-latest, windows-latest]
os: [ windows-latest ]
presets: [ release-windows-clang, release-windows ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
# install cmake and ninja
- uses: lukka/get-cmake@latest
- name: Setup vcpkg
uses: lukka/run-vcpkg@main
id: runvcpkg
with:
# This specifies the location of vcpkg, where it is going to be restored from cache, or create from scratch.
# vcpkgDirectory: '${{ github.workspace }}/vcpkg'
# The Git commit id of vcpkg to be checked out. This is only needed because we are not using a submodule.
vcpkgGitCommitId: '9c7c66471005cb132832786d5d65d83d2cf503ad'
# The vcpkg.json file, which will be part of cache key computation.
# vcpkgJsonGlob: '${{ github.workspace }}/vcpkg.json'
# don't run vcpkg install in the project, ket run-cmake do it.
runVcpkgInstall: false
- name: Run CMake with vcpkg.json manifest - Windows
uses: lukka/run-cmake@v10
with:
configurePreset: ${{ matrix.presets }}
buildPreset: ${{ matrix.presets }}
- name: Run Test
run: './cmake-build/${{ matrix.presets }}/ArcdpsExtensionTests.exe'
# disabled cause i have no idea how to build/use IWYU on windows
# - name: Checkout IWYU
# if: ${{ matrix.presets == 'release-windows-clang' }}
# uses: actions/checkout@v3
# with:
# repository: 'include-what-you-use/include-what-you-use'
# ref: 'clang_15'
# path: 'iwyu'
#
# - name: Build IWYU
# if: ${{ matrix.presets == 'release-windows-clang' }}
# run: 'cmake -G "Ninja" -DCMAKE_CXX_COMPILER=clang.exe -DCMAKE_C_COMPILER=clang.exe -DCMAKE_PREFIX_PATH="C:\Program Files\LLVM" -DCMAKE_LINKER=lld-link.exe iwyu'