1
0

build.yml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. ---
  2. name: build
  3. on:
  4. push:
  5. paths-ignore:
  6. - '**.md'
  7. pull_request:
  8. paths-ignore:
  9. - '**.md'
  10. jobs:
  11. linux:
  12. runs-on: ubuntu-latest
  13. continue-on-error: ${{ ! matrix.stable }}
  14. strategy:
  15. matrix:
  16. compiler:
  17. - gcc
  18. - clang
  19. os:
  20. - fedora:latest
  21. - quay.io/centos/centos:stream9
  22. - quay.io/centos/centos:stream8
  23. - debian:testing
  24. - debian:latest
  25. - ubuntu:rolling
  26. - ubuntu:jammy
  27. - ubuntu:focal
  28. stable:: [true]
  29. include:
  30. - compiler: gcc
  31. os: quay.io/fedora/fedora:rawhide
  32. stable: false
  33. - compiler: clang
  34. os: quay.io/fedora/fedora:rawhide
  35. stable: false
  36. - compiler: gcc
  37. os: ubuntu:devel
  38. stable: false
  39. - compiler: clang
  40. os: ubuntu:devel
  41. stable: false
  42. steps:
  43. - uses: actions/checkout@v4
  44. - name: Show OS information
  45. run: |
  46. cat /etc/os-release 2>/dev/null || echo /etc/os-release not available
  47. - name: Install build dependencies
  48. run: bash .github/workflows/install-dependencies
  49. - name: Build jose
  50. run: |
  51. mkdir -p build && cd build
  52. export ninja=$(command -v ninja)
  53. [ -z "${ninja}" ] && export ninja=$(command -v ninja-build)
  54. meson setup .. || cat meson-logs/meson-log.txt >&2
  55. ${ninja}
  56. - name: Run tests
  57. run: |
  58. cd build
  59. if ! meson test; then
  60. cat meson-logs/testlog.txt >&2
  61. exit -1
  62. fi
  63. - name: Show full test logs
  64. run: |
  65. if [ -r build/meson-logs/testlog.txt ]; then
  66. cat build/meson-logs/testlog.txt >&2
  67. else
  68. echo "No test log available" >&2
  69. fi
  70. cat build/meson-private/jose.pc
  71. container:
  72. image: ${{matrix.os}}
  73. env:
  74. DISTRO: ${{matrix.os}}
  75. CC: ${{ matrix.compiler }}
  76. osx:
  77. runs-on: macos-latest
  78. strategy:
  79. matrix:
  80. compiler:
  81. - gcc
  82. - clang
  83. steps:
  84. - uses: actions/checkout@v4
  85. - name: Show OS information
  86. run: |
  87. cat /etc/os-release 2>/dev/null || echo /etc/os-release not available
  88. - name: Install build dependencies
  89. run: bash .github/workflows/install-dependencies
  90. - name: Build jose
  91. run: |
  92. mkdir -p build && cd build
  93. export ninja=$(command -v ninja)
  94. [ -z "${ninja}" ] && export ninja=$(command -v ninja-build)
  95. CFLAGS=-I$(brew --prefix openssl)/include LDFLAGS=-L$(brew --prefix openssl)/lib PKG_CONFIG_PATH=$(brew --prefix openssl)/lib/pkgconfig meson setup .. || cat meson-logs/meson-log.txt >&2
  96. ${ninja}
  97. - name: Run tests
  98. run: |
  99. cd build
  100. if ! meson test; then
  101. cat meson-logs/testlog.txt >&2
  102. exit -1
  103. fi
  104. - name: Show full test logs
  105. run: |
  106. if [ -r build/meson-logs/testlog.txt ]; then
  107. cat build/meson-logs/testlog.txt >&2
  108. else
  109. echo "No test log available" >&2
  110. fi
  111. cat build/meson-private/jose.pc
  112. env:
  113. DISTRO: osx:macos-latest
  114. CC: ${{ matrix.compiler }}
  115. # vim:set ts=2 sw=2 et: