ci.yml 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. name: CI
  2. # Controls when the workflow will run
  3. on:
  4. push:
  5. branches: [ master ]
  6. pull_request:
  7. branches: [ master ]
  8. jobs:
  9. build-html5:
  10. runs-on: ubuntu-latest
  11. strategy:
  12. fail-fast: false
  13. steps:
  14. - uses: actions/checkout@master
  15. - uses: mymindstorm/setup-emsdk@v9
  16. - name: build project template
  17. run: |
  18. echo "building html5..."
  19. git clone --recursive https://github.com/MrFrenik/gs_project_template
  20. cd gs_project_template
  21. cd third_party/include/gs
  22. git checkout master
  23. git pull
  24. cd ../../..
  25. echo "building project template..."
  26. bash ./proc/html5/*.sh
  27. - name: build examples
  28. run: |
  29. git clone --recursive https://github.com/MrFrenik/gs_examples
  30. cd gs_examples
  31. cd third_party/include/gs
  32. git checkout master
  33. git pull
  34. cd ../../..
  35. echo "building examples..."
  36. for d in */ ; do
  37. echo $d
  38. cd $d
  39. if [ -f "proc/html5/emcc.sh" ];then
  40. bash proc/html5/*.sh
  41. fi
  42. cd ..
  43. done
  44. - uses: actions/upload-artifact@v2
  45. with:
  46. name: html5 artifacts
  47. path: gs_examples/*[0-9][0-9]*
  48. retention-days: 7
  49. build-linux:
  50. runs-on: ubuntu-latest
  51. strategy:
  52. fail-fast: false
  53. steps:
  54. - uses: actions/checkout@master
  55. - name: install all dependencies
  56. run: |
  57. sudo apt-get update
  58. sudo apt-get install -y gcc-10
  59. sudo apt install git gcc mesa-common-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev
  60. - name: build project template
  61. run: |
  62. echo "building linux..."
  63. git clone --recursive https://github.com/MrFrenik/gs_project_template
  64. cd gs_project_template
  65. cd third_party/include/gs
  66. git checkout master
  67. git pull
  68. cd ../../..
  69. echo "building project template..."
  70. bash ./proc/linux/gcc.sh
  71. - name: build examples
  72. run: |
  73. git clone --recursive https://github.com/MrFrenik/gs_examples
  74. cd gs_examples
  75. cd third_party/include/gs
  76. git checkout master
  77. git pull
  78. cd ../../..
  79. echo "building examples..."
  80. bash ./build-all.sh
  81. - uses: actions/upload-artifact@v2
  82. with:
  83. name: Linux artifacts
  84. path: gs_examples/*[0-9][0-9]*
  85. retention-days: 7
  86. build_windows:
  87. runs-on: windows-latest
  88. strategy:
  89. fail-fast: false
  90. steps:
  91. - uses: actions/checkout@master
  92. - uses: ilammy/msvc-dev-cmd@v1
  93. - name: build project template
  94. run: |
  95. echo "build linux..."
  96. git clone --recursive https://github.com/MrFrenik/gs_project_template
  97. cd gs_project_template
  98. cd third_party\include\gs
  99. git checkout master
  100. git pull
  101. cd ..\..\..
  102. echo "building project template..."
  103. proc\win\cl.bat
  104. - name: build examples
  105. run: |
  106. git clone --recursive https://github.com/MrFrenik/gs_examples
  107. cd gs_examples
  108. cd third_party\include\gs
  109. git checkout master
  110. git pull
  111. cd ..\..\..
  112. echo "building examples..."
  113. bash ./build-all.sh
  114. - uses: actions/upload-artifact@v2
  115. with:
  116. name: Windows artifacts
  117. path: gs_examples/*[0-9][0-9]*
  118. retention-days: 7
  119. build-osx:
  120. runs-on: macOS-latest
  121. strategy:
  122. fail-fast: false
  123. steps:
  124. - uses: actions/checkout@master
  125. - name: build project template
  126. run: |
  127. echo "building osx..."
  128. git clone --recursive https://github.com/MrFrenik/gs_project_template
  129. cd gs_project_template
  130. cd third_party/include/gs
  131. git checkout master
  132. git pull
  133. cd ../../..
  134. echo "building project template..."
  135. bash ./proc/osx/gcc.sh
  136. - name: build examples
  137. run: |
  138. git clone --recursive https://github.com/MrFrenik/gs_examples
  139. cd gs_examples
  140. cd third_party/include/gs
  141. git checkout master
  142. git pull
  143. cd ../../..
  144. echo "building examples..."
  145. bash ./build-all.sh
  146. - uses: actions/upload-artifact@v2
  147. with:
  148. name: MacOSX artifacts
  149. path: gs_examples/*[0-9][0-9]*
  150. retention-days: 7