Skip to content

export functions to build shard library and use vcpkg to manage dependennces #113

export functions to build shard library and use vcpkg to manage dependennces

export functions to build shard library and use vcpkg to manage dependennces #113

Workflow file for this run

# https://docs.github.com/en/actions/learn-github-actions/contexts
---
name: mdflib
on:
push:
branches:
- master
pull_request:
page_build:
workflow_dispatch:
env:
IS_RELEASE: ${{ github.event_name == 'push' && github.ref_type == 'tag' && startswith(github.ref_name, 'v') }}
jobs:
build:
runs-on: ${{ matrix.env.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- os: windows-latest
triplet: x64-windows-static
- os: ubuntu-latest
triplet: x64-linux
- os: macos-latest
triplet: x64-osx
env:
- name: linux
os: ubuntu-22.04
ninja_platform: linux
cmake_env: {}
# - name: macos
# os: macos-12
# ninja_platform: mac
# cmake_env:
# CC: clang
# CXX: clang++
# pack: 1
#
# - name: win64
# os: windows-latest
# ninja_platform: win
# msvc_arch: x64
# cmake_env:
# CMAKE_RC_FLAGS: "/C 1252"
# CC: clang
# CXX: clang++
# pack: 1
#
# - name: win32
# os: windows-latest
# ninja_platform: win
# msvc_arch: x86
# cmake_env:
# CMAKE_RC_FLAGS: "/C 1252"
# CC: clang
# CXX: clang++
# CMAKE_C_FLAGS: -m32
# CMAKE_CXX_FLAGS: -m32
# pack: 1
steps:
- name: Checkout repository
uses: actions/checkout@v3
# Install latest CMake.
- uses: lukka/get-cmake@latest
# Or pin to a specific CMake version:
# lukka/get-cmake@v3.21.2
# Setup vcpkg: ensures vcpkg is downloaded and built.
# Since vcpkg.json is being used later on to install the packages
# when `run-cmake` runs, no packages are installed at this time
# (and vcpkg does not run).

Check failure on line 80 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build.yml

Invalid workflow file

You have an error in your yaml syntax on line 80
- name: Setup vcpkg (it does not install any package yet)
uses: lukka/run-vcpkg@v11
#with:
# This is the default location of the directory containing vcpkg sources.
# Change it to the right location if needed.
# vcpkgDirectory: '${{ github.workspace }}/vcpkg'
# If not using a submodule for vcpkg sources, this specifies which commit
# id must be checkout from a Git repo.
# Note: it must not be set if using a Git submodule for vcpkg.
vcpkgGitCommitId: 0895a813036f4d189e2bdd1b62741744614347b4
# This is the glob expression used to locate the vcpkg.json.
# Change it to match a single manifest file you want to use.
# Note: do not use `${{ github.context }}` to compose the value as it
# contains backslashes that would be misinterpreted. Instead
# compose a value relative to the root of the repository using
# `**/path/from/root/of/repo/to/vcpkg.json` to match the desired `vcpkg.json`.
# vcpkgJsonGlob: '**/vcpkg.json'
# This is only needed if the command `vcpkg install` must run at this step.
# Instead it is highly suggested to let `run-cmake` to run vcpkg later on
# using the vcpkg.cmake toolchain. The default is `false`.
# runVcpkgInstall: true
- name: Run CMake consuming CMakePreset.json and run vcpkg to build dependencies
uses: lukka/run-cmake@v10
with:
# This is the default path to the CMakeLists.txt along side the
# CMakePresets.json. Change if you need have CMakeLists.txt and CMakePresets.json
# located elsewhere.
# cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
# This is the name of the CMakePresets.json's configuration to use to generate
# the project files. This configuration leverages the vcpkg.cmake toolchain file to
# run vcpkg and install all dependencies specified in vcpkg.json.
configurePreset: 'ninja-multi-vcpkg'
# This is the name of the CMakePresets.json's configuration to build the project.
buildPreset: 'ninja-multi-vcpkg'
...