nightly.yml 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. name: Nightly
  2. on:
  3. schedule:
  4. - cron: '0 4 * * *'
  5. env:
  6. CTEST_OUTPUT_ON_FAILURE: ON
  7. CTEST_PARALLEL_LEVEL: 2
  8. jobs:
  9. ####################
  10. # Linux / macOS
  11. ####################
  12. # Part of this file is inspired from
  13. # https://github.com/onqtam/doctest/blob/dev/.github/workflows/main.yml
  14. Unix:
  15. name: ${{ matrix.name }} (${{ matrix.config }}, Static=${{ matrix.static }})
  16. runs-on: ${{ matrix.os }}
  17. strategy:
  18. fail-fast: false
  19. matrix:
  20. name: [
  21. ubuntu-20.04-gcc-8,
  22. ubuntu-20.04-gcc-9,
  23. ubuntu-20.04-gcc-10,
  24. ubuntu-20.04-clang-8,
  25. ubuntu-20.04-clang-9,
  26. ubuntu-20.04-clang-10,
  27. macOS-latest,
  28. ]
  29. config: [Debug, Release]
  30. static: [ON, OFF]
  31. include:
  32. - name: ubuntu-20.04-gcc-8
  33. os: ubuntu-20.04
  34. compiler: gcc
  35. version: "8"
  36. - name: ubuntu-20.04-gcc-9
  37. os: ubuntu-20.04
  38. compiler: gcc
  39. version: "9"
  40. - name: ubuntu-20.04-gcc-10
  41. os: ubuntu-20.04
  42. compiler: gcc
  43. version: "10"
  44. - name: ubuntu-20.04-clang-8
  45. os: ubuntu-20.04
  46. compiler: clang
  47. version: "8"
  48. - name: ubuntu-20.04-clang-9
  49. os: ubuntu-20.04
  50. compiler: clang
  51. version: "9"
  52. - name: ubuntu-20.04-clang-10
  53. os: ubuntu-20.04
  54. compiler: clang
  55. version: "10"
  56. - name: macOS-latest
  57. os: macOS-latest
  58. # Build tutorials for most configurations
  59. - tutorials: ON
  60. # Except with Debug mode
  61. - config: Debug
  62. tutorials: OFF
  63. env:
  64. LIBIGL_NUM_THREADS: 1 # See https://github.com/libigl/libigl/pull/996
  65. steps:
  66. - name: Checkout repository
  67. uses: actions/checkout@v1
  68. with:
  69. fetch-depth: 10
  70. - name: Dependencies (Linux)
  71. if: runner.os == 'Linux'
  72. run: |
  73. sudo apt-get update
  74. if [ "${{ matrix.compiler }}" = "gcc" ]; then
  75. sudo apt-get install -y g++-${{ matrix.version }}
  76. echo "CC=gcc-${{ matrix.version }}" >> $GITHUB_ENV
  77. echo "CXX=g++-${{ matrix.version }}" >> $GITHUB_ENV
  78. else
  79. sudo apt-get install -y clang-${{ matrix.version }}
  80. echo "CC=clang-${{ matrix.version }}" >> $GITHUB_ENV
  81. echo "CXX=clang++-${{ matrix.version }}" >> $GITHUB_ENV
  82. fi
  83. sudo apt-get install \
  84. libblas-dev \
  85. libboost-filesystem-dev \
  86. libboost-system-dev \
  87. libboost-thread-dev \
  88. libglu1-mesa-dev \
  89. liblapack-dev \
  90. libmpfr-dev \
  91. xorg-dev
  92. - name: Dependencies (macOS)
  93. if: runner.os == 'macOS'
  94. run: brew install boost gmp mpfr
  95. - name: Configure
  96. run: |
  97. mkdir -p build
  98. cd build
  99. cmake .. \
  100. -DCMAKE_BUILD_TYPE=${{ matrix.config }} \
  101. -DLIBIGL_USE_STATIC_LIBRARY=${{ matrix.static }} \
  102. -DLIBIGL_BUILD_TUTORIALS=${{ matrix.tutorials }} \
  103. -DLIBIGL_WITH_CGAL=ON \
  104. -DLIBIGL_WITH_COMISO=ON
  105. - name: Free Disk Space
  106. if: runner.os == 'Linux'
  107. run: |
  108. sudo swapoff -a
  109. sudo apt clean
  110. sudo rm -rf /swapfile /usr/share/dotnet /usr/local/lib/android /opt/ghc
  111. df -h
  112. - name: Build
  113. run: cd build; make -j2
  114. - name: Tests
  115. run: cd build; ctest --verbose
  116. ####################
  117. # Windows
  118. ####################
  119. Windows:
  120. name: Windows (${{ matrix.config }}, Static=${{ matrix.static }})
  121. runs-on: windows-2019
  122. env:
  123. CC: cl.exe
  124. CXX: cl.exe
  125. strategy:
  126. fail-fast: false
  127. matrix:
  128. config: [Debug, Release]
  129. static: [ON, OFF]
  130. include:
  131. - config: Debug
  132. tutorials: OFF
  133. - config: Release
  134. tutorials: ON
  135. steps:
  136. - name: Checkout repository
  137. uses: actions/checkout@v1
  138. with:
  139. fetch-depth: 10
  140. - uses: seanmiddleditch/gha-setup-ninja@master
  141. - name: Set env
  142. run: |
  143. echo "BOOST_ROOT=$env:BOOST_ROOT_1_72_0" >> ${env:GITHUB_ENV}
  144. # We run configure + build in the same step, since they both need to call VsDevCmd
  145. # Also, cmd uses ^ to break commands into multiple lines (in powershell this is `)
  146. - name: Configure and build
  147. shell: cmd
  148. run: |
  149. call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x64
  150. cmake -G Ninja ^
  151. -DCMAKE_BUILD_TYPE=${{ matrix.config }} ^
  152. -DLIBIGL_USE_STATIC_LIBRARY=${{ matrix.static }} ^
  153. -DLIBIGL_BUILD_TUTORIALS=${{ matrix.tutorials }} ^
  154. -DLIBIGL_WITH_CGAL=ON ^
  155. -DLIBIGL_WITH_COMISO=OFF ^
  156. -DCMAKE_JOB_POOLS=pool-linking=1;pool-compilation=2 ^
  157. -DCMAKE_JOB_POOL_COMPILE:STRING=pool-compilation ^
  158. -DCMAKE_JOB_POOL_LINK:STRING=pool-linking ^
  159. -B build ^
  160. -S .
  161. cmake --build build -j 1
  162. - name: Tests
  163. run: cd build; ctest --verbose