Skip to content

Commit

Permalink
again
Browse files Browse the repository at this point in the history
  • Loading branch information
ctapmex committed Sep 4, 2024
1 parent a613e59 commit e2a12ea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 144 deletions.
144 changes: 0 additions & 144 deletions .github/workflows/colorer_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,131 +31,6 @@ env:
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]
exclude:
- libxml: ON
zip: ON

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 libspdlog-dev libfmt-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]
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 }}

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 }}
- 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
Expand Down Expand Up @@ -203,22 +78,3 @@ jobs:
- 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 .
3 changes: 3 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,9 @@ if(COLORER_USE_ICU_STRINGS)
PUBLIC ICU::uc ICU::data
)
include_directories("${ICU_INCLUDE_DIRS}")
message(STATUS "ICU_FOUND - ${ICU_FOUND}")
message(STATUS "ICU_INCLUDE_DIRS - ${ICU_INCLUDE_DIRS}")
message(STATUS "ICU_LIBRARIES - ${ICU_LIBRARIES}")
endif()

if(COLORER_USE_ZIPINPUTSOURCE)
Expand Down

0 comments on commit e2a12ea

Please sign in to comment.