fips-checksums.yml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. # Copyright 2021-2023 The OpenSSL Project Authors. All Rights Reserved.
  2. #
  3. # Licensed under the Apache License 2.0 (the "License"). You may not use
  4. # this file except in compliance with the License. You can obtain a copy
  5. # in the file LICENSE in the source distribution or at
  6. # https://www.openssl.org/source/license.html
  7. name: FIPS Check and ABIDIFF
  8. on: [pull_request]
  9. permissions:
  10. contents: read
  11. jobs:
  12. compute-checksums:
  13. runs-on: ubuntu-latest
  14. steps:
  15. - name: install unifdef
  16. run: |
  17. sudo apt-get update
  18. sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install unifdef
  19. - name: create build dirs
  20. run: |
  21. mkdir ./build-pristine
  22. mkdir ./source-pristine
  23. mkdir ./build
  24. mkdir ./source
  25. mkdir ./artifact
  26. - uses: actions/checkout@v4
  27. with:
  28. repository: ${{ github.event.pull_request.base.repo.full_name }}
  29. ref: ${{ github.event.pull_request.base.ref }}
  30. path: source-pristine
  31. - name: config pristine
  32. run: ../source-pristine/config enable-fips
  33. working-directory: ./build-pristine
  34. - name: config pristine dump
  35. run: ./configdata.pm --dump
  36. working-directory: ./build-pristine
  37. - name: make build_generated pristine
  38. run: make -s build_generated
  39. working-directory: ./build-pristine
  40. - name: make fips-checksums pristine
  41. run: make fips-checksums
  42. working-directory: ./build-pristine
  43. - uses: actions/checkout@v4
  44. with:
  45. path: source
  46. - name: config
  47. run: ../source/config enable-fips
  48. working-directory: ./build
  49. - name: config dump
  50. run: ./configdata.pm --dump
  51. working-directory: ./build
  52. - name: make build_generated
  53. run: make -s build_generated
  54. working-directory: ./build
  55. - name: make fips-checksums
  56. run: make fips-checksums
  57. working-directory: ./build
  58. - name: update checksums
  59. run: |
  60. cp -a build-pristine/providers/fips.module.sources.new source/providers/fips.module.sources
  61. cp -a build-pristine/providers/fips-sources.checksums.new source/providers/fips-sources.checksums
  62. cp -a build-pristine/providers/fips.checksum.new source/providers/fips.checksum
  63. - name: make diff-fips-checksums
  64. run: make diff-fips-checksums && touch ../artifact/fips_unchanged || ( touch ../artifact/fips_changed ; echo FIPS CHANGED )
  65. working-directory: ./build
  66. - name: save PR number
  67. run: echo ${{ github.event.number }} > ./artifact/pr_num
  68. - name: save artifact
  69. uses: actions/upload-artifact@v3
  70. with:
  71. name: fips_checksum
  72. path: artifact/
  73. compute-abidiff:
  74. runs-on: ubuntu-latest
  75. env:
  76. BUILD_OPTS: -g --strict-warnings enable-ktls enable-fips enable-egd enable-ec_nistp_64_gcc_128 enable-md2 enable-rc5 enable-sctp enable-ssl3 enable-ssl3-method enable-trace enable-zlib enable-zstd
  77. steps:
  78. - name: create build dirs
  79. run: |
  80. mkdir ./build-pristine
  81. mkdir ./source-pristine
  82. mkdir ./build
  83. mkdir ./source
  84. mkdir ./artifact
  85. - name: install extra config support
  86. run: sudo apt-get -y install libsctp-dev abigail-tools libzstd-dev zstd
  87. - uses: actions/checkout@v4
  88. with:
  89. repository: ${{ github.event.pull_request.base.repo.full_name }}
  90. ref: ${{ github.event.pull_request.base.ref }}
  91. path: source-pristine
  92. - name: config pristine
  93. run: ../source-pristine/config --banner=Configured $BUILD_OPTS && perl configdata.pm --dump
  94. working-directory: ./build-pristine
  95. - name: make pristine
  96. run: make -s -j4
  97. working-directory: ./build-pristine
  98. - uses: actions/checkout@v4
  99. with:
  100. path: source
  101. - name: config
  102. run: ../source/config --banner=Configured $BUILD_OPTS && perl configdata.pm --dump
  103. working-directory: ./build
  104. - name: make
  105. run: make -s -j4
  106. working-directory: ./build
  107. - name: abidiff
  108. run: abidiff --headers-dir1 build-pristine/include/openssl --headers-dir2 build/include/openssl --drop-private-types ./build-pristine/libcrypto.so ./build/libcrypto.so && abidiff --headers-dir1 build-pristine/include/openssl --headers-dir2 build/include/openssl --drop-private-types ./build-pristine/libssl.so ./build/libssl.so && touch ./artifact/abi_unchanged || ( touch ./artifact/abi_changed ; echo ABI CHANGED )
  109. - name: save PR number
  110. run: echo ${{ github.event.number }} > ./artifact/pr_num
  111. - name: save artifact
  112. uses: actions/upload-artifact@v3
  113. with:
  114. name: abidiff
  115. path: artifact/