From 0ba5eedc74962cb2bf0c04f40aa4a6afbd773312 Mon Sep 17 00:00:00 2001 From: zizhou Date: Sat, 12 Oct 2024 20:21:23 -0400 Subject: [PATCH] Fix ci (#1) --- .github/FUNDING.yml | 12 -- .github/workflows/continuous.yml | 109 ++++++----------- .github/workflows/coverage.yml | 84 ------------- .github/workflows/docs.yml | 63 ---------- .github/workflows/nightly.yml | 196 ------------------------------- inflator | 2 +- 6 files changed, 38 insertions(+), 428 deletions(-) delete mode 100644 .github/FUNDING.yml delete mode 100644 .github/workflows/coverage.yml delete mode 100644 .github/workflows/docs.yml delete mode 100644 .github/workflows/nightly.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 57fac0e62..000000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [teseoch] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/.github/workflows/continuous.yml b/.github/workflows/continuous.yml index f59ae7879..4436073e8 100644 --- a/.github/workflows/continuous.yml +++ b/.github/workflows/continuous.yml @@ -21,7 +21,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - config: [DebugNoSymbols, Release] + config: [Release] threading: [TBB] include: - os: ubuntu-latest @@ -30,12 +30,14 @@ jobs: - name: Checkout repository uses: actions/checkout@v4.1.6 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 @@ -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 @@ -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 @@ -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/checkout@v4.1.6 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 @@ -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/checkout@v4.1.6 - 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/cache@v4.0.2 - 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 diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml deleted file mode 100644 index 9a74112dd..000000000 --- a/.github/workflows/coverage.yml +++ /dev/null @@ -1,84 +0,0 @@ -name: Coverage - -on: - push: - branches: [main] - pull_request: - -env: - CTEST_OUTPUT_ON_FAILURE: ON - CTEST_PARALLEL_LEVEL: 2 - -jobs: - Linux: - name: ${{ matrix.name }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest] - threading: [TBB] - include: - - os: ubuntu-latest - name: Linux - steps: - - name: Checkout repository - uses: actions/checkout@v4.1.6 - with: - fetch-depth: 10 - - - name: Dependencies - run: | - sudo apt-get update - sudo apt-get -o Acquire::Retries=3 install \ - libblas-dev \ - libglu1-mesa-dev \ - xorg-dev \ - lcov \ - ccache - echo 'CACHE_PATH=~/.cache/ccache' >> "$GITHUB_ENV" - - - name: Cache Build - id: cache-build - uses: actions/cache@v4.0.2 - with: - path: ${{ env.CACHE_PATH }} - key: ${{ runner.os }}-Release-${{ matrix.threading }}-cache-${{ github.sha }} - restore-keys: ${{ runner.os }}-Release-${{ matrix.threading }}-cache - - - name: Prepare ccache - run: | - ccache --max-size=1.0G - ccache -V && ccache --show-stats && ccache --zero-stats - - - name: Configure - run: | - mkdir -p build - cd build - cmake .. \ - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_CXX_FLAGS_DEBUGNOSYMBOLS="" \ - -DPOLYFEM_CODE_COVERAGE=ON \ - -DPOLYFEM_THREADING=${{ matrix.threading }} - - - name: Build - run: cd build; make -j2; ccache --show-stats - - - name: Run Coverage - run: | - cd build - ctest --verbose --output-on-failure - lcov --directory . --capture --output-file coverage.info - lcov --remove coverage.info '/usr/*' "${HOME}"'/.cache/*' '*tests/*.cpp*' '*/polyfem/problem/*.cpp*' '*/polyfem/problem/*.hpp*' --output-file coverage.info - - - name: Upload Coverage - uses: codecov/codecov-action@v4 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - with: - flags: polyfem # optional - files: coverage.info - name: polyfem # optional - fail_ci_if_error: false # optional (default = false) - verbose: true # optional (default = false) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml deleted file mode 100644 index 56244b8b7..000000000 --- a/.github/workflows/docs.yml +++ /dev/null @@ -1,63 +0,0 @@ -name: Docs - -on: - push: - branches: - - main - - docs - -permissions: - contents: write - -jobs: - docs: - runs-on: ubuntu-latest - steps: - - name: Checkout Repository - uses: actions/checkout@v2.5.0 - - - name: Install Dependencies - run: | - wget "https://github.com/doxygen/doxygen/releases/download/Release_1_9_8/doxygen-1.9.8.linux.bin.tar.gz" - tar -xzf "doxygen-1.9.8.linux.bin.tar.gz" - cd "doxygen-1.9.8" - sudo make install - sudo apt-get install graphviz - - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - - name: Generate Doxygen Documentation - run: doxygen Doxyfile - - - name: Launch JSON Spec Documentation Runner - uses: actions/github-script@v6 - with: - github-token: ${{ secrets.PAT_TOKEN }} - script: | - await github.rest.actions.createWorkflowDispatch({ - owner: 'polyfem', - repo: 'polyfem.github.io', - workflow_id: 'build.yml', - ref: 'docs' - }) - - - name: Create .nojekyll - run: touch docs/html/.nojekyll - - - name: Deploy to GitHub Pages - uses: JamesIves/github-pages-deploy-action@v4.3.3 - with: - branch: gh-pages - folder: docs/html - - # - uses: DenverCoder1/doxygen-github-pages-action@v1.1.0 - # with: - # github_token: ${{ secrets.GITHUB_TOKEN }} - # branch: gh-pages - # folder: docs/html - # config_file: Doxyfile - - diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml deleted file mode 100644 index ffffb25d6..000000000 --- a/.github/workflows/nightly.yml +++ /dev/null @@ -1,196 +0,0 @@ -name: Nightly - -on: - push: - branches: [main] - schedule: - - cron: "0 4 * * *" - -env: - CTEST_OUTPUT_ON_FAILURE: ON - CTEST_PARALLEL_LEVEL: 2 - -jobs: - #################### - # Linux - #################### - - Linux: - name: ${{ matrix.name }} (${{ matrix.config }}, ${{ matrix.threading }}) - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest] - config: [DebugNoSymbols, Release] - threading: [CPP, TBB, NONE] - include: - - os: ubuntu-latest - name: Linux - steps: - - name: Checkout repository - uses: actions/checkout@v4.1.6 - with: - fetch-depth: 10 - - - name: Dependencies - run: | - sudo apt-get update - sudo apt-get -o Acquire::Retries=3 install \ - libblas-dev \ - libglu1-mesa-dev \ - xorg-dev \ - ccache - echo 'CACHE_PATH=~/.cache/ccache' >> "$GITHUB_ENV" - - - name: Cache Build - id: cache-build - uses: actions/cache@v4.0.2 - 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 - 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 - run: cd build; make -j2; ccache --show-stats - - - name: Tests - run: cd build; ctest --verbose --output-on-failure - - #################### - # MacOS - #################### - - MacOS: - name: ${{ matrix.os }} (${{ matrix.config }}, ${{ matrix.threading }}) - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [macos-latest, macos-14] - config: [DebugNoSymbols, Release] - threading: [CPP, TBB, NONE] - - steps: - - name: Checkout repository - uses: actions/checkout@v4.1.6 - with: - 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/cache@v4.0.2 - 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 - 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 - 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: [NONE] - steps: - - name: Checkout repository - uses: actions/checkout@v4.1.6 - with: - fetch-depth: 10 - - - name: Install Ninja - uses: seanmiddleditch/gha-setup-ninja@master - - - 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/cache@v4.0.2 - 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 - 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: Tests - run: | - cd build - ctest --verbose --output-on-failure diff --git a/inflator b/inflator index 5e2fe0f77..d5afd32eb 160000 --- a/inflator +++ b/inflator @@ -1 +1 @@ -Subproject commit 5e2fe0f778975b05e254629d388553cf3cb3d17b +Subproject commit d5afd32eb42bfc576dce8a5eb59721dfb104778a