ci_publish.yml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. name: Tracking orc-booting compiler memory usage
  2. on:
  3. pull_request_target:
  4. types: [closed]
  5. jobs:
  6. build:
  7. if: github.event.pull_request.merged == true
  8. strategy:
  9. fail-fast: false
  10. matrix:
  11. os: [ubuntu-22.04]
  12. cpu: [amd64]
  13. name: '${{ matrix.os }}'
  14. runs-on: ${{ matrix.os }}
  15. steps:
  16. - name: 'Checkout'
  17. uses: actions/checkout@v4
  18. with:
  19. fetch-depth: 2
  20. - name: 'Install node.js'
  21. uses: actions/setup-node@v4
  22. with:
  23. node-version: ''
  24. - name: 'Install dependencies (Linux amd64)'
  25. if: runner.os == 'Linux' && matrix.cpu == 'amd64'
  26. run: |
  27. sudo apt-fast update -qq
  28. DEBIAN_FRONTEND='noninteractive' \
  29. sudo apt-fast install --no-install-recommends -yq \
  30. libcurl4-openssl-dev libgc-dev libsdl1.2-dev libsfml-dev \
  31. valgrind libc6-dbg libblas-dev xorg-dev
  32. - name: 'Add build binaries to PATH'
  33. shell: bash
  34. run: echo "${{ github.workspace }}/bin" >> "${GITHUB_PATH}"
  35. - name: 'System information'
  36. shell: bash
  37. run: . ci/funs.sh && nimCiSystemInfo
  38. - name: 'Build csourcesAny'
  39. shell: bash
  40. run: . ci/funs.sh && nimBuildCsourcesIfNeeded CC=gcc ucpu='${{ matrix.cpu }}'
  41. - name: 'Build koch'
  42. shell: bash
  43. run: nim c koch
  44. - name: 'Build Nim'
  45. shell: bash
  46. run: ./koch boot -d:release -d:nimStrictMode --lib:lib
  47. - name: 'Action'
  48. shell: bash
  49. run: nim c -r -d:release ci/action.nim
  50. - name: 'Comment'
  51. uses: actions/github-script@v7
  52. with:
  53. script: |
  54. const fs = require('fs');
  55. try {
  56. const data = fs.readFileSync('ci/nimcache/results.txt', 'utf8');
  57. github.rest.issues.createComment({
  58. issue_number: context.issue.number,
  59. owner: context.repo.owner,
  60. repo: context.repo.repo,
  61. body: data
  62. })
  63. } catch (err) {
  64. console.error(err);
  65. }