Skip to content

Commit

Permalink
Merge pull request #2 from PacktPublishing/ci/fix-ci-runs
Browse files Browse the repository at this point in the history
Ci/fix ci runs
  • Loading branch information
bernedom authored Jul 14, 2024
2 parents 2f65563 + d7cee71 commit c23985d
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 27 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,26 @@ concurrency:

jobs:
ci:
name: ${{ matrix.name }}
name: ${{ matrix.os }}-${{ matrix.configurePreset}}
runs-on: ${{ matrix.os }}

strategy:
fail-fast: true
matrix:
name:
[ubuntu-gcc-10, ubuntu-clang-12, macos-appleclang-12, windows-msvc-19, windows-clang]
[ubuntu-gcc, ubuntu-clang, macos-appleclang, windows-msvc-22, windows-clang]
include:
- name: ubuntu-gcc-10
os: ubuntu-22.0
compiler: g++-10
- name: ubuntu-gcc
os: ubuntu-22.04
compiler: g++
configurePreset: ci-ninja-debug

- name: ubuntu-clang-12
os: ubuntu-22.0
compiler: clang++-12
- name: ubuntu-clang
os: ubuntu-22.04
compiler: clang++
configurePreset: ci-ninja-debug

- name: macos-appleclang-12
- name: macos-appleclang
os: macos-14
configurePreset: ci-ninja-debug

Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
if: runner.os == 'macOS'
run: |
brew update
brew install openssl plantuml ninja clang-format llvm
brew install plantuml ninja clang-format llvm
brew install --cask doxygen
ln -s "/usr/local/opt/llvm/bin/clang-tidy" "/usr/local/bin/clang-tidy"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ concurrency:
jobs:
linux-coverage:
name: linux-coverage
runs-on: ubuntu-22.0
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4

Expand All @@ -31,7 +31,7 @@ jobs:
- name: dependencies (debian-like)
run: |
sudo apt -y update
sudo apt -y install gcovr ninja-build clang-tidy
sudo apt -y install gcovr ninja-build clang-tidy doxygen plantuml lcov
- name: cmake-configure
run: |
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
windows-coverage:
name: windows-coverage
runs-on: windows-2019
runs-on: windows-2022

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:

- name: cmake-configure
run: |
cmake --preset=ci-msvc-19
cmake --preset=ci-msvc-22
- name: build
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cross-compiling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
working-directory: ./chapter12/android-example/
arm:
name: arm-crosscompiling
runs-on: ubuntu-22.0
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4

Expand Down
19 changes: 10 additions & 9 deletions .github/workflows/sanitizers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ concurrency:
jobs:
linux-sanitizers:
name: linux-sanitizers
runs-on: ubuntu-22.0
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4

Expand All @@ -26,12 +26,12 @@ jobs:
- name: dependencies (debian-like)
run: |
sudo apt -y update
sudo apt -y install ninja-build clang-tidy
sudo apt -y install ninja-build clang-tidy doxygen plantuml
- name: install-python-deps
run: |
python3 -m pip install --upgrade pip
pip3 install
pip3 install conan
- name: cmake-configure
run: |
Expand All @@ -49,7 +49,7 @@ jobs:

windows-sanitizers:
name: windows-sanitizers
runs-on: windows-2019
runs-on: windows-2022

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -77,17 +77,18 @@ jobs:

- name: cmake-configure
run: |
cmake --preset=ci-msvc-19-sanitizer
cmake --preset=ci-msvc-22-sanitizer
- name: build
run: |
cmake --build --preset=ci-msvc-debug-sanitizer
# Set the path variable so the necessary DLLs are found
shell: cmd
- name: run-msvc-sanitizer
working-directory: build-sanitizer
run: |
set PATH="%PATH%;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64;C:\Program Files\CMake\bin"
set PATH="%PATH%;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.40.33807\bin\Hostx64\x64;C:\Program Files\CMake\bin"
echo %PATH%
"C:\Program Files\CMake\bin\ctest.exe" -v --output-on-failure -C Debug
"C:\Program Files\CMake\bin\ctest.exe" -V --output-on-failure -C Debug
shell: cmd
2 changes: 1 addition & 1 deletion chapter05/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ project(
add_subdirectory(find_package_example)
add_subdirectory(find_module)
add_subdirectory(fetch_content_example)
add_subdirectory(external_project_example)
add_subdirectory(external_project)

# Look for the conan command on the host system, if conan is not found
# exclude all conan related examples from the proejct
Expand Down
File renamed without changes.
File renamed without changes.
7 changes: 6 additions & 1 deletion chapter06/ex01_doxdocgen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ project(
# Locate Doxygen in the environment. This will set DOXYGEN_FOUND variable
# as a result. When Doxygen is found, DOXYGEN_VERSION variable will be
# also set to found Doxygen version.
find_package(Doxygen REQUIRED)
find_package(Doxygen)

if(NOT DOXYGEN_FOUND)
message(STATUS "Doxygen is needed to build the documentation. Documentation example will not be built.")
return()
endif()

# Override the default doxygen output directory, which is CMAKE_CURRENT_BINARY_DIR.
set(DOXYGEN_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/docs")
Expand Down
8 changes: 7 additions & 1 deletion chapter06/ex02_doxplantuml/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ endif()
# Locate Doxygen in the environment. This will set DOXYGEN_FOUND variable
# as a result. When Doxygen is found, DOXYGEN_VERSION variable will be
# also set to found Doxygen version.
find_package(Doxygen REQUIRED)
find_package(Doxygen)

if(NOT DOXYGEN_FOUND)
message(STATUS "Doxygen is needed to build the documentation. Documentation example will not be built.")
return()
endif()


# Override the default doxygen output directory, which is CMAKE_CURRENT_BINARY_DIR.
set(DOXYGEN_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/docs")
Expand Down

0 comments on commit c23985d

Please sign in to comment.