ci.yml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. name: CI
  2. on:
  3. pull_request:
  4. branches:
  5. - master
  6. push:
  7. branches:
  8. - master
  9. tags: '*'
  10. jobs:
  11. test-unix:
  12. runs-on: ${{ matrix.os }}
  13. strategy:
  14. fail-fast: false
  15. matrix:
  16. os:
  17. - ubuntu-latest
  18. - macos-latest
  19. steps:
  20. - uses: actions/checkout@v5
  21. - run: make
  22. - run: make test
  23. windows:
  24. runs-on: windows-latest
  25. strategy:
  26. fail-fast: false
  27. matrix:
  28. include:
  29. - { sys: mingw64, env: x86_64 }
  30. - { sys: mingw32, env: i686 }
  31. - { sys: ucrt64, env: ucrt-x86_64 } # Experimental!
  32. - { sys: clang64, env: clang-x86_64 } # Experimental!
  33. defaults:
  34. run:
  35. shell: msys2 {0}
  36. steps:
  37. - uses: actions/checkout@v5
  38. - name: Set up the desired MSYS2 environment
  39. uses: msys2/setup-msys2@v2
  40. with:
  41. msystem: ${{matrix.sys}}
  42. install: base-devel mingw-w64-${{matrix.env}}-toolchain
  43. - run: make
  44. - run: make test
  45. code-coverage-old:
  46. runs-on: ubuntu-latest
  47. steps:
  48. - uses: actions/checkout@v5
  49. - name: Setup LCOV
  50. uses: hrishikesh-kadam/setup-lcov@v1
  51. - name: Build and Run tests
  52. run: make coverage -j
  53. # - name: Upload coverage to Codecov
  54. # uses: codecov/codecov-action@v5
  55. # with:
  56. # files: ./cov-html/libopenlibm.info
  57. # token: ${{ secrets.CODECOV_TOKEN }}
  58. - uses: actions/upload-artifact@v4
  59. with:
  60. name: code-coverage-report-old
  61. path: ./cov-html/
  62. code-coverage:
  63. runs-on: ubuntu-latest
  64. steps:
  65. - name: Checkout Openlibm
  66. uses: actions/checkout@v5
  67. - name: Checkout Openlibm-test
  68. uses: actions/checkout@v5
  69. with:
  70. repository: 'JuliaMath/openlibm-test'
  71. path: 'openlibm-test'
  72. - name: Setup LCOV
  73. uses: hrishikesh-kadam/setup-lcov@v1
  74. - name: Build Openlibm
  75. run: make -j`nproc` CODE_COVERAGE=1
  76. - name: Run Test
  77. run: |
  78. make -j`nproc` -C openlibm-test \
  79. USE_OPENLIBM=1 OPENLIBM_HOME="$(pwd)" \
  80. SKIP_FP_EXCEPT_TEST=1 \
  81. - name: Show Test Result
  82. run: cat openlibm-test/src/REPORT
  83. - name: Gen Coverage Report
  84. run: make gen-cov-report
  85. - name: Upload coverage to Codecov
  86. uses: codecov/codecov-action@v5
  87. with:
  88. files: ./cov-html/libopenlibm.info
  89. token: ${{ secrets.CODECOV_TOKEN }}
  90. - uses: actions/upload-artifact@v4
  91. with:
  92. name: code-coverage-report
  93. path: ./cov-html/