ci.yml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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
  9. run: sudo apt-get install llvm-11 clang-11 llvm
  10. - name: build odin
  11. run: make release
  12. - name: Odin version
  13. run: ./odin version
  14. timeout-minutes: 1
  15. - name: Odin check
  16. run: ./odin check examples/demo/demo.odin -vet
  17. timeout-minutes: 10
  18. - name: Odin run
  19. run: ./odin run examples/demo/demo.odin
  20. timeout-minutes: 10
  21. build_macOS:
  22. runs-on: macos-latest
  23. steps:
  24. - uses: actions/checkout@v1
  25. - name: Download LLVM and setup PATH
  26. run: |
  27. brew install llvm@11
  28. echo "/usr/local/opt/llvm@11/bin" >> $GITHUB_PATH
  29. TMP_PATH=$(xcrun --show-sdk-path)/user/include
  30. echo "CPATH=$TMP_PATH" >> $GITHUB_ENV
  31. - name: build odin
  32. run: make release
  33. - name: Odin version
  34. run: ./odin version
  35. timeout-minutes: 1
  36. - name: Odin check
  37. run: ./odin check examples/demo/demo.odin -vet
  38. timeout-minutes: 10
  39. - name: Odin run
  40. run: ./odin run examples/demo/demo.odin
  41. timeout-minutes: 10
  42. build_windows:
  43. runs-on: windows-latest
  44. steps:
  45. - uses: actions/checkout@v1
  46. - name: build Odin
  47. shell: cmd
  48. run: |
  49. call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat
  50. ./build.bat 1
  51. - name: Odin version
  52. run: ./odin version
  53. timeout-minutes: 1
  54. - name: Odin check
  55. shell: cmd
  56. run: |
  57. call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat
  58. odin check examples/demo/demo.odin -vet
  59. timeout-minutes: 10
  60. - name: Odin run
  61. shell: cmd
  62. run: |
  63. call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat
  64. odin run examples/demo/demo.odin
  65. timeout-minutes: 10