build.yml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. - centos:7
  13. - centos:8
  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 tang
  31. run: |
  32. mkdir -p build && cd build
  33. export ninja=$(command -v ninja)
  34. [ -z "${ninja}" ] && export ninja=$(command -v ninja-build)
  35. meson .. || cat meson-logs/meson-log.txt >&2
  36. ${ninja}
  37. - name: Run tests
  38. run: |
  39. cd build
  40. if ! meson test ; then
  41. cat meson-logs/testlog.txt >&2
  42. exit -1
  43. fi
  44. - name: Show full test logs
  45. run: |
  46. if [ -r build/meson-logs/testlog.txt ]; then
  47. cat build/meson-logs/testlog.txt >&2
  48. else
  49. echo "No test log available" >&2
  50. fi
  51. container:
  52. image: ${{matrix.os}}
  53. env:
  54. DISTRO: ${{matrix.os}}
  55. # vim:set ts=2 sw=2 et: