Add malloc compliance tests #399
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: GitHubActions | |
on: [push, pull_request] | |
jobs: | |
ubuntu-build: | |
name: Build - Ubuntu | |
strategy: | |
matrix: | |
os: ['ubuntu-20.04', 'ubuntu-22.04'] | |
build_type: [Debug, Release] | |
compiler: [{c: gcc, cxx: g++}] | |
pool_tracking: ['-DUMF_ENABLE_POOL_TRACKING=ON', '-DUMF_ENABLE_POOL_TRACKING=OFF'] | |
include: | |
- os: 'ubuntu-20.04' | |
build_type: Release | |
compiler: {c: gcc-7, cxx: g++-7} | |
- os: 'ubuntu-22.04' | |
build_type: Release | |
compiler: {c: clang, cxx: clang++} | |
runs-on: ${{matrix.os}} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install apt packages | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y clang cmake libnuma-dev | |
- name: Install g++-7 | |
if: matrix.compiler.cxx == 'g++-7' | |
run: | | |
sudo apt-get install -y ${{matrix.compiler.cxx}} | |
- name: Configure build | |
run: > | |
cmake | |
-B ${{github.workspace}}/build | |
-DCMAKE_BUILD_TYPE=${{matrix.build_type}} | |
-DCMAKE_C_COMPILER=${{matrix.compiler.c}} | |
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}} | |
-DUMF_FORMAT_CODE_STYLE=OFF | |
-DUMF_DEVELOPER_MODE=ON | |
${{matrix.pool_tracking}} | |
- name: Build UMF | |
run: | | |
cmake --build ${{github.workspace}}/build -j $(nproc) | |
- name: Run tests | |
working-directory: ${{github.workspace}}/build | |
run: | | |
ctest --output-on-failure | |
windows-build: | |
name: Build - Windows | |
strategy: | |
matrix: | |
os: ['windows-2019', 'windows-2022'] | |
build_type: [Debug, Release] | |
compiler: [{c: cl, cxx: cl}] | |
pool_tracking: ['-DUMF_ENABLE_POOL_TRACKING=ON', '-DUMF_ENABLE_POOL_TRACKING=OFF'] | |
include: | |
- os: 'windows-2022' | |
build_type: Release | |
compiler: {c: clang-cl, cxx: clang-cl} | |
pool_tracking: -DUMF_ENABLE_POOL_TRACKING=ON | |
toolset: "-T ClangCL" | |
runs-on: ${{matrix.os}} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Configure build | |
run: > | |
cmake | |
-B ${{github.workspace}}/build | |
${{matrix.toolset}} | |
-DCMAKE_C_COMPILER=${{matrix.compiler.c}} | |
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}} | |
-DUMF_FORMAT_CODE_STYLE=OFF | |
-DUMF_DEVELOPER_MODE=ON | |
${{matrix.pool_tracking}} | |
- name: Build UMF | |
run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}} -j $Env:NUMBER_OF_PROCESSORS | |
- name: Test | |
working-directory: ${{github.workspace}}/build | |
run: ctest -C ${{matrix.build_type}} --output-on-failure | |
macos-build: | |
name: Build - MacOS | |
strategy: | |
matrix: | |
os: ['macos-12', 'macos-13'] | |
runs-on: ${{matrix.os}} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Python requirements | |
run: python3 -m pip install -r third_party/requirements.txt | |
- name: Configure build | |
run: > | |
cmake | |
-B ${{github.workspace}}/build | |
-DCMAKE_BUILD_TYPE=Release | |
-DUMF_FORMAT_CODE_STYLE=ON | |
-DUMF_DEVELOPER_MODE=ON | |
-DUMF_ENABLE_POOL_TRACKING=ON | |
- name: Run code-style check | |
run: | | |
cmake --build ${{github.workspace}}/build --target clang-format-check | |
- name: Build UMF | |
run: | | |
cmake --build ${{github.workspace}}/build -j $(sysctl -n hw.logicalcpu) |