ci_publish.yml 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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-20.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 20.x'
  21. uses: actions/setup-node@v4
  22. with:
  23. node-version: '20.x'
  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: 'Install dependencies (macOS)'
  33. if: runner.os == 'macOS'
  34. run: brew install boehmgc make sfml gtk+3
  35. - name: 'Install dependencies (Windows)'
  36. if: runner.os == 'Windows'
  37. shell: bash
  38. run: |
  39. set -e
  40. . ci/funs.sh
  41. nimInternalInstallDepsWindows
  42. echo_run echo "${{ github.workspace }}/dist/mingw64/bin" >> "${GITHUB_PATH}"
  43. - name: 'Add build binaries to PATH'
  44. shell: bash
  45. run: echo "${{ github.workspace }}/bin" >> "${GITHUB_PATH}"
  46. - name: 'System information'
  47. shell: bash
  48. run: . ci/funs.sh && nimCiSystemInfo
  49. - name: 'Build csourcesAny'
  50. shell: bash
  51. run: . ci/funs.sh && nimBuildCsourcesIfNeeded CC=gcc ucpu='${{ matrix.cpu }}'
  52. - name: 'Build koch'
  53. shell: bash
  54. run: nim c koch
  55. - name: 'Build Nim'
  56. shell: bash
  57. run: ./koch boot -d:release -d:nimStrictMode --lib:lib
  58. - name: 'Action'
  59. shell: bash
  60. run: nim c -r -d:release ci/action.nim
  61. - name: 'Comment'
  62. uses: actions/github-script@v7
  63. with:
  64. script: |
  65. const fs = require('fs');
  66. try {
  67. const data = fs.readFileSync('ci/nimcache/results.txt', 'utf8');
  68. github.rest.issues.createComment({
  69. issue_number: context.issue.number,
  70. owner: context.repo.owner,
  71. repo: context.repo.repo,
  72. body: data
  73. })
  74. } catch (err) {
  75. console.error(err);
  76. }