ci.yml 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. name: CI
  2. on: [push, pull_request]
  3. jobs:
  4. build_linux:
  5. runs-on: ubuntu-latest
  6. steps:
  7. - uses: actions/checkout@v1
  8. - name: Download LLVM, botan
  9. run: sudo apt-get install llvm-11 clang-11 libbotan-2-dev botan
  10. - name: build odin
  11. run: ./build_odin.sh release
  12. - name: Odin version
  13. run: ./odin version
  14. timeout-minutes: 1
  15. - name: Odin report
  16. run: ./odin report
  17. timeout-minutes: 1
  18. - name: Odin check
  19. run: ./odin check examples/demo -vet
  20. timeout-minutes: 10
  21. - name: Odin run
  22. run: ./odin run examples/demo
  23. timeout-minutes: 10
  24. - name: Odin run -debug
  25. run: ./odin run examples/demo -debug
  26. timeout-minutes: 10
  27. - name: Odin check examples/all
  28. run: ./odin check examples/all -strict-style
  29. timeout-minutes: 10
  30. - name: Core library tests
  31. run: |
  32. cd tests/core
  33. make
  34. timeout-minutes: 10
  35. - name: Vendor library tests
  36. run: |
  37. cd tests/vendor
  38. make
  39. timeout-minutes: 10
  40. - name: Odin check examples/all for Linux i386
  41. run: ./odin check examples/all -vet -strict-style -target:linux_i386
  42. timeout-minutes: 10
  43. - name: Odin check examples/all for FreeBSD amd64
  44. run: ./odin check examples/all -vet -strict-style -target:freebsd_amd64
  45. timeout-minutes: 10
  46. - name: Odin check examples/all for OpenBSD amd64
  47. run: ./odin check examples/all -vet -strict-style -target:openbsd_amd64
  48. timeout-minutes: 10
  49. build_macOS:
  50. runs-on: macos-latest
  51. steps:
  52. - uses: actions/checkout@v1
  53. - name: Download LLVM, botan and setup PATH
  54. run: |
  55. brew install llvm@11 botan
  56. echo "/usr/local/opt/llvm@11/bin" >> $GITHUB_PATH
  57. TMP_PATH=$(xcrun --show-sdk-path)/user/include
  58. echo "CPATH=$TMP_PATH" >> $GITHUB_ENV
  59. - name: build odin
  60. run: ./build_odin.sh release
  61. - name: Odin version
  62. run: ./odin version
  63. timeout-minutes: 1
  64. - name: Odin report
  65. run: ./odin report
  66. timeout-minutes: 1
  67. - name: Odin check
  68. run: ./odin check examples/demo -vet
  69. timeout-minutes: 10
  70. - name: Odin run
  71. run: ./odin run examples/demo
  72. timeout-minutes: 10
  73. - name: Odin run -debug
  74. run: ./odin run examples/demo -debug
  75. timeout-minutes: 10
  76. - name: Odin check examples/all
  77. run: ./odin check examples/all -strict-style
  78. timeout-minutes: 10
  79. - name: Core library tests
  80. run: |
  81. cd tests/core
  82. make
  83. timeout-minutes: 10
  84. - name: Vendor library tests
  85. run: |
  86. cd tests/vendor
  87. make
  88. timeout-minutes: 10
  89. - name: Odin check examples/all for Darwin arm64
  90. run: ./odin check examples/all -vet -strict-style -target:darwin_arm64
  91. timeout-minutes: 10
  92. - name: Odin check examples/all for Linux arm64
  93. run: ./odin check examples/all -vet -strict-style -target:linux_arm64
  94. timeout-minutes: 10
  95. build_windows:
  96. runs-on: windows-2019
  97. steps:
  98. - uses: actions/checkout@v1
  99. - name: build Odin
  100. shell: cmd
  101. run: |
  102. call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat
  103. ./build.bat 1
  104. - name: Odin version
  105. run: ./odin version
  106. timeout-minutes: 1
  107. - name: Odin report
  108. run: ./odin report
  109. timeout-minutes: 1
  110. - name: Odin check
  111. shell: cmd
  112. run: |
  113. call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat
  114. odin check examples/demo -vet
  115. timeout-minutes: 10
  116. - name: Odin run
  117. shell: cmd
  118. run: |
  119. call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat
  120. odin run examples/demo
  121. timeout-minutes: 10
  122. - name: Odin run -debug
  123. shell: cmd
  124. run: |
  125. call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat
  126. odin run examples/demo -debug
  127. timeout-minutes: 10
  128. - name: Odin check examples/all
  129. shell: cmd
  130. run: |
  131. call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat
  132. odin check examples/all -strict-style
  133. timeout-minutes: 10
  134. - name: Core library tests
  135. shell: cmd
  136. run: |
  137. call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat
  138. cd tests\core
  139. call build.bat
  140. timeout-minutes: 10
  141. - name: Vendor library tests
  142. shell: cmd
  143. run: |
  144. call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat
  145. cd tests\vendor
  146. call build.bat
  147. timeout-minutes: 10
  148. - name: core:math/big tests
  149. shell: cmd
  150. run: |
  151. call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat
  152. cd tests\core\math\big
  153. call build.bat
  154. timeout-minutes: 10
  155. - name: Odin check examples/all for Windows 32bits
  156. shell: cmd
  157. run: |
  158. call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat
  159. odin check examples/all -strict-style -target:windows_i386
  160. timeout-minutes: 10