compiler-zoo.yml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. # Copyright 2021-2022 The OpenSSL Project Authors. All Rights Reserved.
  2. #
  3. # Licensed under the Apache License 2.0 (the "License"). You may not use
  4. # this file except in compliance with the License. You can obtain a copy
  5. # in the file LICENSE in the source distribution or at
  6. # https://www.openssl.org/source/license.html
  7. name: Compiler Zoo CI
  8. on: [push]
  9. permissions:
  10. contents: read
  11. jobs:
  12. compiler:
  13. strategy:
  14. fail-fast: false
  15. matrix:
  16. zoo: [
  17. {
  18. cc: gcc-7,
  19. distro: ubuntu-20.04
  20. }, {
  21. cc: gcc-8,
  22. distro: ubuntu-20.04
  23. }, {
  24. cc: gcc-9,
  25. distro: ubuntu-20.04
  26. }, {
  27. cc: gcc-10,
  28. distro: ubuntu-20.04
  29. }, {
  30. cc: gcc-11,
  31. distro: ubuntu-22.04
  32. }, {
  33. cc: gcc-12,
  34. distro: ubuntu-22.04
  35. }, {
  36. cc: clang-6.0,
  37. distro: ubuntu-20.04
  38. }, {
  39. cc: clang-7,
  40. distro: ubuntu-20.04
  41. }, {
  42. cc: clang-8,
  43. distro: ubuntu-20.04
  44. }, {
  45. cc: clang-9,
  46. distro: ubuntu-20.04
  47. }, {
  48. cc: clang-10,
  49. distro: ubuntu-20.04
  50. }, {
  51. cc: clang-11,
  52. distro: ubuntu-20.04
  53. }, {
  54. cc: clang-12,
  55. distro: ubuntu-20.04
  56. }, {
  57. cc: clang-13,
  58. distro: ubuntu-22.04
  59. }, {
  60. cc: clang-14,
  61. distro: ubuntu-22.04
  62. }, {
  63. cc: clang-15,
  64. distro: ubuntu-22.04,
  65. llvm-ppa-name: jammy
  66. }
  67. ]
  68. # We set per-compiler now to allow testing with both older and newer sets
  69. # Often, the full range of oldest->newest compilers we want aren't available
  70. # in a single version of Ubuntu.
  71. runs-on: ${{ matrix.zoo.distro }}
  72. steps:
  73. - name: install packages
  74. run: |
  75. llvm_ppa_name="${{ matrix.zoo.llvm-ppa-name }}"
  76. # In the Matrix above, we set llvm-ppa-name if an LLVM version isn't
  77. # part of the Ubuntu version we're using. See https://apt.llvm.org/.
  78. if [[ -n ${llvm_ppa_name} ]] ; then
  79. wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key |\
  80. gpg --dearmor |\
  81. sudo tee /usr/share/keyrings/llvm-snapshot.gpg.key > /dev/null
  82. clang_version="${{ matrix.zoo.cc }}"
  83. clang_version="${clang_version/clang-}"
  84. echo "deb [signed-by=/usr/share/keyrings/llvm-snapshot.gpg.key] http://apt.llvm.org/${{ matrix.zoo.llvm-ppa-name }}/ llvm-toolchain-${{ matrix.zoo.llvm-ppa-name }}-${clang_version} main" \
  85. | sudo tee /etc/apt/sources.list.d/llvm.list
  86. echo "deb-src [signed-by=/usr/share/keyrings/llvm-snapshot.gpg.key] http://apt.llvm.org/${{ matrix.zoo.llvm-ppa-name }}/ llvm-toolchain-${{ matrix.zoo.llvm-ppa-name }}-${clang_version} main" \
  87. | sudo tee -a /etc/apt/sources.list.d/llvm.list
  88. cat /etc/apt/sources.list.d/llvm.list
  89. fi
  90. sudo apt-get update
  91. sudo apt-get -y install ${{ matrix.zoo.cc }}
  92. - uses: actions/checkout@v3
  93. - name: config
  94. run: |
  95. CC=${{ matrix.zoo.cc }} ./config --banner=Configured no-shared \
  96. -Wall -Werror enable-fips --strict-warnings
  97. - name: config dump
  98. run: ./configdata.pm --dump
  99. - name: make
  100. run: make -s -j4
  101. - name: make test
  102. run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}