fips-checksums.yml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. name: FIPS Checksums
  2. on: [pull_request]
  3. jobs:
  4. compute-checksums:
  5. runs-on: ubuntu-latest
  6. steps:
  7. - name: install unifdef
  8. run: |
  9. sudo apt-get update
  10. sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install unifdef
  11. - name: create build dirs
  12. run: |
  13. mkdir ./build-pristine
  14. mkdir ./source-pristine
  15. mkdir ./build
  16. mkdir ./source
  17. mkdir ./artifact
  18. - uses: actions/checkout@v2
  19. with:
  20. repository: ${{ github.event.pull_request.base.repo.full_name }}
  21. ref: ${{ github.event.pull_request.base.ref }}
  22. path: source-pristine
  23. - name: config pristine
  24. run: ../source-pristine/config enable-fips && perl configdata.pm --dump
  25. working-directory: ./build-pristine
  26. - name: make build_generated pristine
  27. run: make -s build_generated
  28. working-directory: ./build-pristine
  29. - name: make fips-checksums pristine
  30. run: make fips-checksums
  31. working-directory: ./build-pristine
  32. - uses: actions/checkout@v2
  33. with:
  34. path: source
  35. - name: config
  36. run: ../source/config enable-fips && perl configdata.pm --dump
  37. working-directory: ./build
  38. - name: make build_generated
  39. run: make -s build_generated
  40. working-directory: ./build
  41. - name: make fips-checksums
  42. run: make fips-checksums
  43. working-directory: ./build
  44. - name: update checksums
  45. run: |
  46. cp -a build-pristine/providers/fips.module.sources.new source/providers/fips.module.sources
  47. cp -a build-pristine/providers/fips-sources.checksums.new source/providers/fips-sources.checksums
  48. cp -a build-pristine/providers/fips.checksum.new source/providers/fips.checksum
  49. - name: make diff-fips-checksums
  50. run: make diff-fips-checksums && touch ../artifact/fips_unchanged || ( touch ../artifact/fips_changed ; echo FIPS CHANGED )
  51. working-directory: ./build
  52. - name: save PR number
  53. run: echo ${{ github.event.number }} > ./artifact/pr_num
  54. - name: save artifact
  55. uses: actions/upload-artifact@v2
  56. with:
  57. name: fips_checksum
  58. path: artifact/