Skip to content

Commit

Permalink
Merge branch 'master' into override
Browse files Browse the repository at this point in the history
  • Loading branch information
thetic committed Nov 1, 2022
2 parents b29cd69 + a7eb835 commit 5a19e44
Show file tree
Hide file tree
Showing 48 changed files with 490 additions and 487 deletions.
62 changes: 18 additions & 44 deletions .github/workflows/basic.yml
Expand Up @@ -58,83 +58,57 @@ jobs:
# Windows
- os: windows-latest
cpp_version: 17
preset: MSVC
- os: windows-latest
cpp_version: 17
preset: ClangCL
# Linux
# CMake different C++ versions with clang
- os: ubuntu-latest
cpp_version: 98
cxx: clang++
cc: clang
preset: Clang
- os: ubuntu-latest
cpp_version: 11
cxx: clang++
cc: clang
preset: Clang
- os: ubuntu-latest
cpp_version: 14
cxx: clang++
cc: clang
preset: Clang
- os: ubuntu-latest
cpp_version: 17
cxx: clang++
cc: clang
preset: Clang
# CMake different C++ versions with gcc
- os: ubuntu-latest
cpp_version: 98
cxx: g++
cc: gcc
preset: GNU
- os: ubuntu-latest
cpp_version: 11
cxx: g++
cc: gcc
preset: GNU
- os: ubuntu-latest
cpp_version: 14
cxx: g++
cc: gcc
preset: GNU
- os: ubuntu-latest
cpp_version: 17
cxx: g++
cc: gcc
preset: GNU
# Mac OSX
- os: macos-latest
cpp_version: 98
preset: defaults
- os: macos-latest
cpp_version: 17
cxx: clang++
cc: clang
preset: Clang
- os: macos-latest
cpp_version: 14
cxx: g++
cc: gcc
preset: GNU
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@main
- if: ${{ matrix.cxx }}
run: echo "CXX=${{ matrix.cxx }}" >> $GITHUB_ENV
- if: ${{ matrix.cc }}
run: echo "CC=${{ matrix.cc }}" >> $GITHUB_ENV
- name: Configure
run: >
cmake
-B build
-S .
--preset ${{ matrix.preset }}
-D CMAKE_CXX_STANDARD=${{ matrix.cpp_version }}
- name: Build
run: cmake --build build --verbose
- name: Test
run: ctest --test-dir build

visualstudio-clangcl:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@main
- name: Configure
run: >
cmake
-B build
-G "Visual Studio 17 2022"
-T ClangCL
- name: Build
run: cmake --build build --verbose
run: cmake --build cpputest_build --verbose
- name: Test
run: ctest --test-dir build
run: ctest --test-dir cpputest_build
75 changes: 46 additions & 29 deletions .github/workflows/extended.yml
Expand Up @@ -31,14 +31,7 @@ jobs:
- name: Checkout
uses: actions/checkout@main
- name: Configure
run: >
cmake
-S .
-B cpputest_build
-D CMAKE_BUILD_TYPE=Debug
-D CMAKE_CXX_STANDARD=11
-D CPPUTEST_COVERAGE=ON
-D CPPUTEST_EXAMPLES=OFF
run: cmake --preset coverage
- name: Build
run: cmake --build cpputest_build
- name: Test
Expand Down Expand Up @@ -79,51 +72,51 @@ jobs:

cmake_wine:
runs-on: ubuntu-latest
env:
CC: x86_64-w64-mingw32-gcc
CXX: x86_64-w64-mingw32-g++
steps:
- name: Install tools
run: sudo apt-get install -y mingw-w64 wine64
- name: Checkout
uses: actions/checkout@main
- name: Configure
run: >
cmake
-B build
-S .
-D CMAKE_SYSTEM_NAME=Windows
-D CMAKE_CROSSCOMPILING_EMULATOR=wine
cmake --preset MinGW
- name: Build
run: cmake --build build --verbose
run: cmake --build cpputest_build --verbose
- name: Test
run: ctest --test-dir build
run: ctest --test-dir cpputest_build

cmake_no_exceptions:
cmake_no_std_cpp:
runs-on: ubuntu-latest
name: Disable exceptions
env:
CC: gcc
CXX: g++
CXXFLAGS: -fno-exceptions
steps:
- name: Checkout
uses: actions/checkout@main
- name: Configure
run: cmake -B cpputest_build -S .
run: cmake --preset no-std-cpp
- name: Build
run: cmake --build cpputest_build --verbose
- name: Test
run: ctest --test-dir cpputest_build

cmake_no_std_c:
runs-on: ubuntu-latest
name: Disable libc
steps:
- name: Checkout
uses: actions/checkout@main
- name: Configure
run: cmake --preset no-std-c
- name: Build
run: cmake --build cpputest_build --verbose

cmake_install:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@main
- name: Install
run: |
cmake -B cpputest_build/ -S . -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --preset GNU
cmake --build cpputest_build/ -j
ctest --test-dir cpputest_build/
sudo cmake --install cpputest_build/
Expand All @@ -145,13 +138,37 @@ jobs:
wget -nv http://ftp.de.debian.org/debian/pool/main/q/qemu/qemu-user-static_7.1+dfsg-2_amd64.deb -O qemu.deb
sudo dpkg --install qemu.deb
rm -f qemu.deb
- name: Configure
run: cmake --preset arm-embedded
- name: Build
run: cmake --build cpputest_build
- name: Test
run: ctest --test-dir cpputest_build

automake-no-long-long:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@main
- name: Configure
run: |
autoreconf -i .
./configure --disable-longlong
- name: Build and test
run: make tdd

cmake-no-long-long:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@main
- name: Configure
run: >
cmake
-B cpputest_build
-D CMAKE_TOOLCHAIN_FILE=cmake/arm-none-eabi-gcc.toolchain.cmake
-D CMAKE_CROSSCOMPILING_EMULATOR="qemu-arm-static;-cpu;cortex-m4"
-D CPPUTEST_USE_LONG_LONG=NO
-D CMAKE_CXX_COMPILER=clang++
- name: Build
run: cmake --build cpputest_build
run: cmake --build cpputest_build -j
- name: Test
run: ctest --test-dir cpputest_build
run: ctest --test-dir cpputest_build -j

0 comments on commit 5a19e44

Please sign in to comment.