Fix typo #594
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Basic builds | |
"on": | |
push: | |
pull_request: | |
jobs: | |
clang-format: | |
name: Clang Format | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@main | |
- uses: DoozyX/clang-format-lint-action@v0.14 | |
with: | |
clangFormatVersion: 14 | |
source: examples | |
codeql: | |
runs-on: ubuntu-20.04 | |
env: | |
CC: gcc-10 | |
CXX: g++-10 | |
name: "CodeQL" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@main | |
- name: CodeQL Initialization | |
uses: github/codeql-action/init@v2 | |
with: | |
languages: cpp | |
queries: +security-and-quality | |
- name: Build | |
run: | | |
mkdir _build && cd _build | |
cmake -DCMAKE_CXX_STANDARD=17 .. | |
make -j2 | |
- name: CodeQL Analysis | |
uses: github/codeql-action/analyze@v2 | |
autotools: | |
strategy: | |
matrix: | |
include: | |
- name: Mac GNU | |
os: macos-latest | |
cc: gcc | |
cxx: g++ | |
make_args: tdd | |
- name: Mac Clang | |
os: macos-latest | |
cc: clang | |
cxx: clang++ | |
make_args: tdd | |
- name: Linux GNU | |
os: ubuntu-latest | |
cc: gcc | |
cxx: g++ | |
make_args: tdd | |
- name: Linux Clang | |
os: ubuntu-latest | |
cc: clang | |
cxx: clang++ | |
make_args: tdd | |
- name: Disable long long | |
os: ubuntu-latest | |
configure_args: --disable-longlong | |
make_args: tdd | |
- name: Distribution | |
os: ubuntu-latest | |
make_args: dist dist-zip VERSION=latest | |
- name: Install | |
os: ubuntu-latest | |
make_args: DESTDIR=install_autotools install | |
runs-on: ${{ matrix.os }} | |
name: Autotools ${{ matrix.name }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@main | |
- run: brew install automake | |
if: ${{ startswith(matrix.os, 'macos') }} | |
- if: ${{ matrix.cxx }} | |
run: echo "CXX=${{ matrix.cxx }}" >> $GITHUB_ENV | |
- if: ${{ matrix.cc }} | |
run: echo "CC=${{ matrix.cc }}" >> $GITHUB_ENV | |
- name: Configure | |
run: | | |
autoreconf -i . | |
./configure ${{ matrix.configure_args }} | |
- name: Build and test | |
run: make ${{ matrix.make_args }} | |
cmake: | |
strategy: | |
matrix: | |
include: | |
- name: MSVC install | |
os: windows-latest | |
preset: MSVC | |
install: true | |
ctest_args: -C Debug | |
- name: MSVC 20 | |
os: windows-latest | |
cmake_args: -DCMAKE_CXX_STANDARD=20 | |
preset: MSVC | |
ctest_args: -C Debug | |
- name: ClangCL | |
os: windows-latest | |
cmake_args: -DCMAKE_CXX_STANDARD=17 | |
preset: ClangCL | |
ctest_args: -C Debug | |
- name: Clang-Tidy | |
os: ubuntu-latest | |
preset: clang-tidy | |
- name: Linux Clang 98 | |
os: ubuntu-latest | |
cmake_args: -DCMAKE_CXX_STANDARD=98 | |
preset: Clang | |
- name: Linux Clang 11 | |
os: ubuntu-latest | |
cmake_args: -DCMAKE_CXX_STANDARD=11 | |
preset: Clang | |
- name: Linux Clang 14 | |
os: ubuntu-latest | |
cmake_args: -DCMAKE_CXX_STANDARD=14 | |
preset: Clang | |
- name: Linux Clang 17 | |
os: ubuntu-latest | |
cmake_args: -DCMAKE_CXX_STANDARD=17 | |
preset: Clang | |
- name: Linux Clang 20 | |
os: ubuntu-latest | |
cmake_args: -DCMAKE_CXX_STANDARD=20 | |
preset: Clang | |
- name: Linux GNU 98 | |
os: ubuntu-latest | |
cmake_args: -DCMAKE_CXX_STANDARD=98 | |
preset: GNU | |
- name: No long long | |
os: ubuntu-latest | |
preset: no-long-long | |
- name: Detailed | |
os: ubuntu-latest | |
preset: detailed | |
- name: Linux GNU Install | |
os: ubuntu-latest | |
cmake_args: -DCMAKE_CXX_STANDARD=11 | |
preset: GNU | |
install: true | |
- name: Linux GNU 14 | |
os: ubuntu-latest | |
cmake_args: -DCMAKE_CXX_STANDARD=14 | |
preset: GNU | |
- name: Linux GNU 17 | |
os: ubuntu-latest | |
cmake_args: -DCMAKE_CXX_STANDARD=17 | |
preset: GNU | |
- name: Linux GNU 20 | |
os: ubuntu-latest | |
cmake_args: -DCMAKE_CXX_STANDARD=20 | |
preset: GNU | |
- name: GCC-10 | |
os: ubuntu-20.04 | |
cmake_args: > | |
-DCMAKE_C_COMPILER=gcc-10 | |
-DCMAKE_CXX_COMPILER=g++-10 | |
-DCMAKE_CXX_STANDARD=17 | |
preset: GNU | |
- name: Clang-11 | |
os: ubuntu-20.04 | |
cmake_args: > | |
-DCMAKE_C_COMPILER=clang-11 | |
-DCMAKE_CXX_COMPILER=clang++-11 | |
-DCMAKE_CXX_STANDARD=17 | |
preset: Clang | |
- name: MinGW | |
os: ubuntu-latest | |
preset: MinGW | |
apt_packages: mingw-w64 wine64 | |
- name: No C++ Standard Library | |
os: ubuntu-latest | |
preset: no-std-cpp | |
- name: No RTTI | |
os: ubuntu-latest | |
preset: no-rtti | |
- name: No Exceptions | |
os: ubuntu-latest | |
preset: no-exceptions | |
- name: No C Standard Library | |
os: ubuntu-latest | |
preset: no-std-c | |
- name: Coverage | |
os: ubuntu-latest | |
preset: coverage | |
apt_packages: lcov | |
- name: Address Sanitizer | |
os: ubuntu-latest | |
preset: asan | |
- name: GCC ARM embedded | |
os: ubuntu-latest | |
preset: arm-embedded | |
- name: Mac install | |
os: macos-latest | |
preset: defaults | |
install: true | |
- name: Apple Clang 14 | |
os: macos-latest | |
cmake_args: -DCMAKE_CXX_STANDARD=14 | |
preset: Clang | |
- name: Apple Clang 17 | |
os: macos-latest | |
cmake_args: -DCMAKE_CXX_STANDARD=17 | |
preset: Clang | |
- name: Apple Clang 20 | |
os: macos-latest | |
cmake_args: -DCMAKE_CXX_STANDARD=20 | |
preset: Clang | |
- name: Mac GNU 14 | |
os: macos-latest | |
cmake_args: -DCMAKE_CXX_STANDARD=14 | |
preset: GNU | |
- name: OpenWatcom DOS | |
os: ubuntu-latest | |
preset: DOS | |
apt_packages: dosbox | |
- name: Cygwin | |
os: windows-latest | |
preset: GNU | |
name: CMake ${{ matrix.name }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
### SETUP | |
- name: Install packages | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y ${{ matrix.apt_packages }} | |
if: ${{ matrix.apt_packages }} | |
- uses: carlosperate/arm-none-eabi-gcc-action@v1 | |
if: ${{ matrix.name == 'GCC ARM embedded' }} | |
- name: Install OpenWatcom | |
uses: open-watcom/setup-watcom@v0 | |
with: | |
version: "2.0" | |
if: ${{ matrix.name == 'OpenWatcom DOS' }} | |
- run: git config --global core.autocrlf input | |
if: ${{ matrix.name == 'Cygwin' }} | |
- name: Checkout | |
uses: actions/checkout@main | |
- name: Install Cygwin | |
uses: cygwin/cygwin-install-action@master | |
with: | |
platform: x86 | |
packages: > | |
cmake | |
gcc-core | |
gcc-g++ | |
make | |
if: ${{ matrix.name == 'Cygwin' }} | |
## BUILD AND TEST | |
- name: Configure | |
run: cmake --preset ${{ matrix.preset }} ${{ matrix.cmake_args }} | |
- name: Build | |
run: cmake --build cpputest_build --verbose -j | |
- name: Save map files | |
uses: actions/upload-artifact@v3 | |
with: | |
name: "${{ matrix.name }} map files" | |
path: cpputest_build/**/*.map | |
- name: Test | |
run: > | |
ctest | |
--test-dir cpputest_build | |
${{ matrix.ctest_args }} | |
--output-on-failure | |
# POST PROCESSING | |
- name: Install (*nix) | |
run: | | |
sudo cmake --install cpputest_build/ | |
pkg-config --print-provides cpputest | |
if: ${{ matrix.install && !startswith(matrix.os, 'windows')}} | |
- name: Install (Windows) | |
run: cmake --install cpputest_build/ --config=Debug | |
if: ${{ matrix.install && startswith(matrix.os, 'windows')}} | |
- name: Use install | |
run: | | |
cmake -B build -S examples | |
cmake --build build -j | |
ctest --test-dir build | |
if: ${{ matrix.install }} | |
- name: Coverage | |
run: | | |
lcov --capture --directory . --no-external --output-file lcov.info | |
lcov --remove lcov.info --output-file lcov.info '*/tests/*' | |
if: ${{ matrix.name == 'Coverage' }} | |
- name: Coveralls | |
uses: coverallsapp/github-action@master | |
with: | |
path-to-lcov: lcov.info | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
if: ${{ matrix.name == 'Coverage' }} | |
test_report: | |
name: JUnit Test Report | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@main | |
- run: cmake --preset=defaults -DCPPUTEST_JUNIT_REPORT=TRUE | |
- run: cmake --build cpputest_build -j | |
- run: ctest --test-dir cpputest_build | |
- uses: actions/upload-artifact@v3 | |
if: success() || failure() | |
with: | |
name: test-results | |
path: "cpputest_build/**/cpputest_*.xml" | |
make: | |
strategy: | |
matrix: | |
include: | |
- name: Defaults | |
make_target: test_defaults | |
- name: STDC++ disabled | |
make_target: test_disable_std_cpp | |
- name: Memory Leak Detection disabled | |
make_target: test_disable_memory_leak_detection | |
- name: Disable Leak Detection and STD C++ | |
make_target: test_disable_std_cpp_and_leak_detection | |
- name: debug disabled | |
make_target: test_disable_debug | |
- name: overridden CXXFLAGS and CFLAGS and CPPFLAGS | |
make_target: test_override_flags | |
- name: without Standard C library includes | |
make_target: test_disable_std_c | |
- name: different TARGET_PLATFORM | |
make_target: test_target_platform | |
- name: override flags and disable memory leak and STDC++ | |
make_target: test_override_and_disable | |
- name: Examples | |
make_target: test_examples | |
- name: JUnit Output | |
make_target: test_junit_output | |
# - name: gcov | |
# make_target: test_gcov | |
- name: VPATH usage | |
make_target: test_vpath | |
- name: VPATH Install | |
make_target: test_vpath_install | |
name: Make ${{ matrix.name }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@main | |
- name: Build | |
run: make -f Makefile_using_MakefileWorker ${{ matrix.make_target }} | |
make_dos: | |
name: Make OpenWatcom DOS | |
runs-on: ubuntu-latest | |
env: | |
WATCOM: "./watcom" | |
TERM: linux | |
steps: | |
- name: Checkout | |
uses: actions/checkout@main | |
- name: Install tools | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y dosbox | |
git clone https://github.com/cpputest/watcom-compiler.git $WATCOM | |
echo "$WATCOM/binl" >> $GITHUB_PATH | |
- name: Build | |
run: make -f platforms/Dos/Makefile | |
- name: Test | |
run: make -f platforms/Dos/Makefile test | |
cmake_msys: | |
name: CMake MSYS | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: msys2 {0} | |
env: | |
LDFLAGS: -static | |
steps: | |
- name: Checkout | |
uses: actions/checkout@main | |
- uses: msys2/setup-msys2@v2 | |
with: | |
msystem: MINGW64 | |
update: true | |
install: > | |
git | |
mingw-w64-x86_64-cc | |
mingw-w64-x86_64-cmake | |
mingw-w64-x86_64-make | |
- name: Configure | |
run: cmake --preset=GNU | |
- name: Build | |
run: cmake --build cpputest_build -j | |
- name: Test | |
run: ctest --test-dir cpputest_build --output-on-failure | |
autotools_msys: | |
name: Autotools MSYS | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: msys2 {0} | |
env: | |
LDFLAGS: -static | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: msys2/setup-msys2@v2 | |
with: | |
msystem: MINGW64 | |
update: true | |
install: > | |
git | |
mingw-w64-x86_64-autotools | |
mingw-w64-x86_64-cc | |
mingw-w64-x86_64-make | |
- name: Configure | |
run: | | |
autoreconf -i . | |
./configure | |
- name: Build and test | |
run: make tdd | |
Docker: | |
strategy: | |
matrix: | |
image: ["ubuntu", "dos"] | |
runs-on: ubuntu-latest | |
name: Docker ${{ matrix.image }} | |
steps: | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
env: | |
TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | |
if: ${{ env.TOKEN != '' }} | |
- name: Build | |
uses: docker/build-push-action@v3 | |
with: | |
file: docker/Dockerfile.${{ matrix.image }} | |
tags: cpputest/${{ matrix.image }} |