Increase tolerance #578
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: Build | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
paths: | |
- '.github/workflows/continuous.yml' | |
- 'cmake/**' | |
- 'src/**' | |
- 'tests/**' | |
- 'CMakeLists.txt' | |
env: | |
CTEST_OUTPUT_ON_FAILURE: ON | |
CTEST_PARALLEL_LEVEL: 2 | |
jobs: | |
Build: | |
name: ${{ matrix.name }} (${{ matrix.config }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
config: [Debug, Release] | |
include: | |
- os: macos-latest | |
name: macOS | |
- os: ubuntu-latest | |
name: Linux | |
- os: windows-latest | |
name: Windows | |
steps: | |
- name: Checkout repository | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 10 | |
- name: Dependencies (Linux) | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get install ccache | |
echo 'CACHE_PATH=~/.cache/ccache' >> "$GITHUB_ENV" | |
- name: Dependencies (macOS) | |
if: runner.os == 'macOS' | |
run: | | |
brew install ccache | |
echo 'CACHE_PATH=~/Library/Caches/ccache' >> "$GITHUB_ENV" | |
- name: Dependencies (Windows) | |
if: runner.os == 'Windows' | |
run: | | |
choco install ccache | |
"CACHE_PATH=${env:LOCALAPPDATA}\ccache" | Out-File -FilePath $env:GITHUB_ENV -Append | |
# Install Ninja (only needed on Windows) | |
- name: Install Ninja | |
if: runner.os == 'Windows' | |
uses: seanmiddleditch/gha-setup-ninja@master | |
- name: Cache Build | |
id: cache-build | |
uses: actions/[email protected] | |
with: | |
path: ${{ env.CACHE_PATH }} | |
key: ${{ runner.os }}-${{ matrix.config }}-cache | |
- name: Prepare ccache | |
run: | | |
ccache --max-size=1.0G | |
ccache -V && ccache --show-config | |
ccache --show-stats && ccache --zero-stats | |
- name: Configure (Linux/macOS) | |
if: runner.os != 'Windows' | |
run: | | |
mkdir -p build | |
cd build | |
cmake .. \ | |
-DIPC_TOOLKIT_BUILD_TESTS=ON \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.config }} | |
- name: Configure (Windows) | |
if: runner.os == 'Windows' | |
shell: cmd | |
run: | | |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x64 | |
cmake -G Ninja ^ | |
-DIPC_TOOLKIT_BUILD_TESTS=ON ^ | |
-DCMAKE_BUILD_TYPE=${{ matrix.config }} ^ | |
-B build ^ | |
-S . | |
- name: Build (Linux/macOS) | |
if: runner.os != 'Windows' | |
run: cd build; make -j2; ccache --show-stats | |
- name: Build (Windows) | |
if: runner.os == 'Windows' | |
shell: cmd | |
run: | | |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x64 | |
cmake --build build -j2 && ccache --show-stats | |
- name: Tests | |
run: cd build; ctest --verbose -j2 |