ci.yml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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-20.04, windows-2019, macOS-11]
  9. runs-on: ${{ matrix.os }}
  10. steps:
  11. - uses: actions/checkout@v1
  12. - name: Install dependencies (Ubuntu)
  13. if: matrix.os == 'ubuntu-20.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.14/panda3d-1.10.14-tools-win64.zip", "thirdparty-tools.zip")
  23. Expand-Archive -Path thirdparty-tools.zip
  24. Move-Item -Path thirdparty-tools/panda3d-1.10.14/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.14/panda3d-1.10.14-tools-mac.tar.gz
  29. tar -xf panda3d-1.10.14-tools-mac.tar.gz
  30. mv panda3d-1.10.14/thirdparty thirdparty
  31. rmdir panda3d-1.10.14
  32. (cd thirdparty/darwin-libs-a && rm -rf rocket)
  33. - name: Set up Python 3.12
  34. uses: actions/setup-python@v4
  35. with:
  36. python-version: '3.12'
  37. - name: Build Python 3.12
  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.12
  42. shell: bash
  43. run: |
  44. python -m pip install pytest setuptools
  45. PYTHONPATH=built LD_LIBRARY_PATH=built/lib:$pythonLocation/lib DYLD_LIBRARY_PATH=built/lib python -m pytest
  46. - name: Set up Python 3.11
  47. uses: actions/setup-python@v4
  48. with:
  49. python-version: '3.11'
  50. - name: Build Python 3.11
  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.11
  55. shell: bash
  56. run: |
  57. python -m pip install pytest
  58. PYTHONPATH=built LD_LIBRARY_PATH=built/lib:$pythonLocation/lib DYLD_LIBRARY_PATH=built/lib python -m pytest
  59. - name: Set up Python 3.10
  60. uses: actions/setup-python@v4
  61. with:
  62. python-version: '3.10'
  63. - name: Build Python 3.10
  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.10
  68. shell: bash
  69. run: |
  70. python -m pip install pytest
  71. PYTHONPATH=built LD_LIBRARY_PATH=built/lib:$pythonLocation/lib DYLD_LIBRARY_PATH=built/lib python -m pytest
  72. - name: Set up Python 3.9
  73. uses: actions/setup-python@v4
  74. with:
  75. python-version: '3.9'
  76. - name: Build Python 3.9
  77. shell: bash
  78. run: |
  79. 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
  80. - name: Test Python 3.9
  81. shell: bash
  82. run: |
  83. python -m pip install pytest
  84. PYTHONPATH=built LD_LIBRARY_PATH=built/lib:$pythonLocation/lib DYLD_LIBRARY_PATH=built/lib python -m pytest
  85. - name: Set up Python 3.8
  86. uses: actions/setup-python@v4
  87. with:
  88. python-version: '3.8'
  89. - name: Build Python 3.8
  90. shell: bash
  91. run: |
  92. 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
  93. - name: Test Python 3.8
  94. shell: bash
  95. run: |
  96. python -m pip install pytest
  97. PYTHONPATH=built LD_LIBRARY_PATH=built/lib:$pythonLocation/lib DYLD_LIBRARY_PATH=built/lib python -m pytest
  98. - name: Make installer
  99. run: |
  100. python makepanda/makepackage.py --verbose --lzma