build.yml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. name: auto CI
  2. on:
  3. push:
  4. branches: [ master ]
  5. pull_request:
  6. branches: [ master ]
  7. schedule:
  8. - cron: "0 2 * * 1-5"
  9. jobs:
  10. build:
  11. strategy:
  12. matrix:
  13. os: [ubuntu-latest, macos-latest, windows-latest]
  14. include:
  15. - os: ubuntu-latest
  16. path: ~/.cache/pip
  17. - os: macos-latest
  18. path: ~/Library/Caches/pip
  19. - os: windows-latest
  20. path: ~\AppData\Local\pip\Cache
  21. runs-on: ubuntu-latest
  22. steps:
  23. - uses: actions/checkout@v2
  24. - uses: actions/cache@v2
  25. if: startsWith(runner.os, 'Linux')
  26. with:
  27. path: ~/.local/share/renv
  28. key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }}
  29. restore-keys: |
  30. ${{ runner.os }}-renv-
  31. - uses: actions/cache@v2
  32. if: startsWith(runner.os, 'macOS')
  33. with:
  34. path: ~/Library/Application Support/renv
  35. key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }}
  36. restore-keys: |
  37. ${{ runner.os }}-renv-
  38. - uses: actions/cache@v2
  39. if: startsWith(runner.os, 'Windows')
  40. with:
  41. path: ~\AppData\Local\renv
  42. key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }}
  43. restore-keys: |
  44. ${{ runner.os }}-renv-