main.yml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. name: CI
  2. on:
  3. push:
  4. branches:
  5. - master
  6. - develop
  7. - /^release\/.*$/
  8. pull_request:
  9. branches:
  10. - master
  11. - develop
  12. - /^release\/.*$/
  13. jobs:
  14. Build:
  15. runs-on: ${{ matrix.os }}
  16. strategy:
  17. matrix:
  18. cc: [ gcc, clang ]
  19. os: [ ubuntu-18.04 ]
  20. config:
  21. - { BUILDNAME: 'META_BUILDS', BUILDOPTIONS: '-DGMP_DESC', BUILDSCRIPT: '.ci/meta_builds.sh' }
  22. - { BUILDNAME: 'VALGRIND', BUILDOPTIONS: '', BUILDSCRIPT: '.ci/valgrind.sh' }
  23. - { BUILDNAME: 'STOCK', BUILDOPTIONS: '', BUILDSCRIPT: '.ci/run.sh' }
  24. - { BUILDNAME: 'STOCK-MPI', BUILDOPTIONS: '-ULTM_DESC -UTFM_DESC -UUSE_LTM -UUSE_TFM', BUILDSCRIPT: '.ci/run.sh' }
  25. - { BUILDNAME: 'EASY', BUILDOPTIONS: '-DLTC_EASY', BUILDSCRIPT: '.ci/run.sh' }
  26. - { BUILDNAME: 'SMALL', BUILDOPTIONS: '-DLTC_SMALL_CODE', BUILDSCRIPT: '.ci/run.sh' }
  27. - { BUILDNAME: 'NOTABLES', BUILDOPTIONS: '-DLTC_NO_TABLES', BUILDSCRIPT: '.ci/run.sh' }
  28. - { BUILDNAME: 'SMALL+NOTABLES', BUILDOPTIONS: '-DLTC_SMALL_CODE -DLTC_NO_TABLES', BUILDSCRIPT: '.ci/run.sh' }
  29. - { BUILDNAME: 'NO_FAST', BUILDOPTIONS: '-DLTC_NO_FAST', BUILDSCRIPT: '.ci/run.sh' }
  30. - { BUILDNAME: 'NO_FAST+NOTABLES', BUILDOPTIONS: '-DLTC_NO_FAST -DLTC_NO_TABLES', BUILDSCRIPT: '.ci/run.sh' }
  31. - { BUILDNAME: 'NO_ASM', BUILDOPTIONS: '-DLTC_NO_ASM', BUILDSCRIPT: '.ci/run.sh' }
  32. - { BUILDNAME: 'NO_TIMING_RESISTANCE', BUILDOPTIONS: '-DLTC_NO_ECC_TIMING_RESISTANT -DLTC_NO_RSA_BLINDING', BUILDSCRIPT: '.ci/run.sh' }
  33. - { BUILDNAME: 'PTHREAD', BUILDOPTIONS: '-DLTC_PTHREAD', BUILDSCRIPT: '.ci/run.sh' }
  34. - { BUILDNAME: 'STOCK+ARGTYPE=1', BUILDOPTIONS: '-DARGTYPE=1', BUILDSCRIPT: '.ci/run.sh' }
  35. - { BUILDNAME: 'STOCK+ARGTYPE=2', BUILDOPTIONS: '-DARGTYPE=2', BUILDSCRIPT: '.ci/run.sh' }
  36. - { BUILDNAME: 'STOCK+ARGTYPE=3', BUILDOPTIONS: '-DARGTYPE=3', BUILDSCRIPT: '.ci/run.sh' }
  37. - { BUILDNAME: 'STOCK+ARGTYPE=4', BUILDOPTIONS: '-DARGTYPE=4', BUILDSCRIPT: '.ci/run.sh' }
  38. steps:
  39. - uses: actions/checkout@v2
  40. - name: install dependencies
  41. run: |
  42. sudo apt-get update -qq
  43. sudo apt-get install -y libtommath-dev libgmp-dev libtfm-dev valgrind libtool-bin clang-tools lcov
  44. sudo gem install coveralls-lcov
  45. curl -s https://packagecloud.io/install/repositories/libtom/packages/script.deb.sh | sudo bash
  46. sudo apt-get install libtfm1=0.13-5ubuntu1
  47. - name: run tests
  48. env:
  49. CC: "${{ matrix.cc }}"
  50. PR_NUMBER: ${{ github.event.number }}
  51. REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  52. run: |
  53. bash "${{ matrix.config.BUILDSCRIPT }}" "${{ matrix.config.BUILDNAME }}" "-DUSE_LTM -DLTM_DESC" "makefile V=1" "${{ matrix.config.BUILDOPTIONS }}" "-ltommath"
  54. bash "${{ matrix.config.BUILDSCRIPT }}" "${{ matrix.config.BUILDNAME }}" "-DUSE_TFM -DTFM_DESC" "makefile.shared V=1" "${{ matrix.config.BUILDOPTIONS }}" "-ltfm"
  55. - name: regular logs
  56. if: ${{ !failure() }}
  57. run: |
  58. cat gcc_1.txt
  59. cat gcc_2.txt
  60. - name: error logs
  61. if: ${{ failure() }}
  62. run: |
  63. cat test_std.txt
  64. cat test_err.txt
  65. cat tv.txt
  66. - name: pack build directory
  67. if: ${{ failure() }}
  68. run: |
  69. tar cJf build-${{ github.run_id }}.tar.xz --exclude ./build-${{ github.run_id }}.tar.xz .
  70. - name: upload Artifact
  71. if: ${{ failure() }}
  72. uses: actions/upload-artifact@v3
  73. with:
  74. name: build-${{ github.run_id }}.tar.xz
  75. path: build-${{ github.run_id }}.tar.xz
  76. retention-days: 1