build_and_test.yaml 2.8 KB

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