build.yml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. name: build
  2. on:
  3. push:
  4. pull_request:
  5. jobs:
  6. Linux:
  7. runs-on: ubuntu-22.04
  8. strategy:
  9. fail-fast: false
  10. matrix:
  11. build_type:
  12. - debug
  13. - release
  14. compiler:
  15. - gcc
  16. - clang
  17. arch:
  18. - x86
  19. - x64
  20. steps:
  21. - uses: actions/checkout@v3
  22. - uses: actions/checkout@v3
  23. with:
  24. repository: ocornut/imgui
  25. path: imgui
  26. - name: Dependencies
  27. run: sudo apt-get install g++-multilib
  28. - name: Configure
  29. run: cmake -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} -DCMAKE_C_COMPILER=${{ matrix.compiler }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DGCC_ARCH=${{ matrix.arch }} -B cmake-build -S .github
  30. - name: Build
  31. run: cmake --build cmake-build --parallel $(nproc)
  32. - name: Run
  33. run: |
  34. file cmake-build/example_implot
  35. cmake-build/example_implot
  36. MacOS:
  37. runs-on: macos-11
  38. strategy:
  39. fail-fast: false
  40. matrix:
  41. build_type:
  42. - debug
  43. - release
  44. arch:
  45. - x86_64
  46. - arm64
  47. steps:
  48. - uses: actions/checkout@v3
  49. - uses: actions/checkout@v3
  50. with:
  51. repository: ocornut/imgui
  52. path: imgui
  53. - name: Configure
  54. shell: bash
  55. run: cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DOSX_ARCH=${{ matrix.arch }} -B cmake-build -S .github
  56. - name: Build
  57. shell: bash
  58. run: cmake --build cmake-build --parallel $(sysctl -n hw.ncpu)
  59. - name: Run
  60. if: matrix.arch == 'x86_64' # github's CI hosts seem to be running intel and can not run ARM
  61. run: |
  62. file cmake-build/example_implot
  63. cmake-build/example_implot
  64. Windows_MSVC:
  65. runs-on: windows-2022
  66. strategy:
  67. fail-fast: false
  68. matrix:
  69. build_type:
  70. - debug
  71. - release
  72. arch:
  73. - Win32
  74. - x64
  75. steps:
  76. - uses: actions/checkout@v3
  77. - uses: actions/checkout@v3
  78. with:
  79. repository: ocornut/imgui
  80. path: imgui
  81. - name: Configure
  82. shell: bash
  83. run: cmake -G 'Visual Studio 17 2022' -A ${{ matrix.arch }} -B cmake-build -S .github
  84. - name: Build
  85. shell: bash
  86. run: cmake --build cmake-build -- -p:Configuration=${{ matrix.build_type }} -maxcpucount:$NUMBER_OF_PROCESSORS
  87. - name: Run
  88. run: .\cmake-build\${{matrix.build_type}}\example_implot.exe
  89. Windows_MingW: # MingW on Github CI does not fully support 32 bits: link fails when it tries to link 64 bits system libraries.
  90. runs-on: windows-2022
  91. strategy:
  92. fail-fast: false
  93. matrix:
  94. build_type:
  95. - debug
  96. - release
  97. arch:
  98. - x64
  99. # - Win32
  100. steps:
  101. - uses: actions/checkout@v3
  102. - uses: actions/checkout@v3
  103. with:
  104. repository: ocornut/imgui
  105. path: imgui
  106. - name: Configure
  107. shell: bash
  108. run: cmake -G 'MinGW Makefiles' -DGCC_ARCH=${{ matrix.arch }} -B cmake-build -S .github
  109. - name: Build
  110. shell: bash
  111. run: cmake --build cmake-build --parallel $NUMBER_OF_PROCESSORS
  112. - name: Run (MingW)
  113. run: .\cmake-build\example_implot.exe