build_servers_cmake.yml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. name: Build servers with CMake
  2. # build_servers_cmake.yml
  3. concurrency:
  4. group: ${{ github.repository }}-${{ github.workflow }}-${{ github.ref }}
  5. cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
  6. on:
  7. workflow_dispatch:
  8. push:
  9. branches:
  10. - master
  11. pull_request:
  12. paths:
  13. # Always trigger all Github Actions if an action or something CI related was changed
  14. - '.github/workflows/**'
  15. - 'tools/ci/**'
  16. # This workflow should run when a file in a source directory has been modified.
  17. - 'src/**'
  18. - '3rdparty/**'
  19. # This workflow should run whenever a CMake related file has been modified
  20. - '**/CMakeLists.txt'
  21. jobs:
  22. build:
  23. # Github Actions checks for '[ci skip]', '[skip ci]', '[no ci]', '[skip actions]', or '[actions skip]' but not a hyphenated version.
  24. # It's a catch-all incase a Pull Request has been opened and someone is on auto-pilot.
  25. if: "!contains(github.event.head_commit.message, 'ci-skip')"
  26. runs-on: ${{ matrix.os }}
  27. strategy:
  28. matrix:
  29. # The ubuntu-latest label currently points to ubuntu-24.04.
  30. # Available: ubuntu-24.04, ubuntu-22.04
  31. os: [ubuntu-latest]
  32. steps:
  33. - uses: actions/checkout@v4
  34. # Install latest CMake.
  35. - uses: lukka/get-cmake@latest
  36. - name: Create build directory
  37. run: mkdir cbuild
  38. - name: Create Unix Makefiles
  39. run: |
  40. cd cbuild
  41. cmake -G "Unix Makefiles" ..
  42. - name: Command - make
  43. run: |
  44. cd cbuild
  45. make