try to fix ci #23
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: Build | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
env: | |
CTEST_OUTPUT_ON_FAILURE: ON | |
CTEST_PARALLEL_LEVEL: 1 | |
jobs: | |
#################### | |
# Linux | |
#################### | |
Linux: | |
name: ${{ matrix.name }} (${{ matrix.config }}, ${{ matrix.threading }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
config: [Release] | |
threading: [TBB] | |
include: | |
- os: ubuntu-latest | |
name: Linux | |
steps: | |
- name: Checkout repository | |
uses: actions/[email protected] | |
with: | |
submodules: true | |
fetch-depth: 10 | |
- name: Dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get -o Acquire::Retries=3 install ccache | |
sudo apt-get install libmpfr-dev libmpfr-doc | |
echo 'CACHE_PATH=~/.cache/ccache' >> "$GITHUB_ENV" | |
- name: Cache Build | |
id: cache-build | |
uses: actions/[email protected] | |
if: matrix.config == 'Release' # debug cache is not working | |
with: | |
path: ${{ env.CACHE_PATH }} | |
key: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.threading }}-cache-${{ github.sha }} | |
restore-keys: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.threading }}-cache | |
- name: Prepare ccache | |
run: | | |
# ccache --max-size=1.0G | |
ccache -V && ccache --show-stats && ccache --zero-stats | |
- name: Configure-inflator | |
run: | | |
cd inflator | |
mkdir -p build | |
cd build | |
cmake .. \ | |
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.config }} \ | |
-DCMAKE_CXX_FLAGS_DEBUGNOSYMBOLS="" \ | |
-DLIBIGL_WITH_OPENGL=OFF | |
- name: Build-inflator | |
run: cd inflator/build; make -j2; ccache --show-stats | |
- name: Configure-polyfem | |
run: | | |
mkdir -p build | |
cd build | |
cmake .. \ | |
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.config }} \ | |
-DCMAKE_CXX_FLAGS_DEBUGNOSYMBOLS="" \ | |
-DPOLYFEM_THREADING=${{ matrix.threading }} | |
- name: Build-polyfem | |
run: cd build; make -j2; ccache --show-stats | |
- name: Tests | |
run: cd build; OMP_NUM_THREADS=1 ctest --verbose --output-on-failure | |
# - name: Setup tmate session | |
# if: ${{ failure() }} | |
# uses: mxschmitt/action-tmate@v3 | |
#################### | |
# MacOS | |
#################### | |
MacOS: | |
name: ${{ matrix.os }} (${{ matrix.config }}, ${{ matrix.threading }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest, macos-14] | |
config: [Release] | |
threading: [TBB] | |
steps: | |
- name: Checkout repository | |
uses: actions/[email protected] | |
with: | |
submodules: true | |
fetch-depth: 10 | |
- name: Dependencies | |
run: | | |
brew install ccache | |
echo 'CACHE_PATH=~/Library/Caches/ccache' >> "$GITHUB_ENV" | |
- name: Cache Build | |
id: cache-build | |
uses: actions/[email protected] | |
with: | |
path: ${{ env.CACHE_PATH }} | |
key: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.threading }}-cache-${{ github.sha }} | |
restore-keys: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.threading }}-cache | |
- name: Prepare ccache | |
run: | | |
ccache --max-size=1.0G | |
ccache -V && ccache --show-stats && ccache --zero-stats | |
- name: Configure-inflator | |
run: | | |
cd inflator | |
mkdir -p build | |
cd build | |
cmake .. \ | |
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.config }} \ | |
-DCMAKE_CXX_FLAGS_DEBUGNOSYMBOLS="" | |
- name: Build-inflator | |
run: cd inflator/build; make -j2; ccache --show-stats | |
- name: Configure-polyfem | |
run: | | |
mkdir -p build | |
cd build | |
cmake .. \ | |
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.config }} \ | |
-DCMAKE_CXX_FLAGS_DEBUGNOSYMBOLS="" \ | |
-DPOLYFEM_THREADING=${{ matrix.threading }} | |
- name: Build-polyfem | |
run: cd build; make -j2; ccache --show-stats | |
- name: Tests | |
run: cd build; ctest --verbose --output-on-failure |