cmake.yml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. name: CMake
  2. on:
  3. push:
  4. branches: [ development ]
  5. pull_request:
  6. branches: [ development ]
  7. env:
  8. # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
  9. BUILD_TYPE: Release
  10. jobs:
  11. build:
  12. if: github.repository == 'TorqueGameEngines/Torque3D'
  13. # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
  14. # You can convert this to a matrix build if you need cross-platform coverage.
  15. # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
  16. runs-on: ${{matrix.os}}
  17. strategy:
  18. matrix:
  19. os: [ubuntu-latest, macos-latest, windows-latest]
  20. steps:
  21. - uses: actions/checkout@v3
  22. - uses: seanmiddleditch/gha-setup-ninja@master
  23. - uses: ilammy/msvc-dev-cmd@v1
  24. - name: Setup Environment
  25. run: |
  26. if [ "$RUNNER_OS" == "Linux" ]; then
  27. sudo apt-get install -y \
  28. build-essential \
  29. nasm \
  30. libogg-dev \
  31. libxft-dev \
  32. libx11-dev \
  33. libxxf86vm-dev \
  34. libopenal-dev \
  35. libfreetype6-dev \
  36. libxcursor-dev \
  37. libxinerama-dev \
  38. libxi-dev \
  39. libxrandr-dev \
  40. libxss-dev \
  41. libglu1-mesa-dev \
  42. libgtk-3-dev
  43. fi
  44. shell: bash
  45. - name: Configure CMake
  46. # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
  47. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
  48. run: cmake -B ${{github.workspace}}/build -G Ninja -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DTORQUE_APP_NAME=Torque3D
  49. - name: Build
  50. # Build your program with the given configuration
  51. run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}