build.yml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. ---
  2. name: build
  3. on:
  4. push:
  5. ignore-paths:
  6. - '**.md'
  7. pull_request:
  8. ignore-paths:
  9. - '**.md'
  10. jobs:
  11. build:
  12. runs-on: ubuntu-latest
  13. continue-on-error: ${{ ! matrix.stable }}
  14. strategy:
  15. matrix:
  16. os:
  17. - fedora:latest
  18. - quay.io/centos/centos:stream8
  19. - quay.io/centos/centos:stream9
  20. - debian:testing
  21. - debian:latest
  22. - ubuntu:rolling
  23. - ubuntu:latest
  24. stable: [true]
  25. include:
  26. - os: quay.io/fedora/fedora:rawhide
  27. stable: false
  28. - os: ubuntu:devel
  29. stable: false
  30. steps:
  31. - uses: actions/checkout@v4
  32. - name: Show OS information
  33. run: cat /etc/os-release 2>/dev/null || echo /etc/os-release not available
  34. - name: Install build dependencies
  35. run: bash .github/workflows/install-dependencies
  36. - name: Build clevis
  37. run: |
  38. mkdir -p build && cd build
  39. export ninja=$(command -v ninja)
  40. [ -z "${ninja}" ] && export ninja=$(command -v ninja-build)
  41. export CFLAGS="-g -coverage"
  42. meson .. || cat meson-logs/meson-log.txt >&2
  43. ${ninja}
  44. - name: Run tests
  45. run: |
  46. cd build
  47. if ! meson test ; then
  48. cat meson-logs/testlog.txt >&2
  49. exit -1
  50. fi
  51. - name: Show full test logs
  52. run: cat build/meson-logs/testlog.txt >&2
  53. container:
  54. image: ${{matrix.os}}
  55. env:
  56. DISTRO: ${{matrix.os}}
  57. options: --privileged --device /dev/loop-control
  58. # vim:set ts=2 sw=2 et: