Skip to content

vcpkg update

vcpkg update #277

Workflow file for this run

name: Build checking
on:
# workflow_dispatch - manual start build from action menu
workflow_dispatch:
push:
branches:
- master
paths-ignore:
- '.github/workflows/clean_workflow.yml'
- '.github/workflows/codeql-analysis.yml'
- '.github/workflows/docker_build.yml'
- '.github/workflows/prebuild.yml'
- '.github/workflows/release.yml'
- 'ci/**'
- 'docs/**'
- '.clang-format'
- '.gitignore'
- 'CHANGELOG.md'
- 'CMakePresets.json'
- 'CONTRIBUTORS'
- 'LICENSE'
- 'README.md'
pull_request:
branches:
- master
env:
BUILD_TYPE: Release
X_VCPKG_NUGET_ID_PREFIX: 'colorer'
VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite'
jobs:
ubuntu-gcc:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
arch: [ x64 ]
icu: [ON, OFF]
zip: [ON, OFF]
libxml: [ON, OFF]
name: linux-${{ matrix.arch }}-icu_${{ matrix.icu }}-zip_${{ matrix.zip }}-libxml_${{ matrix.libxml }}
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Install dependency
run: sudo apt-get -y install ninja-build libicu-dev libxerces-c-dev zlib1g-dev libminizip-dev libxml2-dev
- name: Create Build folder
run: mkdir -p _build
- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v2
id: cpu-cores
- name: Configure CMake
run: >
cmake -S . -B _build -G "Ninja"
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
-DCOLORER_BUILD_TEST=ON
-DCOLORER_USE_VCPKG=OFF
-DCOLORER_BUILD_ARCH=${{ matrix.arch }}
-DCOLORER_USE_ICU_STRINGS=${{ matrix.icu }}
-DCOLORER_USE_ZIPINPUTSOURCE=${{ matrix.zip }}
-DCOLORER_USE_LIBXML=${{ matrix.libxml }}
- name: Build
run: cmake --build _build --config $BUILD_TYPE -j ${{ steps.cpu-cores.outputs.count }}
- name: Test
run: ./_build/tests/unit/unit_tests
windows-vc:
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
arch: [ x64, x86 ]
icu: [ON, OFF]
zip: [ON, OFF]
libxml: [ON, OFF]
include:
- arch: x64
triplet: x64-windows-static-rel
- arch: x86
triplet: x86-windows-static-rel
exclude:
- arch: x86
zip: OFF
name: windows-${{ matrix.arch }}-icu_${{ matrix.icu }}-zip_${{ matrix.zip }}-libxml_${{ matrix.libxml }}
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
submodules: recursive
# fetch all for vcpkg versions functionality
fetch-depth: 0
- name: Install vcpkg
run: |
cd external\vcpkg
.\bootstrap-vcpkg.bat
- name: Add C++ build tools to PATH
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.arch }}
- name: Setup NuGet Credentials for vpckg cache
shell: bash
run: >
`$GITHUB_WORKSPACE/external/vcpkg/vcpkg fetch nuget | tail -n 1`
sources add
-source "https://nuget.pkg.github.com/colorer/index.json"
-storepasswordincleartext
-name "GitHub"
-username "${{ secrets.PACKAGES_GITHUB_USER }}"
-password "${{ secrets.PACKAGES_GITHUB_TOKEN }}"
- name: Create Build folder
run: mkdir -p _build
- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v2
id: cpu-cores
- name: Configure CMake
shell: bash
# add -DVCPKG_INSTALL_OPTIONS="--debug" for debug output
run: >
cmake -S . -B _build -G "Ninja"
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
-DCOLORER_BUILD_TEST=ON
-DCOLORER_BUILD_ARCH=${{ matrix.arch }}
-DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/external/vcpkg/scripts/buildsystems/vcpkg.cmake
-DVCPKG_OVERLAY_PORTS=$GITHUB_WORKSPACE/external/vcpkg-ports
-DVCPKG_OVERLAY_TRIPLETS=$GITHUB_WORKSPACE/external/vcpkg-triplets
-DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }}
-DVCPKG_FEATURE_FLAGS=manifests,versions
-DCOLORER_USE_ICU_STRINGS=${{ matrix.icu }}
-DCOLORER_USE_ZIPINPUTSOURCE=${{ matrix.zip }}
-DCOLORER_USE_LIBXML=${{ matrix.libxml }}
- name: Build
shell: bash
run: cmake --build _build --config $BUILD_TYPE -j ${{ steps.cpu-cores.outputs.count }}
- name: Test
shell: bash
run: ./_build/tests/unit/unit_tests.exe
macos-clang:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
arch: [ x64 ]
icu: [ON, OFF]
zip: [ON, OFF]
libxml: [ON, OFF]
name: macos-${{ matrix.arch }}-icu_${{ matrix.icu }}-zip_${{ matrix.zip }}-libxml_${{ matrix.libxml }}
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Install dependency
# icu4c is already installed
run: brew install xerces-c minizip ninja libxml2
- name: Relink icu, because he is 'keg-only'
run: brew link icu4c --force
- name: Create Build folder
run: mkdir -p _build
- name: Configure CMake
run: >
cmake -S . -B _build -G "Ninja"
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
-DCOLORER_BUILD_TEST=ON
-DCOLORER_USE_VCPKG=OFF
-DCOLORER_BUILD_ARCH=${{ matrix.arch }}
-DCOLORER_USE_ICU_STRINGS=${{ matrix.icu }}
-DCOLORER_USE_ZIPINPUTSOURCE=${{ matrix.zip }}
-DCOLORER_USE_LIBXML=${{ matrix.libxml }}
- name: Build
run: cmake --build _build --config $BUILD_TYPE -j$(getconf _NPROCESSORS_ONLN)
- name: Test
run: ./_build/tests/unit/unit_tests
test-xercesc:
# check build with xerces-c (unit16_t)
runs-on: ubuntu-22.04
name: linux-xercesc-uint16t
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: 'Login to GitHub Container Registry'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ secrets.PACKAGES_GITHUB_USER }}
password: ${{ secrets.PACKAGES_GITHUB_TOKEN }}
- name: 'Build in docker'
run: |
docker build -f ci/Dockerfile-test-xercesc -t tempx:latest .