Newer
Older
dub_jkp / .github / workflows / pr_info_untrusted.yml
  1. name: PR Info
  2.  
  3. # This workflow builds the whole project once and:
  4. # - comments build deprecations/warnings (highlighting new ones since last tested PR)
  5.  
  6. on:
  7. pull_request:
  8. branches:
  9. - master
  10. - stable
  11.  
  12. jobs:
  13. pr_info:
  14. name: PR Info
  15. runs-on: ubuntu-20.04
  16. steps:
  17. # we first create a comment thanking the user in pr_info_intro.yml
  18. # (separate step due to needing GITHUB_TOKEN access)
  19.  
  20. - name: '[Linux] Install dependencies'
  21. if: runner.os == 'Linux'
  22. run: |
  23. sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev netcat
  24.  
  25. # Compiler to test with
  26. - name: Prepare compiler
  27. uses: dlang-community/setup-dlang@v1
  28. with:
  29. compiler: ldc-latest
  30.  
  31. - name: Checkout
  32. uses: actions/checkout@v3
  33. with:
  34. fetch-depth: 0
  35.  
  36. - name: Checkout old stuff, with new comment script
  37. run: |
  38. git checkout ${{ github.base_ref }}
  39. git checkout ${{ github.sha }} -- ./scripts/ci/summary_comment.sh ./scripts/ci/summary_comment_diff.sh
  40.  
  41. # first dump old info
  42.  
  43. - name: Check pre-PR status
  44. run: ./scripts/ci/summary_comment.sh | tee ../OLD_OUTPUT.txt
  45.  
  46. - name: Checkout PR target
  47. run: |
  48. git checkout ${{ github.sha }}
  49. git clean -fd
  50. git reset --hard
  51.  
  52. - name: Evaluate PR
  53. run: ./scripts/ci/summary_comment.sh | tee ../NEW_OUTPUT.txt
  54.  
  55. - name: Generate comment
  56. run: ./scripts/ci/summary_comment_diff.sh ../OLD_OUTPUT.txt ../NEW_OUTPUT.txt | tee comment.txt
  57.  
  58. - name: Prepare comment for upload
  59. run: |
  60. mkdir -p ./pr
  61. mv comment.txt pr
  62. echo ${{ github.event.number }} > ./pr/NR
  63.  
  64. - name: upload comment to high-trust action making the comment
  65. uses: actions/upload-artifact@v2
  66. with:
  67. name: pr
  68. path: pr/