Skip to content

Fix Windows CI: Split interactions.cpp to avoid compiler heap exhaustion #39

Fix Windows CI: Split interactions.cpp to avoid compiler heap exhaustion

Fix Windows CI: Split interactions.cpp to avoid compiler heap exhaustion #39

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
build_type: [Debug, Release]
include:
# ARM64 Linux builds
- os: ubuntu-24.04-arm
build_type: Debug
- os: ubuntu-24.04-arm
build_type: Release
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} (${{ matrix.build_type }})
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache FetchContent dependencies
uses: actions/cache@v4
with:
path: build/_deps
key: deps-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('CMakeLists.txt') }}
restore-keys: |
deps-${{ runner.os }}-${{ runner.arch }}-
- name: Configure (Unix)
if: runner.os != 'Windows'
run: >
cmake -B build -S .
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DFASTMCPP_BUILD_TESTS=ON
-DFASTMCPP_BUILD_EXAMPLES=ON
- name: Configure (Windows)
if: runner.os == 'Windows'
run: >
cmake -B build -S .
-G "Visual Studio 17 2022" -A x64
-DFASTMCPP_BUILD_TESTS=ON
-DFASTMCPP_BUILD_EXAMPLES=ON
- name: Build (Unix)
if: runner.os != 'Windows'
run: cmake --build build --config ${{ matrix.build_type }} --parallel
- name: Build (Windows)
if: runner.os == 'Windows'
# Reduce parallelism to avoid C1060 "compiler out of heap space" on GitHub's 16GB Windows runners
# /m:4 limits MSBuild workers, /p:CL_MPCount=1 disables cl.exe's /MP flag
run: cmake --build build --config ${{ matrix.build_type }} -- /m:4 /p:CL_MPCount=1
- name: Test
run: ctest --test-dir build -C ${{ matrix.build_type }} --output-on-failure