Browse Source

Dot not build tutorials in Debug mode. (#1473)

* Dot not build tutorials in Debug mode.

Fix script.

Limit num of parallel jobs on Windows Nighlty.

Update job matrix.

Update job matrix.

Update job matrix.

Rename jobs.

* Limit branches that triggers a CI build.

* Restore original name.
Jérémie Dumas 5 years ago
parent
commit
021ec6f946
2 changed files with 28 additions and 5 deletions
  1. 8 2
      .github/workflows/continuous.yml
  2. 20 3
      .github/workflows/nightly.yml

+ 8 - 2
.github/workflows/continuous.yml

@@ -1,8 +1,14 @@
 name: Build
 
 on:
-  push: {}
-  pull_request: {}
+  push:
+    branches:
+      - master
+      - stable
+  pull_request:
+    branches:
+      - master
+      - stable
 
 env:
   CTEST_OUTPUT_ON_FAILURE: ON

+ 20 - 3
.github/workflows/daily.yml → .github/workflows/nightly.yml

@@ -1,4 +1,4 @@
-name: Daily
+name: Nightly
 
 on:
   schedule:
@@ -17,7 +17,7 @@ jobs:
   # https://github.com/onqtam/doctest/blob/dev/.github/workflows/main.yml
 
   Unix:
-    name: ${{ matrix.name }} (${{ matrix.config }}, ${{ matrix.static }})
+    name: ${{ matrix.name }} (${{ matrix.config }}, Static=${{ matrix.static }})
     runs-on: ${{ matrix.os }}
     strategy:
       fail-fast: false
@@ -66,6 +66,13 @@ jobs:
 
           - name: macOS-latest
             os: macOS-latest
+
+            # Build tutorials for most configurations
+          - tutorials: ON
+
+            # Except with Debug mode
+          - config: Debug
+            tutorials: OFF
     env:
       LIBIGL_NUM_THREADS: 1  # See https://github.com/libigl/libigl/pull/996
     steps:
@@ -114,9 +121,18 @@ jobs:
           cmake .. \
             -DCMAKE_BUILD_TYPE=${{ matrix.config }} \
             -DLIBIGL_USE_STATIC_LIBRARY=${{ matrix.static }} \
+            -DLIBIGL_BUILD_TUTORIALS=${{ matrix.tutorials }} \
             -DLIBIGL_WITH_CGAL=ON \
             -DLIBIGL_WITH_COMISO=ON
 
+      - name: Free Disk Space
+        if: runner.os == 'Linux'
+        run: |
+            sudo swapoff -a
+            sudo apt clean
+            sudo rm -rf /swapfile /usr/share/dotnet /usr/local/lib/android /opt/ghc
+            df -h
+
       - name: Build
         run: cd build; make -j2
 
@@ -128,6 +144,7 @@ jobs:
   ####################
 
   Windows:
+    name: Windows (${{ matrix.config }}, Static=${{ matrix.static }})
     runs-on: windows-2019
     env:
       CC: cl.exe
@@ -163,7 +180,7 @@ jobs:
             -DLIBIGL_WITH_COMISO=OFF ^
             -B build ^
             -S .
-          cmake --build build
+          cmake --build build -j 2
 
       - name: Tests
         run: cd build; ctest --verbose