ci.yml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. name: CI
  2. on:
  3. push:
  4. branches: '**'
  5. pull_request:
  6. branches:
  7. - 'master'
  8. - 'release-[0-9]+.[0-9]+'
  9. jobs:
  10. unixish:
  11. name: ${{ matrix.os }} ${{ matrix.flavor }} (cc=${{ matrix.cc }})
  12. strategy:
  13. fail-fast: false
  14. matrix:
  15. include:
  16. - flavor: asan
  17. cc: clang-12
  18. runner: ubuntu-20.04
  19. os: linux
  20. - flavor: lint
  21. cc: gcc
  22. runner: ubuntu-20.04
  23. os: linux
  24. - flavor: tsan
  25. cc: clang-12
  26. runner: ubuntu-20.04
  27. os: linux
  28. - cc: clang
  29. runner: macos-10.15
  30. os: osx
  31. - flavor: functionaltest-lua
  32. cc: gcc
  33. runner: ubuntu-20.04
  34. os: linux
  35. runs-on: ${{ matrix.runner }}
  36. if: github.event.pull_request.draft == false
  37. env:
  38. CC: ${{ matrix.cc }}
  39. CI_OS_NAME: ${{ matrix.os }}
  40. steps:
  41. - uses: actions/checkout@v2
  42. - name: Setup commom environment variables
  43. run: ./.github/workflows/env.sh ${{ matrix.flavor }}
  44. - name: Install apt packages
  45. if: matrix.os == 'linux'
  46. run: |
  47. sudo apt-get update
  48. sudo apt-get install -y autoconf automake build-essential ccache cmake cpanminus cscope gcc-multilib gdb gettext gperf language-pack-tr libtool-bin locales ninja-build pkg-config python3 python3-pip python3-setuptools unzip valgrind xclip
  49. - name: Install new clang
  50. if: matrix.flavor == 'asan' || matrix.flavor == 'tsan'
  51. run: |
  52. wget https://apt.llvm.org/llvm.sh
  53. chmod a+x llvm.sh
  54. sudo ./llvm.sh 12
  55. rm llvm.sh
  56. - name: Install brew packages
  57. if: matrix.os == 'osx'
  58. run: |
  59. # Workaround brew issues
  60. rm -f /usr/local/bin/2to3
  61. brew update >/dev/null
  62. brew upgrade
  63. brew install automake ccache perl cpanminus ninja
  64. - name: Setup interpreter packages
  65. run: |
  66. ./ci/before_install.sh
  67. ./ci/install.sh
  68. - name: Cache dependencies
  69. uses: actions/cache@v2
  70. with:
  71. path: |
  72. ${{ env.CACHE_NVIM_DEPS_DIR }}
  73. ~/.ccache
  74. key: ${{ runner.os }}-${{ matrix.flavor }}-${{ matrix.cc }}-${{ hashFiles('cmake/*', 'third-party/**', '**/CMakeLists.txt') }}-${{ github.base_ref }}
  75. - name: Build third-party
  76. run: ./ci/before_script.sh
  77. - name: Build and test
  78. run: ./ci/script.sh
  79. - name: Cache dependencies
  80. if: ${{ success() }}
  81. run: ./ci/before_cache.sh
  82. windows:
  83. runs-on: windows-2016
  84. if: github.event.pull_request.draft == false
  85. env:
  86. DEPS_BUILD_DIR: ${{ format('{0}/nvim-deps', github.workspace) }}
  87. DEPS_PREFIX: ${{ format('{0}/nvim-deps/usr', github.workspace) }}
  88. strategy:
  89. fail-fast: false
  90. matrix:
  91. config: [ MINGW_64-gcov, MINGW_32, MSVC_64, MSVC_32 ]
  92. name: windows (${{ matrix.config }})
  93. steps:
  94. - uses: actions/checkout@v2
  95. - uses: actions/cache@v2
  96. with:
  97. path: ${{ env.DEPS_BUILD_DIR }}
  98. key: ${{ matrix.config }}-${{ hashFiles('third-party\**') }}
  99. - name: Run CI
  100. run: powershell ci\build.ps1
  101. env:
  102. CONFIGURATION: ${{ matrix.config }}