Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CI matrix #76

Merged
merged 1 commit into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: |
mkdir -p $GITHUB_WORKSPACE/tmp/termcolor && cd "$_"
cmake $GITHUB_WORKSPACE
Expand All @@ -26,18 +26,18 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: sudo pip install cmake
- run: |
mkdir -p $GITHUB_WORKSPACE/tmp/example && cd "$_"
/usr/local/bin/cmake $GITHUB_WORKSPACE/examples/cmake-fetch
cmake $GITHUB_WORKSPACE/examples/cmake-fetch
make && ./example

submodule:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: |
mkdir -p $GITHUB_WORKSPACE/tmp/example && cd "$_"
cmake $GITHUB_WORKSPACE/examples/cmake-submodule
Expand All @@ -47,7 +47,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: |
mkdir -p $GITHUB_WORKSPACE/tmp/example && cd "$_"
cmake $GITHUB_WORKSPACE/examples/cmake-external
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,23 @@ on:
pull_request:
branches: [master]

jobs:
jobs:
MacOS:
runs-on: macos-latest
strategy:
matrix:
compiler:
- Xcode_10.3
- Xcode_11.7
- Xcode_12.4
- Xcode_15.4
- Xcode_15.3
- Xcode_15.2
- Xcode_15.1
- Xcode_14.3.1

env:
CXXFLAGS: -std=c++11

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: sudo xcode-select -s /Applications/${{ matrix.compiler }}.app/Contents/Developer
- run: cmake -DTERMCOLOR_TESTS=ON .
- run: cmake --build .
Expand Down
46 changes: 33 additions & 13 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,44 @@ on:

jobs:
Ubuntu-Clang:
runs-on: ubuntu-latest
strategy:
matrix:
clang-compiler:
- "6.0"
- "7"
- "8"
- "9"
- "10"
- "11"
include:
- clang-compiler: "6.0"
ubuntu-release: ubuntu-20.04
- clang-compiler: "7"
ubuntu-release: ubuntu-20.04
- clang-compiler: "8"
ubuntu-release: ubuntu-20.04
- clang-compiler: "9"
ubuntu-release: ubuntu-20.04
- clang-compiler: "10"
ubuntu-release: ubuntu-20.04
- clang-compiler: "11"
ubuntu-release: ubuntu-22.04
- clang-compiler: "12"
ubuntu-release: ubuntu-22.04
- clang-compiler: "13"
ubuntu-release: ubuntu-22.04
- clang-compiler: "14"
ubuntu-release: ubuntu-22.04
- clang-compiler: "15"
ubuntu-release: ubuntu-22.04
- clang-compiler: "16"
ubuntu-release: ubuntu-24.04
- clang-compiler: "17"
ubuntu-release: ubuntu-24.04
- clang-compiler: "18"
ubuntu-release: ubuntu-24.04

env:
CXX: clang++-${{ matrix.clang-compiler }}
CXXFLAGS: -std=c++11

runs-on: ${{ matrix.ubuntu-release }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: sudo apt update
- run: sudo apt -y install clang-${{ matrix.clang-compiler }}
- run: cmake -DTERMCOLOR_TESTS=ON .
Expand All @@ -36,17 +57,16 @@ jobs:
strategy:
matrix:
gcc-compiler:
- "7"
- "8"
- "9"
- "10"
- "11"
- "12"

env:
CXX: g++-${{ matrix.gcc-compiler }}
CXXFLAGS: -std=c++11

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: sudo apt update
- run: sudo apt -y install g++-${{ matrix.gcc-compiler }}
- run: cmake -DTERMCOLOR_TESTS=ON .
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: cmake -DTERMCOLOR_TESTS=ON .
- run: cmake --build .
- run: ./Debug/test_termcolor.exe
Expand All @@ -20,7 +20,7 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: cmake -DCMAKE_SH="CMAKE_SH-NOTFOUND" -DTERMCOLOR_TESTS=ON -G "MinGW Makefiles" .
- run: cmake --build .
- run: ./test_termcolor
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.5)
project(termcolor)

#
Expand Down
4 changes: 2 additions & 2 deletions examples/cmake-external/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.5)
project(example)

include(ExternalProject)

ExternalProject_Add(termcolor_project
GIT_REPOSITORY git://github.com/ikalnytskyi/termcolor.git
GIT_REPOSITORY https://github.com/ikalnytskyi/termcolor.git
GIT_TAG origin/master

# Termcolor is a header-only library which means we need to
Expand Down
11 changes: 3 additions & 8 deletions examples/cmake-fetch/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
cmake_minimum_required(VERSION 3.11)
cmake_minimum_required(VERSION 3.14)
project(example)

include(FetchContent)

FetchContent_Declare(termcolor
GIT_REPOSITORY git://github.com/ikalnytskyi/termcolor.git
GIT_REPOSITORY https://github.com/ikalnytskyi/termcolor.git
GIT_TAG origin/master)
FetchContent_GetProperties(termcolor)

if(NOT termcolor_POPULATED)
FetchContent_Populate(termcolor)
add_subdirectory(${termcolor_SOURCE_DIR} ${termcolor_BINARY_DIR} EXCLUDE_FROM_ALL)
endif()
FetchContent_MakeAvailable(termcolor)

add_executable(${CMAKE_PROJECT_NAME} example.cpp)
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE termcolor)
2 changes: 1 addition & 1 deletion examples/cmake-package/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.5)
project(example)

find_package(termcolor REQUIRED)
Expand Down
2 changes: 1 addition & 1 deletion examples/cmake-submodule/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.5)
project(example)

add_subdirectory(../.. ${CMAKE_CURRENT_BINARY_DIR}/termcolor EXCLUDE_FROM_ALL)
Expand Down