build.yml 1.5 KB

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