harvey.yml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. name: harvey
  2. on:
  3. push:
  4. branches: [ main ]
  5. pull_request:
  6. branches: [ main ]
  7. jobs:
  8. build:
  9. runs-on: ${{ matrix.os }}
  10. strategy:
  11. matrix:
  12. os: [ubuntu-18.04]
  13. cc:
  14. - gcc-9
  15. # - clang
  16. # - clang-9
  17. - clang-10
  18. go:
  19. - 1.15
  20. steps:
  21. - uses: actions/checkout@v2
  22. - name: install deps
  23. run: |
  24. sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y # see https://wiki.ubuntu.com/ToolChain
  25. wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
  26. sudo add-apt-repository 'deb https://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main' -y
  27. sudo apt-get update
  28. sudo apt-get install -y ${{ matrix.cc }} rc qemu go-dep
  29. - name: bootstrap and build
  30. env:
  31. ARCH: amd64
  32. OS: linux
  33. CC: ${{ matrix.cc }}
  34. GO_VERSION: ${{ matrix.go }}
  35. run: ./util/ci.sh # fetches Go release and invokes bootstrap.sh + build
  36. - name: boot
  37. env:
  38. HARVEY: ${{github.workspace}}
  39. run: ./linux_amd64/bin/qtap
  40. - name: checkout-docs
  41. if: ${{ github.ref == 'refs/heads/main' && startsWith(matrix.cc, "clang") }}
  42. uses: actions/checkout@v2
  43. with:
  44. repository: "harvey-os/harvey-os.github.io"
  45. path: ${{github.workspace+ "/harvey-os.github.io" }}
  46. - name: generate-docs
  47. if: ${{ success() }}
  48. run: |
  49. cd ${{github.workspace }}
  50. clang-doc \
  51. --output={{github.workspace+ "/harvey-os.github.io/docs" }} \
  52. --format=md \
  53. -p=${{github.workspace }} \
  54. --project-name='Harvey OS' \
  55. --repository=https://github.com/Harvey-OS/harvey/blob/${{ github.ref}}/ \
  56. ${{github.workspace }}/sys/src/
  57. cd ${{github.workspace }}/harvey-os.github.io
  58. git config user.name github-actions
  59. git config user.email github-actions@github.com
  60. git add .
  61. git commit -m "updating docs from github.com/harvey-os/harvey/tree/${{ github.ref}}"
  62. git push