Skip to content

ci: fix cmake build cmd #23

ci: fix cmake build cmd

ci: fix cmake build cmd #23

Workflow file for this run

name: CMake
on:
push:
branches: [ master ]
env:
BUILD_TYPE: Release
jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: windows-latest
steps:
- name: Install Conan
id: conan
uses: turtlebrowser/get-conan@main
- name: Update conan profile
run: conan profile detect
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Using the builtin GitHub Cache Action for .conan
id: cache-conan-restore
uses: actions/cache/restore@v3
env:
cache-name: cache-conan-modules
with:
path: ~/.conan2/
key: ${{ runner.os }}-builder-${{ env.cache-name }}-${{ hashFiles('cpp-lib/conanfile.py') }}
restore-keys: ${{ runner.os }}-builder-${{ env.cache-name }}-
- name: Install Dependencies
run: conan install . -of ./build -s build_type=${{env.BUILD_TYPE}} --build=missing
working-directory: cpp-lib
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake --preset npitaya-default -DBUILD_TESTING=OFF
working-directory: cpp-lib
- name: Build
# Build your program with the given configuration
run: cmake --build ./build/_builds --config ${{env.BUILD_TYPE}} --target pitaya_cpp
working-directory: cpp-lib
- uses: actions/cache/save@v3
if: always()
env:
cache-name: cache-conan-modules
with:
path: ~/.conan2/
key: ${{ runner.os }}-builder-${{ env.cache-name }}-${{ hashFiles('cpp-lib/conanfile.py') }}
#TODO: fix tests
# - name: Test
# working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
# run: ctest -C ${{env.BUILD_TYPE}}