build_and_test.yaml 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. name: build and test
  2. on:
  3. push:
  4. branches:
  5. - develop
  6. paths-ignore:
  7. - "docs/**"
  8. - "README.md"
  9. pull_request:
  10. branches:
  11. - develop
  12. concurrency:
  13. group: ${{ github.workflow }}-${{ github.ref }}
  14. cancel-in-progress: true
  15. jobs:
  16. build_and_test_cpu:
  17. runs-on: ${{ matrix.os }}
  18. strategy:
  19. matrix:
  20. os: [ubuntu-latest, windows-latest]
  21. python-version: ["3.7", "3.8"]
  22. include:
  23. - python-version: "3.7"
  24. os: windows-latest
  25. gdal-whl-url: https://download.lfd.uci.edu/pythonlibs/archived/cp37/GDAL-3.3.3-cp37-cp37m-win_amd64.whl
  26. - python-version: "3.7"
  27. os: ubuntu-latest
  28. gdal-whl-url: https://versaweb.dl.sourceforge.net/project/gdal-wheels-for-linux/GDAL-3.4.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
  29. - python-version: "3.8"
  30. os: windows-latest
  31. gdal-whl-url: https://download.lfd.uci.edu/pythonlibs/archived/GDAL-3.3.3-cp38-cp38-win_amd64.whl
  32. - python-version: "3.8"
  33. os: ubuntu-latest
  34. gdal-whl-url: https://versaweb.dl.sourceforge.net/project/gdal-wheels-for-linux/GDAL-3.4.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl
  35. steps:
  36. - uses: actions/checkout@v3
  37. - name: Set up Python ${{ matrix.python-version }}
  38. uses: actions/setup-python@v4
  39. with:
  40. python-version: ${{ matrix.python-version }}
  41. - name: Upgrade pip
  42. run: python -m pip install pip --upgrade --user
  43. - name: Install PaddlePaddle
  44. run: python -m pip install paddlepaddle==2.3.1 -i https://mirror.baidu.com/pypi/simple
  45. - name: Install PaddleRS
  46. run: |
  47. python -m pip install -r requirements.txt
  48. python -m pip install -e .
  49. - name: Install GDAL
  50. run: python -m pip install ${{ matrix.gdal-whl-url }}
  51. - name: Run unittests
  52. run: |
  53. cd tests
  54. bash run_fast_tests.sh
  55. shell: bash
  56. build_and_test_cuda102:
  57. runs-on: ubuntu-18.04
  58. container:
  59. image: registry.baidubce.com/paddlepaddle/paddle:2.3.1-gpu-cuda10.2-cudnn7
  60. steps:
  61. - uses: actions/checkout@v3
  62. - name: Upgrade pip
  63. run: python3.7 -m pip install pip --upgrade --user
  64. - name: Install PaddleRS
  65. run: |
  66. python3.7 -m pip install -r requirements.txt
  67. python3.7 -m pip install -e .
  68. - name: Install GDAL
  69. run: python3.7 -m pip install https://versaweb.dl.sourceforge.net/project/gdal-wheels-for-linux/GDAL-3.4.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
  70. # Do not run unittests, because there is NO GPU in the machine.
  71. # - name: Run unittests
  72. # run: |
  73. # cd tests
  74. # bash run_fast_tests.sh
  75. # shell: bash