Skip to content

Commit

Permalink
Fix ci (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
Huangzizhou authored Oct 13, 2024
1 parent 9500ff4 commit 0ba5eed
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 428 deletions.
12 changes: 0 additions & 12 deletions .github/FUNDING.yml

This file was deleted.

109 changes: 37 additions & 72 deletions .github/workflows/continuous.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
config: [DebugNoSymbols, Release]
config: [Release]
threading: [TBB]
include:
- os: ubuntu-latest
Expand All @@ -30,12 +30,14 @@ jobs:
- 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 libboost-all-dev
echo 'CACHE_PATH=~/.cache/ccache' >> "$GITHUB_ENV"
- name: Cache Build
Expand All @@ -52,7 +54,21 @@ jobs:
# ccache --max-size=1.0G
ccache -V && ccache --show-stats && ccache --zero-stats
- name: Configure
- 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
Expand All @@ -62,7 +78,7 @@ jobs:
-DCMAKE_CXX_FLAGS_DEBUGNOSYMBOLS="" \
-DPOLYFEM_THREADING=${{ matrix.threading }}
- name: Build
- name: Build-polyfem
run: cd build; make -j2; ccache --show-stats

- name: Tests
Expand All @@ -83,18 +99,19 @@ jobs:
fail-fast: false
matrix:
os: [macos-latest, macos-14]
config: [DebugNoSymbols, Release]
config: [Release]
threading: [TBB]

steps:
- name: Checkout repository
uses: actions/[email protected]
with:
submodules: true
fetch-depth: 10

- name: Dependencies
run: |
brew install ccache
brew install ccache boost
echo 'CACHE_PATH=~/Library/Caches/ccache' >> "$GITHUB_ENV"
- name: Cache Build
Expand All @@ -110,84 +127,32 @@ jobs:
ccache --max-size=1.0G
ccache -V && ccache --show-stats && ccache --zero-stats
- name: Configure
- 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="" \
-DPOLYFEM_THREADING=${{ matrix.threading }}
- name: Build
run: cd build; make -j2; ccache --show-stats

- name: Tests
run: cd build; ctest --verbose --output-on-failure

####################
# Windows
####################

Windows:
runs-on: windows-2022
env:
SCCACHE_IDLE_TIMEOUT: "12000"
strategy:
fail-fast: false
matrix:
config: [DebugNoSymbols]
threading: [CPP]
steps:
- name: Checkout repository
uses: actions/[email protected]
with:
fetch-depth: 10
-DLIBIGL_WITH_OPENGL=OFF
- name: Install Ninja
uses: seanmiddleditch/gha-setup-ninja@master
- name: Build-inflator
run: cd inflator/build; make -j2; ccache --show-stats

- name: Dependencies
run: |
choco install ccache
"CACHE_PATH=${env:LOCALAPPDATA}\ccache" | Out-File -FilePath $env:GITHUB_ENV -Append
- 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
- name: Configure-polyfem
run: |
ccache --max-size=1.0G
ccache -V && ccache --show-stats && ccache --zero-stats
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: Configure
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x64
cmake -G Ninja ^
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache ^
-DCMAKE_CONFIGURATION_TYPES="Release;Debug;RelWithDebInfo;MinSizeRel;DebugNoSymbols" ^
-DCMAKE_BUILD_TYPE=${{ matrix.config }} ^
-DCMAKE_CXX_FLAGS_DEBUGNOSYMBOLS="/Od" -DCMAKE_EXE_LINKER_FLAGS_DEBUGNOSYMBOLS="" ^
-DPOLYFEM_WITH_CLIPPER=OFF ^
-DPOLYFEM_THREADING=${{ matrix.threading }} ^
-DPOLYSOLVE_WITH_CHOLMOD=OFF ^
-DPOLYSOLVE_WITH_AMGCL=OFF ^
-DPOLYSOLVE_WITH_MKL=ON ^
-B build ^
-S .
- name: Build
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: Build-polyfem
run: cd build; make -j2; ccache --show-stats

- name: Tests
run: cd build; ctest --verbose --output-on-failure
84 changes: 0 additions & 84 deletions .github/workflows/coverage.yml

This file was deleted.

63 changes: 0 additions & 63 deletions .github/workflows/docs.yml

This file was deleted.

Loading

0 comments on commit 0ba5eed

Please sign in to comment.