build.yaml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. name: build
  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_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://paddlers.bj.bcebos.com/dependencies/gdal/GDAL-3.3.3-cp37-cp37m-win_amd64.whl
  27. - python-version: "3.7"
  28. os: ubuntu-latest
  29. gdal-whl-url: https://paddlers.bj.bcebos.com/dependencies/gdal/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://paddlers.bj.bcebos.com/dependencies/gdal/GDAL-3.3.3-cp38-cp38-win_amd64.whl
  33. - python-version: "3.8"
  34. os: ubuntu-latest
  35. gdal-whl-url: https://paddlers.bj.bcebos.com/dependencies/gdal/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.4.0 -i https://pypi.tuna.tsinghua.edu.cn/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: Test installation
  54. run: python -c "import paddlers; print(paddlers.__version__)"