build.yml 1.7 KB

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