build-linux-gcc.yml 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. name: Linux Build
  2. on:
  3. push:
  4. branches: [development]
  5. pull_request:
  6. branches: [development]
  7. env:
  8. build_type: "Release"
  9. cc: "gcc"
  10. cxx: "g++"
  11. concurrency:
  12. group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-linux
  13. cancel-in-progress: true
  14. permissions:
  15. checks: write
  16. jobs:
  17. build-linux:
  18. if: github.repository == 'TorqueGameEngines/Torque3D'
  19. name: ${{matrix.config.name}}
  20. runs-on: ubuntu-latest
  21. strategy:
  22. fail-fast: false
  23. matrix:
  24. config:
  25. - {
  26. name: "Ubuntu Latest GCC",
  27. build_type: "Release",
  28. cc: "gcc",
  29. cxx: "g++",
  30. generator: "Ninja"
  31. }
  32. steps:
  33. - uses: actions/checkout@v4
  34. - name: Print env
  35. run: |
  36. echo github.event.action: ${{ github.event.action }}
  37. echo github.event_name: ${{ github.event_name }}
  38. - name: Run GIT Init
  39. run: git init
  40. - name: Setup GCC problem matcher
  41. uses: ammaraskar/gcc-problem-matcher@master
  42. - name: Install Linux Dependencies
  43. run: |
  44. sudo apt-get install ninja-build
  45. ninja --version
  46. cmake --version
  47. gcc --version
  48. sudo apt-get update && \
  49. sudo apt-get install -y \
  50. build-essential \
  51. nasm \
  52. libogg-dev \
  53. libxft-dev \
  54. libx11-dev \
  55. libxxf86vm-dev \
  56. libopenal-dev \
  57. libfreetype6-dev \
  58. libxcursor-dev \
  59. libxinerama-dev \
  60. libxi-dev \
  61. libxrandr-dev \
  62. libxss-dev \
  63. libglu1-mesa-dev \
  64. libgtk-3-dev
  65. - name: Configure, Build & Install
  66. uses: threeal/[email protected]
  67. with:
  68. source-dir: ${{github.workspace}}
  69. build-dir: ${{github.workspace}}/build
  70. c-compiler: ${{matrix.config.cc}}
  71. cxx-compiler: ${{matrix.config.cxx}}
  72. generator: ${{matrix.config.generator}}
  73. options: CMAKE_BUILD_TYPE=${{matrix.config.build_type}} TORQUE_APP_NAME=Torque3D TORQUE_TESTING=ON
  74. run-build: true
  75. build-args: --config ${{matrix.config.build_type}} --target install
  76. - name: Unit Tests
  77. run: |
  78. cd "${{github.workspace}}/My Projects/Torque3D/game"
  79. ./Torque3D runTests.tscript
  80. - name: Test Reporter
  81. uses: phoenix-actions/test-reporting@v14
  82. with:
  83. name: Linux test results
  84. path: "**/My Projects/Torque3D/game/test_detail.xml"
  85. reporter: java-junit
  86. fail-on-error: false
  87. if: github.event_name != 'pull_request'