ci.yml.disabled 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. name: Continous Integration
  2. on: [push, pull_request]
  3. jobs:
  4. build:
  5. strategy:
  6. matrix:
  7. os: [ubuntu-18.04, macos-10.15, windows-2019]
  8. cpu: [amd64, i386]
  9. cpp: ['false', 'true']
  10. pkg: ['false', 'true']
  11. exclude:
  12. - os: ubuntu-18.04
  13. cpp: 'true'
  14. - os: ubuntu-18.04
  15. pkg: 'true'
  16. - os: macos-10.15
  17. cpu: i386
  18. - os: macos-10.15
  19. pkg: 'true'
  20. - os: windows-2019
  21. cpu: i386
  22. - os: windows-2019
  23. cpp: 'true'
  24. name: '${{ matrix.os }} (${{ matrix.cpu }}, cpp: ${{ matrix.cpp }}, pkg: ${{ matrix.pkg }})'
  25. runs-on: ${{ matrix.os }}
  26. env:
  27. NIM_COMPILE_TO_CPP: ${{ matrix.cpp }}
  28. NIM_TEST_PACKAGES: ${{ matrix.pkg }}
  29. steps:
  30. - name: 'Checkout'
  31. uses: actions/checkout@v2
  32. - name: 'Checkout csources'
  33. uses: actions/checkout@v2
  34. with:
  35. repository: nim-lang/csources
  36. path: csources
  37. - name: 'Install node.js 8.x'
  38. uses: actions/setup-node@v1
  39. with:
  40. node-version: '8.x'
  41. - name: 'Install dependencies (Linux amd64)'
  42. if: runner.os == 'Linux' && matrix.cpu == 'amd64'
  43. run: |
  44. sudo apt-fast update -qq
  45. DEBIAN_FRONTEND='noninteractive' \
  46. sudo apt-fast install --no-install-recommends -yq \
  47. libcurl4-openssl-dev libgc-dev libsdl1.2-dev libsfml-dev \
  48. valgrind libc6-dbg
  49. - name: 'Install dependencies (Linux i386)'
  50. if: runner.os == 'Linux' && matrix.cpu == 'i386'
  51. run: |
  52. sudo dpkg --add-architecture i386
  53. sudo apt-fast update -qq
  54. DEBIAN_FRONTEND='noninteractive' \
  55. sudo apt-fast install --no-install-recommends --allow-downgrades -yq \
  56. g++-multilib gcc-multilib libcurl4-openssl-dev:i386 libgc-dev:i386 \
  57. libsdl1.2-dev:i386 libsfml-dev:i386 libglib2.0-dev:i386 \
  58. libffi-dev:i386
  59. cat << EOF > bin/gcc
  60. #!/bin/bash
  61. exec $(which gcc) -m32 "\$@"
  62. EOF
  63. cat << EOF > bin/g++
  64. #!/bin/bash
  65. exec $(which g++) -m32 "\$@"
  66. EOF
  67. chmod 755 bin/gcc
  68. chmod 755 bin/g++
  69. - name: 'Install dependencies (macOS)'
  70. if: runner.os == 'macOS'
  71. run: brew install boehmgc make sfml
  72. - name: 'Install dependencies (Windows)'
  73. if: runner.os == 'Windows'
  74. shell: bash
  75. run: |
  76. mkdir dist
  77. curl -L https://nim-lang.org/download/mingw64.7z -o dist/mingw64.7z
  78. curl -L https://nim-lang.org/download/dlls.zip -o dist/dlls.zip
  79. 7z x dist/mingw64.7z -odist
  80. 7z x dist/dlls.zip -obin
  81. echo "${{ github.workspace }}/dist/mingw64/bin" >> "${GITHUB_PATH}"
  82. - name: 'Add build binaries to PATH'
  83. shell: bash
  84. run: echo "${{ github.workspace }}/bin" >> "${GITHUB_PATH}"
  85. - name: 'Build csources'
  86. shell: bash
  87. run: |
  88. ncpu=
  89. case '${{ runner.os }}' in
  90. 'Linux')
  91. ncpu=$(nproc)
  92. ;;
  93. 'macOS')
  94. ncpu=$(sysctl -n hw.ncpu)
  95. ;;
  96. 'Windows')
  97. ncpu=$NUMBER_OF_PROCESSORS
  98. ;;
  99. esac
  100. [[ -z "$ncpu" || $ncpu -le 0 ]] && ncpu=1
  101. make -C csources -j $ncpu CC=gcc ucpu='${{ matrix.cpu }}'
  102. - name: 'Build koch'
  103. shell: bash
  104. run: nim c koch
  105. - name: 'Run CI'
  106. shell: bash
  107. run: ./koch runCI
  108. - name: 'Show failed tests'
  109. if: failure()
  110. shell: bash
  111. run: nim c -r tools/ci_testresults.nim