ci.yml 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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-22.04, windows-2022, macOS-14]
  9. runs-on: ${{ matrix.os }}
  10. steps:
  11. - uses: actions/checkout@v1
  12. - name: Install dependencies (Ubuntu)
  13. if: matrix.os == 'ubuntu-22.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.16/panda3d-1.10.16-tools-win64.zip", "thirdparty-tools.zip")
  23. Expand-Archive -Path thirdparty-tools.zip
  24. Move-Item -Path thirdparty-tools/panda3d-1.10.16/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.16/panda3d-1.10.16-tools-mac.tar.gz
  29. tar -xf panda3d-1.10.16-tools-mac.tar.gz
  30. mv panda3d-1.10.16/thirdparty thirdparty
  31. rmdir panda3d-1.10.16
  32. (cd thirdparty/darwin-libs-a && rm -rf rocket)
  33. - name: Set up Python 3.14
  34. uses: actions/setup-python@v5
  35. with:
  36. python-version: '3.14'
  37. - name: Build Python 3.14
  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 --msvc-version=14.3
  41. - name: Test Python 3.14
  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.13
  47. uses: actions/setup-python@v5
  48. with:
  49. python-version: '3.13'
  50. - name: Build Python 3.13
  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 --msvc-version=14.3
  54. - name: Test Python 3.13
  55. shell: bash
  56. run: |
  57. python -m pip install pytest setuptools
  58. PYTHONPATH=built LD_LIBRARY_PATH=built/lib:$pythonLocation/lib DYLD_LIBRARY_PATH=built/lib python -m pytest
  59. - name: Set up Python 3.12
  60. uses: actions/setup-python@v5
  61. with:
  62. python-version: '3.12'
  63. - name: Build Python 3.12
  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 --msvc-version=14.3
  67. - name: Test Python 3.12
  68. shell: bash
  69. run: |
  70. python -m pip install pytest setuptools
  71. PYTHONPATH=built LD_LIBRARY_PATH=built/lib:$pythonLocation/lib DYLD_LIBRARY_PATH=built/lib python -m pytest
  72. - name: Set up Python 3.11
  73. uses: actions/setup-python@v5
  74. with:
  75. python-version: '3.11'
  76. - name: Build Python 3.11
  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 --msvc-version=14.3
  80. - name: Test Python 3.11
  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.10
  86. uses: actions/setup-python@v5
  87. with:
  88. python-version: '3.10'
  89. - name: Build Python 3.10
  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 --msvc-version=14.3
  93. - name: Test Python 3.10
  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: Set up Python 3.9
  99. uses: actions/setup-python@v5
  100. with:
  101. python-version: '3.9'
  102. - name: Build Python 3.9
  103. shell: bash
  104. run: |
  105. 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 --msvc-version=14.3
  106. - name: Test Python 3.9
  107. shell: bash
  108. run: |
  109. python -m pip install pytest
  110. PYTHONPATH=built LD_LIBRARY_PATH=built/lib:$pythonLocation/lib DYLD_LIBRARY_PATH=built/lib python -m pytest
  111. - name: Set up Python 3.8
  112. uses: actions/setup-python@v5
  113. with:
  114. python-version: '3.8'
  115. - name: Build Python 3.8
  116. shell: bash
  117. run: |
  118. 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 --msvc-version=14.3
  119. - name: Test Python 3.8
  120. shell: bash
  121. run: |
  122. python -m pip install pytest
  123. PYTHONPATH=built LD_LIBRARY_PATH=built/lib:$pythonLocation/lib DYLD_LIBRARY_PATH=built/lib python -m pytest
  124. - name: Remove p3dcparse
  125. if: matrix.os == 'ubuntu-22.04'
  126. run: |
  127. rm -f built/bin/p3dcparse
  128. - name: Make installer
  129. run: |
  130. python makepanda/makepackage.py --verbose --lzma