Working on Github Actions
This commit is contained in:
parent
067c204a25
commit
c0f9f1413d
83
.github/workflows/build-and-test.yml
vendored
83
.github/workflows/build-and-test.yml
vendored
|
@ -26,7 +26,8 @@ jobs:
|
||||||
cxx: "g++",
|
cxx: "g++",
|
||||||
generators: "Ninja",
|
generators: "Ninja",
|
||||||
double_precision: false,
|
double_precision: false,
|
||||||
coverage: false
|
coverage: false,
|
||||||
|
memory_leaks_test: false
|
||||||
}
|
}
|
||||||
- {
|
- {
|
||||||
name: "Linux / GCC (Release, Single Precision)",
|
name: "Linux / GCC (Release, Single Precision)",
|
||||||
|
@ -36,7 +37,8 @@ jobs:
|
||||||
cxx: "g++",
|
cxx: "g++",
|
||||||
generators: "Ninja",
|
generators: "Ninja",
|
||||||
double_precision: false,
|
double_precision: false,
|
||||||
coverage: false
|
coverage: false,
|
||||||
|
memory_leaks_test: false
|
||||||
}
|
}
|
||||||
- {
|
- {
|
||||||
name: "Linux / GCC (Debug, Double Precision)",
|
name: "Linux / GCC (Debug, Double Precision)",
|
||||||
|
@ -46,7 +48,8 @@ jobs:
|
||||||
cxx: "g++",
|
cxx: "g++",
|
||||||
generators: "Ninja",
|
generators: "Ninja",
|
||||||
double_precision: true,
|
double_precision: true,
|
||||||
coverage: false
|
coverage: false,
|
||||||
|
memory_leaks_test: false
|
||||||
}
|
}
|
||||||
- {
|
- {
|
||||||
name: "Linux / GCC (Release, Double Precision)",
|
name: "Linux / GCC (Release, Double Precision)",
|
||||||
|
@ -56,7 +59,8 @@ jobs:
|
||||||
cxx: "g++",
|
cxx: "g++",
|
||||||
generators: "Ninja",
|
generators: "Ninja",
|
||||||
double_precision: true,
|
double_precision: true,
|
||||||
coverage: false
|
coverage: false,
|
||||||
|
memory_leaks_test: false
|
||||||
}
|
}
|
||||||
- {
|
- {
|
||||||
name: "Linux / Clang (Debug, Single Precision)",
|
name: "Linux / Clang (Debug, Single Precision)",
|
||||||
|
@ -66,7 +70,8 @@ jobs:
|
||||||
cxx: "clang++",
|
cxx: "clang++",
|
||||||
generators: "Ninja",
|
generators: "Ninja",
|
||||||
double_precision: false,
|
double_precision: false,
|
||||||
coverage: false
|
coverage: false,
|
||||||
|
memory_leaks_test: false
|
||||||
}
|
}
|
||||||
- {
|
- {
|
||||||
name: "Linux / Clang (Release, Single Precision)",
|
name: "Linux / Clang (Release, Single Precision)",
|
||||||
|
@ -76,7 +81,8 @@ jobs:
|
||||||
cxx: "clang++",
|
cxx: "clang++",
|
||||||
generators: "Ninja",
|
generators: "Ninja",
|
||||||
double_precision: false,
|
double_precision: false,
|
||||||
coverage: false
|
coverage: false,
|
||||||
|
memory_leaks_test: false
|
||||||
}
|
}
|
||||||
- {
|
- {
|
||||||
name: "Linux / Clang (Debug, Double Precision)",
|
name: "Linux / Clang (Debug, Double Precision)",
|
||||||
|
@ -86,7 +92,8 @@ jobs:
|
||||||
cxx: "clang++",
|
cxx: "clang++",
|
||||||
generators: "Ninja",
|
generators: "Ninja",
|
||||||
double_precision: true,
|
double_precision: true,
|
||||||
coverage: false
|
coverage: false,
|
||||||
|
memory_leaks_test: false
|
||||||
}
|
}
|
||||||
- {
|
- {
|
||||||
name: "Linux / Clang (Release, Double Precision)",
|
name: "Linux / Clang (Release, Double Precision)",
|
||||||
|
@ -96,7 +103,8 @@ jobs:
|
||||||
cxx: "clang++",
|
cxx: "clang++",
|
||||||
generators: "Ninja",
|
generators: "Ninja",
|
||||||
double_precision: true,
|
double_precision: true,
|
||||||
coverage: false
|
coverage: false,
|
||||||
|
memory_leaks_test: false
|
||||||
}
|
}
|
||||||
- {
|
- {
|
||||||
name: "Windows / MSVC (Debug, Single Precision)",
|
name: "Windows / MSVC (Debug, Single Precision)",
|
||||||
|
@ -106,7 +114,8 @@ jobs:
|
||||||
cxx: "cl",
|
cxx: "cl",
|
||||||
generators: "Visual Studio 16 2019",
|
generators: "Visual Studio 16 2019",
|
||||||
double_precision: false,
|
double_precision: false,
|
||||||
coverage: false
|
coverage: false,
|
||||||
|
memory_leaks_test: false
|
||||||
}
|
}
|
||||||
- {
|
- {
|
||||||
name: "Windows / MSVC (Release, Single Precision)",
|
name: "Windows / MSVC (Release, Single Precision)",
|
||||||
|
@ -116,7 +125,8 @@ jobs:
|
||||||
cxx: "cl",
|
cxx: "cl",
|
||||||
generators: "Visual Studio 16 2019",
|
generators: "Visual Studio 16 2019",
|
||||||
double_precision: false,
|
double_precision: false,
|
||||||
coverage: false
|
coverage: false,
|
||||||
|
memory_leaks_test: false
|
||||||
}
|
}
|
||||||
- {
|
- {
|
||||||
name: "Windows / MinGW (Debug, Single Precision)",
|
name: "Windows / MinGW (Debug, Single Precision)",
|
||||||
|
@ -126,7 +136,8 @@ jobs:
|
||||||
cxx: "g++",
|
cxx: "g++",
|
||||||
generators: "Ninja",
|
generators: "Ninja",
|
||||||
double_precision: false,
|
double_precision: false,
|
||||||
coverage: false
|
coverage: false,
|
||||||
|
memory_leaks_test: false
|
||||||
}
|
}
|
||||||
- {
|
- {
|
||||||
name: "Windows / MinGW (Release, Single Precision)",
|
name: "Windows / MinGW (Release, Single Precision)",
|
||||||
|
@ -136,7 +147,8 @@ jobs:
|
||||||
cxx: "g++",
|
cxx: "g++",
|
||||||
generators: "Ninja",
|
generators: "Ninja",
|
||||||
double_precision: false,
|
double_precision: false,
|
||||||
coverage: false
|
coverage: false,
|
||||||
|
memory_leaks_test: false
|
||||||
}
|
}
|
||||||
- {
|
- {
|
||||||
name: "MacOS / Clang (Debug, Single Precision)",
|
name: "MacOS / Clang (Debug, Single Precision)",
|
||||||
|
@ -146,7 +158,8 @@ jobs:
|
||||||
cxx: "clang++",
|
cxx: "clang++",
|
||||||
generators: "Ninja",
|
generators: "Ninja",
|
||||||
double_precision: false,
|
double_precision: false,
|
||||||
coverage: false
|
coverage: false,
|
||||||
|
memory_leaks_test: false
|
||||||
}
|
}
|
||||||
- {
|
- {
|
||||||
name: "MacOS / Clang (Release, Single Precision)",
|
name: "MacOS / Clang (Release, Single Precision)",
|
||||||
|
@ -156,7 +169,30 @@ jobs:
|
||||||
cxx: "clang++",
|
cxx: "clang++",
|
||||||
generators: "Ninja",
|
generators: "Ninja",
|
||||||
double_precision: false,
|
double_precision: false,
|
||||||
coverage: false
|
coverage: false,
|
||||||
|
memory_leaks_test: false
|
||||||
|
}
|
||||||
|
- {
|
||||||
|
name: "MacOS / GCC (Debug, Single Precision)",
|
||||||
|
os: macos-latest,
|
||||||
|
build_type: "Debug",
|
||||||
|
cc: "gcc",
|
||||||
|
cxx: "g++",
|
||||||
|
generators: "Ninja",
|
||||||
|
double_precision: false,
|
||||||
|
coverage: false,
|
||||||
|
memory_leaks_test: false
|
||||||
|
}
|
||||||
|
- {
|
||||||
|
name: "Memory Leaks Test - Linux / GCC (Debug, Single Precision)",
|
||||||
|
os: ubuntu-latest,
|
||||||
|
build_type: "Debug",
|
||||||
|
cc: "gcc",
|
||||||
|
cxx: "g++",
|
||||||
|
generators: "Ninja",
|
||||||
|
double_precision: false,
|
||||||
|
coverage: false,
|
||||||
|
memory_leaks_test: true
|
||||||
}
|
}
|
||||||
- {
|
- {
|
||||||
name: "Code Coverage",
|
name: "Code Coverage",
|
||||||
|
@ -166,7 +202,8 @@ jobs:
|
||||||
cxx: "g++",
|
cxx: "g++",
|
||||||
generators: "Ninja",
|
generators: "Ninja",
|
||||||
double_precision: false,
|
double_precision: false,
|
||||||
coverage: true
|
coverage: true,
|
||||||
|
memory_leaks_test: false
|
||||||
}
|
}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
@ -189,7 +226,7 @@ jobs:
|
||||||
if: startsWith(matrix.config.os, 'ubuntu')
|
if: startsWith(matrix.config.os, 'ubuntu')
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install ninja-build cmake lcov
|
sudo apt-get install ninja-build cmake lcov valgrind
|
||||||
ninja --version
|
ninja --version
|
||||||
cmake --version
|
cmake --version
|
||||||
gcc --version
|
gcc --version
|
||||||
|
@ -198,7 +235,8 @@ jobs:
|
||||||
- name: Install dependencies on MacOS
|
- name: Install dependencies on MacOS
|
||||||
if: startsWith(matrix.config.os, 'macos')
|
if: startsWith(matrix.config.os, 'macos')
|
||||||
run: |
|
run: |
|
||||||
brew install cmake ninja gcc
|
brew install cmake ninja
|
||||||
|
brew reinstall gcc
|
||||||
ninja --version
|
ninja --version
|
||||||
cmake --version
|
cmake --version
|
||||||
|
|
||||||
|
@ -233,13 +271,13 @@ jobs:
|
||||||
shell: bash
|
shell: bash
|
||||||
run: cmake --install build/
|
run: cmake --install build/
|
||||||
|
|
||||||
- name: Unit Tests (Linux / MacOS)
|
- name: Unit Tests (Linux / MacOS / Windows MinGW)
|
||||||
if: ${{ !startsWith(matrix.config.os, 'windows') }}
|
if: ${{ !startsWith(matrix.config.os, 'windows') }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: ./build/test/tests
|
run: ./build/test/tests
|
||||||
|
|
||||||
- name: Unit Tests (Wndows)
|
- name: Unit Tests (Wndows MSVC)
|
||||||
if: ${{ startsWith(matrix.config.os, 'windows') }}
|
if: ${{ startsWith(matrix.config.name, 'Windows / MSVC') }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: "./build/test/${{ matrix.config.build_type }}/tests.exe"
|
run: "./build/test/${{ matrix.config.build_type }}/tests.exe"
|
||||||
|
|
||||||
|
@ -260,6 +298,11 @@ jobs:
|
||||||
cmake --build build_hello_world/ --config ${{ matrix.config.build_type }}
|
cmake --build build_hello_world/ --config ${{ matrix.config.build_type }}
|
||||||
./build_hello_world/helloworld
|
./build_hello_world/helloworld
|
||||||
|
|
||||||
|
- name: Memory Leaks Test
|
||||||
|
if: ${{ matrix.config.memory_leaks_test }}
|
||||||
|
shell: bash
|
||||||
|
run: valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose --error-exitcode=1 ./build/test/tests
|
||||||
|
|
||||||
- name: Compute Code Coverage
|
- name: Compute Code Coverage
|
||||||
if: ${{ matrix.config.coverage }}
|
if: ${{ matrix.config.coverage }}
|
||||||
env:
|
env:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user