Update memstats.cc #39
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: Testing scenarios | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable. | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
build_type: [Release] | |
toolchain: [gnu, llvm, msvc] | |
cxx_standard: [17, 20, 23, 26] | |
include: | |
- os: windows-latest | |
toolchain: msvc | |
c_compiler: cl | |
cpp_compiler: cl | |
shell: powershell | |
- os: windows-latest | |
toolchain: gnu | |
shell: 'msys2 {0}' | |
c_compiler: gcc | |
cpp_compiler: c++ | |
- os: windows-latest | |
toolchain: llvm | |
shell: 'msys2 {0}' | |
c_compiler: clang | |
cpp_compiler: clang++ | |
- os: ubuntu-latest | |
toolchain: gnu | |
c_compiler: gcc | |
cpp_compiler: g++ | |
shell: bash | |
- os: ubuntu-latest | |
toolchain: llvm | |
c_compiler: clang | |
cpp_compiler: clang++ | |
shell: bash | |
- os: macos-latest | |
toolchain: llvm | |
c_compiler: clang | |
cpp_compiler: clang++ | |
shell: bash | |
exclude: | |
- os: ubuntu-latest | |
toolchain: msvc | |
- os: macos-latest | |
toolchain: gnu | |
- os: macos-latest | |
toolchain: msvc | |
defaults: | |
run: | |
shell: ${{ matrix.shell }} | |
steps: | |
- name: Setup msys2 | |
if: ${{ matrix.os == 'windows-latest' && ( matrix.toolchain == 'gnu' || matrix.toolchain == 'llvm' ) }} | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: UCRT64 | |
update: true | |
install: mingw-w64-ucrt-x86_64-${{ matrix.c_compiler }} mingw-w64-ucrt-x86_64-cmake make git mingw-w64-ucrt-x86_64-git-lfs dos2unix | |
- name: Setup XCode | |
if: ${{ matrix.os == 'macos-latest' }} | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: latest-stable | |
- uses: actions/checkout@v4 | |
- uses: ashutoshvarma/[email protected] | |
- name: Setup Ninja | |
if: ${{ ! matrix.toolchain == 'mvsc' }} | |
run: | | |
echo "CMAKE_GENERATOR=Ninja" >> $GITHUB_ENV | |
- name: Configure CMake | |
run: > | |
cmake -B build | |
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} | |
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }} | |
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | |
-DCMAKE_CXX_STANDARD=${{ matrix.cxx_standard }} | |
-S . | |
- name: Build | |
run: cmake --build build --config ${{ matrix.build_type }} | |
- name: Run Test | |
run: | | |
cd build | |
ctest --output-on-failure -C ${{ matrix.build_type }} |