ci.yml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. name: Continuous Integration
  2. on: [push, pull_request]
  3. jobs:
  4. makepanda:
  5. if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"
  6. strategy:
  7. matrix:
  8. os: [ubuntu-18.04, windows-2019, macOS-10.15]
  9. runs-on: ${{ matrix.os }}
  10. steps:
  11. - uses: actions/checkout@v1
  12. - name: Install dependencies (Ubuntu)
  13. if: matrix.os == 'ubuntu-18.04'
  14. run: |
  15. sudo apt-get update
  16. sudo apt-get install build-essential bison flex libfreetype6-dev libgl1-mesa-dev libjpeg-dev libode-dev libopenal-dev libpng-dev libssl-dev libvorbis-dev libx11-dev libxcursor-dev libxrandr-dev nvidia-cg-toolkit zlib1g-dev
  17. - name: Get thirdparty packages (Windows)
  18. if: runner.os == 'Windows'
  19. shell: powershell
  20. run: |
  21. $wc = New-Object System.Net.WebClient
  22. $wc.DownloadFile("https://www.panda3d.org/download/panda3d-1.10.11/panda3d-1.10.11-tools-win64.zip", "thirdparty-tools.zip")
  23. Expand-Archive -Path thirdparty-tools.zip
  24. Move-Item -Path thirdparty-tools/panda3d-1.10.11/thirdparty -Destination .
  25. - name: Get thirdparty packages (macOS)
  26. if: runner.os == 'macOS'
  27. run: |
  28. curl -O https://www.panda3d.org/download/panda3d-1.10.11/panda3d-1.10.11-tools-mac.tar.gz
  29. tar -xf panda3d-1.10.11-tools-mac.tar.gz
  30. mv panda3d-1.10.11/thirdparty thirdparty
  31. rmdir panda3d-1.10.11
  32. (cd thirdparty/darwin-libs-a && rm -rf rocket)
  33. - name: Set up Python 3.9
  34. uses: actions/setup-python@v2
  35. with:
  36. python-version: 3.9
  37. - name: Build Python 3.9
  38. shell: bash
  39. run: |
  40. python makepanda/makepanda.py --git-commit=${{github.sha}} --outputdir=built --everything --no-eigen --python-incdir="$pythonLocation/include" --python-libdir="$pythonLocation/lib" --verbose --threads=4 --windows-sdk=10
  41. - name: Test Python 3.9
  42. shell: bash
  43. run: |
  44. python -m pip install pytest
  45. PYTHONPATH=built LD_LIBRARY_PATH=built/lib DYLD_LIBRARY_PATH=built/lib python -m pytest
  46. - name: Set up Python 3.8
  47. uses: actions/setup-python@v2
  48. with:
  49. python-version: 3.8
  50. - name: Build Python 3.8
  51. shell: bash
  52. run: |
  53. python makepanda/makepanda.py --git-commit=${{github.sha}} --outputdir=built --everything --no-eigen --python-incdir="$pythonLocation/include" --python-libdir="$pythonLocation/lib" --verbose --threads=4 --windows-sdk=10
  54. - name: Test Python 3.8
  55. shell: bash
  56. run: |
  57. python -m pip install pytest
  58. PYTHONPATH=built LD_LIBRARY_PATH=built/lib DYLD_LIBRARY_PATH=built/lib python -m pytest
  59. - name: Set up Python 3.7
  60. uses: actions/setup-python@v2
  61. with:
  62. python-version: 3.7
  63. - name: Build Python 3.7
  64. shell: bash
  65. run: |
  66. python makepanda/makepanda.py --git-commit=${{github.sha}} --outputdir=built --everything --no-eigen --python-incdir="$pythonLocation/include" --python-libdir="$pythonLocation/lib" --verbose --threads=4 --windows-sdk=10
  67. - name: Test Python 3.7
  68. shell: bash
  69. run: |
  70. python -m pip install pytest
  71. PYTHONPATH=built LD_LIBRARY_PATH=built/lib DYLD_LIBRARY_PATH=built/lib python -m pytest
  72. - name: Make installer
  73. run: |
  74. python makepanda/makepackage.py --verbose --lzma