ci.yml 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554
  1. name: Continuous Integration
  2. on: [push, pull_request]
  3. jobs:
  4. cmake:
  5. name: CMake Buildsystem
  6. if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"
  7. strategy:
  8. fail-fast: false
  9. matrix:
  10. profile:
  11. - ubuntu-bionic-double-standard-unity-makefile
  12. - ubuntu-bionic-coverage-ninja
  13. #- macos-coverage-unity-xcode
  14. - macos-nometa-standard-makefile
  15. - windows-standard-unity-msvc
  16. - windows-nopython-nometa-standard-msvc
  17. include:
  18. - profile: ubuntu-bionic-double-standard-unity-makefile
  19. os: ubuntu-22.04
  20. config: Standard
  21. unity: YES
  22. generator: Unix Makefiles
  23. compiler: Default
  24. metalibs: YES
  25. python: YES
  26. eigen: NO
  27. double: YES
  28. - profile: ubuntu-bionic-coverage-ninja
  29. os: ubuntu-22.04
  30. config: Coverage
  31. unity: NO
  32. generator: Ninja
  33. compiler: Clang
  34. metalibs: YES
  35. python: YES
  36. eigen: NO
  37. double: NO
  38. #- profile: macos-coverage-unity-xcode
  39. # os: macOS-13
  40. # config: Coverage
  41. # unity: YES
  42. # generator: Xcode
  43. # compiler: Default
  44. # metalibs: YES
  45. # python: YES
  46. # eigen: NO
  47. # double: NO
  48. - profile: macos-nometa-standard-makefile
  49. os: macOS-13
  50. config: Standard
  51. unity: NO
  52. generator: Unix Makefiles
  53. compiler: Default
  54. metalibs: NO
  55. python: YES
  56. eigen: NO
  57. double: NO
  58. - profile: windows-standard-unity-msvc
  59. os: windows-2022
  60. config: Standard
  61. unity: YES
  62. generator: Visual Studio 17 2022
  63. compiler: Default
  64. metalibs: YES
  65. python: YES
  66. eigen: NO
  67. double: NO
  68. - profile: windows-nopython-nometa-standard-msvc
  69. os: windows-2022
  70. config: Standard
  71. unity: NO
  72. generator: Visual Studio 17 2022
  73. compiler: Default
  74. metalibs: NO
  75. python: NO
  76. eigen: NO
  77. double: NO
  78. runs-on: ${{ matrix.os }}
  79. steps:
  80. - uses: actions/checkout@v5
  81. with:
  82. fetch-depth: 10
  83. - name: Self-destruct makepanda
  84. run: python3 makepanda/selfdestruct.py --yes
  85. - name: Install dependencies (macOS)
  86. if: runner.os == 'macOS'
  87. run: |
  88. curl -O https://www.panda3d.org/download/panda3d-1.10.15/panda3d-1.10.15-tools-mac.tar.gz
  89. tar -xf panda3d-1.10.15-tools-mac.tar.gz
  90. mv panda3d-1.10.15/thirdparty thirdparty
  91. rmdir panda3d-1.10.15
  92. # Temporary hack so that pzip can run, since we are about to remove Cg anyway.
  93. install_name_tool -id "$(pwd)/thirdparty/darwin-libs-a/nvidiacg/lib/libCg.dylib" thirdparty/darwin-libs-a/nvidiacg/lib/libCg.dylib
  94. brew install ccache
  95. - name: Set up XCode (macOS)
  96. if: runner.os == 'macOS'
  97. run: sudo xcode-select -s /Applications/Xcode_14.3.1.app/Contents/Developer
  98. - name: Install dependencies (Ubuntu)
  99. if: startsWith(matrix.os, 'ubuntu')
  100. run: >
  101. sudo apt-get update
  102. sudo apt-get install
  103. build-essential ninja-build clang llvm ccache
  104. bison flex
  105. libeigen3-dev libfreetype6-dev libgl1-mesa-dev libjpeg-dev libode-dev
  106. libopenal-dev libpng-dev libssl-dev libvorbis-dev libx11-dev
  107. libxcursor-dev libxrandr-dev nvidia-cg-toolkit zlib1g-dev
  108. python3-setuptools python3-tk
  109. - name: Cache dependencies (Windows)
  110. if: runner.os == 'Windows'
  111. uses: actions/cache@v4
  112. with:
  113. path: thirdparty
  114. key: ci-cmake-${{ runner.OS }}-thirdparty-v1.10.15-r1
  115. - name: Install dependencies (Windows)
  116. if: runner.os == 'Windows'
  117. shell: powershell
  118. run: |
  119. if (!(Test-Path thirdparty/win-libs-vc14-x64)) {
  120. $wc = New-Object System.Net.WebClient
  121. $wc.DownloadFile("https://www.panda3d.org/download/panda3d-1.10.15/panda3d-1.10.15-tools-win64.zip", "thirdparty-tools.zip")
  122. Expand-Archive -Path thirdparty-tools.zip
  123. Move-Item -Path thirdparty-tools/panda3d-1.10.15/thirdparty -Destination .
  124. }
  125. - name: ccache (non-Windows)
  126. if: runner.os != 'Windows'
  127. uses: actions/cache@v4
  128. with:
  129. path: ccache
  130. key: ci-cmake-ccache-${{ matrix.profile }}
  131. - name: Configure
  132. shell: bash
  133. env:
  134. CMAKE_GENERATOR: "${{ matrix.generator }}"
  135. run: >
  136. mkdir -p build
  137. cd build
  138. if ${{ matrix.compiler == 'Clang' }}; then
  139. if [[ "$CMAKE_GENERATOR" =~ Studio.+20(19|22) ]]; then
  140. export CMAKE_GENERATOR_TOOLSET=ClangCL
  141. elif [[ "$CMAKE_GENERATOR" == *Studio* ]]; then
  142. export CMAKE_GENERATOR_TOOLSET=LLVM
  143. else
  144. export CC=clang CXX=clang++
  145. fi
  146. fi
  147. if ${{ runner.os != 'Windows' }}; then
  148. compilerLauncher=$(echo -DCMAKE_C{,XX}_COMPILER_LAUNCHER=ccache)
  149. export CCACHE_DIR="$(dirname $PWD)/ccache"
  150. echo "CCACHE_DIR=$(dirname $PWD)/ccache" >> $GITHUB_ENV
  151. fi
  152. cmake
  153. ${compilerLauncher:-}
  154. -D CMAKE_UNITY_BUILD=${{ matrix.unity }}
  155. -D CMAKE_BUILD_TYPE="${{ matrix.config }}"
  156. -D BUILD_METALIBS=${{ matrix.metalibs }}
  157. -D HAVE_PYTHON=${{ runner.os != 'Windows' && matrix.python || 'NO' }}
  158. -D HAVE_EIGEN=${{ matrix.eigen }}
  159. -D STDFLOAT_DOUBLE=${{ matrix.double }}
  160. ..
  161. - name: Build (no Python)
  162. if: contains(matrix.python, 'NO')
  163. # BEGIN A
  164. working-directory: build
  165. run: cmake --build . --config ${{ matrix.config }} --parallel 4
  166. # END A
  167. - name: Setup Python (Python 3.8)
  168. if: contains(matrix.python, 'YES')
  169. uses: actions/setup-python@v6
  170. with:
  171. python-version: '3.8'
  172. - name: Configure (Python 3.8)
  173. if: contains(matrix.python, 'YES')
  174. working-directory: build
  175. shell: bash
  176. run: >
  177. cmake -DWANT_PYTHON_VERSION=3.8 -DHAVE_PYTHON=YES
  178. -DPython_FIND_REGISTRY=NEVER -DPython_ROOT="$pythonLocation" .
  179. - name: Build (Python 3.8)
  180. if: contains(matrix.python, 'YES')
  181. # BEGIN A
  182. working-directory: build
  183. run: cmake --build . --config ${{ matrix.config }} --parallel 4
  184. # END A
  185. - name: Test (Python 3.8)
  186. # BEGIN B
  187. if: contains(matrix.python, 'YES')
  188. working-directory: build
  189. shell: bash
  190. env:
  191. PYTHONPATH: ${{ matrix.config }}
  192. run: |
  193. PYTHON_EXECUTABLE=$(grep 'Python_EXECUTABLE:' CMakeCache.txt | sed 's/.*=//')
  194. $PYTHON_EXECUTABLE -m pip install -r ../requirements-test.txt
  195. export COVERAGE_FILE=.coverage.$RANDOM LLVM_PROFILE_FILE=$PWD/pid-%p.profraw
  196. $PYTHON_EXECUTABLE -m pytest ../tests --cov=.
  197. # END B
  198. - name: Setup Python (Python 3.9)
  199. if: contains(matrix.python, 'YES')
  200. uses: actions/setup-python@v6
  201. with:
  202. python-version: '3.9'
  203. - name: Configure (Python 3.9)
  204. if: contains(matrix.python, 'YES')
  205. working-directory: build
  206. shell: bash
  207. run: >
  208. cmake -DWANT_PYTHON_VERSION=3.9 -DHAVE_PYTHON=YES
  209. -DPython_FIND_REGISTRY=NEVER -DPython_ROOT="$pythonLocation" .
  210. - name: Build (Python 3.9)
  211. if: contains(matrix.python, 'YES')
  212. # BEGIN A
  213. working-directory: build
  214. run: cmake --build . --config ${{ matrix.config }} --parallel 4
  215. # END A
  216. - name: Test (Python 3.9)
  217. # BEGIN B
  218. if: contains(matrix.python, 'YES')
  219. working-directory: build
  220. shell: bash
  221. env:
  222. PYTHONPATH: ${{ matrix.config }}
  223. run: |
  224. PYTHON_EXECUTABLE=$(grep 'Python_EXECUTABLE:' CMakeCache.txt | sed 's/.*=//')
  225. $PYTHON_EXECUTABLE -m pip install -r ../requirements-test.txt
  226. export COVERAGE_FILE=.coverage.$RANDOM LLVM_PROFILE_FILE=$PWD/pid-%p.profraw
  227. $PYTHON_EXECUTABLE -m pytest ../tests --cov=.
  228. # END B
  229. - name: Setup Python (Python 3.10)
  230. if: contains(matrix.python, 'YES')
  231. uses: actions/setup-python@v6
  232. with:
  233. python-version: '3.10'
  234. - name: Configure (Python 3.10)
  235. if: contains(matrix.python, 'YES')
  236. working-directory: build
  237. shell: bash
  238. run: >
  239. cmake -DWANT_PYTHON_VERSION=3.10 -DHAVE_PYTHON=YES
  240. -DPython_FIND_REGISTRY=NEVER -DPython_ROOT="$pythonLocation" .
  241. - name: Build (Python 3.10)
  242. if: contains(matrix.python, 'YES')
  243. # BEGIN A
  244. working-directory: build
  245. run: cmake --build . --config ${{ matrix.config }} --parallel 4
  246. # END A
  247. - name: Test (Python 3.10)
  248. # BEGIN B
  249. if: contains(matrix.python, 'YES')
  250. working-directory: build
  251. shell: bash
  252. env:
  253. PYTHONPATH: ${{ matrix.config }}
  254. run: |
  255. PYTHON_EXECUTABLE=$(grep 'Python_EXECUTABLE:' CMakeCache.txt | sed 's/.*=//')
  256. $PYTHON_EXECUTABLE -m pip install -r ../requirements-test.txt
  257. export COVERAGE_FILE=.coverage.$RANDOM LLVM_PROFILE_FILE=$PWD/pid-%p.profraw
  258. $PYTHON_EXECUTABLE -m pytest ../tests --cov=.
  259. # END B
  260. - name: Setup Python (Python 3.11)
  261. if: contains(matrix.python, 'YES')
  262. uses: actions/setup-python@v6
  263. with:
  264. python-version: '3.11'
  265. - name: Configure (Python 3.11)
  266. if: contains(matrix.python, 'YES')
  267. working-directory: build
  268. shell: bash
  269. run: >
  270. cmake -DWANT_PYTHON_VERSION=3.11 -DHAVE_PYTHON=YES
  271. -DPython_FIND_REGISTRY=NEVER -DPython_ROOT="$pythonLocation" .
  272. - name: Build (Python 3.11)
  273. if: contains(matrix.python, 'YES')
  274. # BEGIN A
  275. working-directory: build
  276. run: cmake --build . --config ${{ matrix.config }} --parallel 4
  277. # END A
  278. - name: Test (Python 3.11)
  279. # BEGIN B
  280. if: contains(matrix.python, 'YES')
  281. working-directory: build
  282. shell: bash
  283. env:
  284. PYTHONPATH: ${{ matrix.config }}
  285. run: |
  286. PYTHON_EXECUTABLE=$(grep 'Python_EXECUTABLE:' CMakeCache.txt | sed 's/.*=//')
  287. $PYTHON_EXECUTABLE -m pip install -r ../requirements-test.txt
  288. export COVERAGE_FILE=.coverage.$RANDOM LLVM_PROFILE_FILE=$PWD/pid-%p.profraw
  289. $PYTHON_EXECUTABLE -m pytest ../tests --cov=.
  290. # END B
  291. - name: Setup Python (Python 3.12)
  292. if: contains(matrix.python, 'YES')
  293. uses: actions/setup-python@v6
  294. with:
  295. python-version: '3.12'
  296. - name: Configure (Python 3.12)
  297. if: contains(matrix.python, 'YES')
  298. working-directory: build
  299. shell: bash
  300. run: >
  301. cmake -DWANT_PYTHON_VERSION=3.12 -DHAVE_PYTHON=YES
  302. -DPython_FIND_REGISTRY=NEVER -DPython_ROOT="$pythonLocation" .
  303. - name: Build (Python 3.12)
  304. if: contains(matrix.python, 'YES')
  305. # BEGIN A
  306. working-directory: build
  307. run: cmake --build . --config ${{ matrix.config }} --parallel 4
  308. # END A
  309. - name: Test (Python 3.12)
  310. # BEGIN B
  311. if: contains(matrix.python, 'YES')
  312. working-directory: build
  313. shell: bash
  314. env:
  315. PYTHONPATH: ${{ matrix.config }}
  316. run: |
  317. PYTHON_EXECUTABLE=$(grep 'Python_EXECUTABLE:' CMakeCache.txt | sed 's/.*=//')
  318. $PYTHON_EXECUTABLE -m pip install -r ../requirements-test.txt
  319. export COVERAGE_FILE=.coverage.$RANDOM LLVM_PROFILE_FILE=$PWD/pid-%p.profraw
  320. $PYTHON_EXECUTABLE -m pytest ../tests --cov=.
  321. # END B
  322. - name: Upload coverage reports
  323. if: always() && matrix.config == 'Coverage'
  324. working-directory: build
  325. shell: bash
  326. env:
  327. CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
  328. run: |
  329. shopt -s expand_aliases
  330. if ${{ runner.os == 'macOS' }}; then alias llvm-profdata='xcrun llvm-profdata' llvm-cov='xcrun llvm-cov'; fi
  331. python -m pip install coverage
  332. python -m coverage combine $(find . -name '.coverage.*')
  333. llvm-profdata merge pid-*.profraw -o coverage.profdata
  334. llvm-cov show $(grep -Rl LLVM_PROFILE_FILE . | sed 's/^/-object /') -instr-profile=coverage.profdata > coverage.txt
  335. bash <(curl -s https://codecov.io/bash) -y ../.github/codecov.yml
  336. makepanda:
  337. if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"
  338. strategy:
  339. matrix:
  340. os: [ubuntu-22.04, windows-2022, macOS-13]
  341. runs-on: ${{ matrix.os }}
  342. steps:
  343. - uses: actions/checkout@v5
  344. - name: Install dependencies (Ubuntu)
  345. if: matrix.os == 'ubuntu-22.04'
  346. run: |
  347. sudo apt-get update
  348. 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
  349. - name: Get thirdparty packages (Windows)
  350. if: runner.os == 'Windows'
  351. shell: powershell
  352. run: |
  353. $wc = New-Object System.Net.WebClient
  354. $wc.DownloadFile("https://www.panda3d.org/download/panda3d-1.10.15/panda3d-1.10.15-tools-win64.zip", "thirdparty-tools.zip")
  355. Expand-Archive -Path thirdparty-tools.zip
  356. Move-Item -Path thirdparty-tools/panda3d-1.10.15/thirdparty -Destination .
  357. - name: Get thirdparty packages (macOS)
  358. if: runner.os == 'macOS'
  359. run: |
  360. curl -O https://www.panda3d.org/download/panda3d-1.10.15/panda3d-1.10.15-tools-mac.tar.gz
  361. tar -xf panda3d-1.10.15-tools-mac.tar.gz
  362. mv panda3d-1.10.15/thirdparty thirdparty
  363. rmdir panda3d-1.10.15
  364. (cd thirdparty/darwin-libs-a && rm -rf rocket)
  365. - name: Set up XCode (macOS)
  366. if: runner.os == 'macOS'
  367. run: sudo xcode-select -s /Applications/Xcode_14.3.1.app/Contents/Developer
  368. - name: Set up Python 3.13
  369. uses: actions/setup-python@v6
  370. with:
  371. python-version: '3.13'
  372. - name: Build Python 3.13
  373. shell: bash
  374. run: |
  375. 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
  376. - name: Test Python 3.13
  377. shell: bash
  378. run: |
  379. python -m pip install -r requirements-test.txt
  380. PYTHONPATH=built LD_LIBRARY_PATH=built/lib:$pythonLocation/lib DYLD_LIBRARY_PATH=built/lib python -m pytest
  381. - name: Set up Python 3.12
  382. uses: actions/setup-python@v6
  383. with:
  384. python-version: '3.12'
  385. - name: Build Python 3.12 (double)
  386. shell: bash
  387. run: |
  388. python makepanda/makepanda.py --override STDFLOAT_DOUBLE=1 --git-commit=${{github.sha}} --outputdir=built_dbl --everything --no-eigen --python-incdir="$pythonLocation/include" --python-libdir="$pythonLocation/lib" --verbose --threads=4 --windows-sdk=10 --msvc-version=14.3
  389. - name: Test Python 3.12 (double)
  390. shell: bash
  391. run: |
  392. python -m pip install -r requirements-test.txt
  393. PYTHONPATH=built_dbl LD_LIBRARY_PATH=built_dbl/lib:$pythonLocation/lib DYLD_LIBRARY_PATH=built_dbl/lib python -m pytest
  394. - name: Make installer
  395. run: |
  396. python makepanda/makepackage.py --verbose --lzma --outputdir=built_dbl
  397. - name: Set up Python 3.11
  398. uses: actions/setup-python@v6
  399. with:
  400. python-version: '3.11'
  401. - name: Build Python 3.11
  402. shell: bash
  403. run: |
  404. 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
  405. - name: Test Python 3.11
  406. shell: bash
  407. run: |
  408. python -m pip install -r requirements-test.txt
  409. PYTHONPATH=built LD_LIBRARY_PATH=built/lib:$pythonLocation/lib DYLD_LIBRARY_PATH=built/lib python -m pytest
  410. - name: Set up Python 3.10
  411. uses: actions/setup-python@v6
  412. with:
  413. python-version: '3.10'
  414. - name: Build Python 3.10
  415. shell: bash
  416. run: |
  417. 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
  418. - name: Test Python 3.10
  419. shell: bash
  420. run: |
  421. python -m pip install -r requirements-test.txt
  422. PYTHONPATH=built LD_LIBRARY_PATH=built/lib:$pythonLocation/lib DYLD_LIBRARY_PATH=built/lib python -m pytest
  423. - name: Set up Python 3.9
  424. uses: actions/setup-python@v6
  425. with:
  426. python-version: '3.9'
  427. - name: Build Python 3.9
  428. shell: bash
  429. run: |
  430. 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
  431. - name: Test Python 3.9
  432. shell: bash
  433. run: |
  434. python -m pip install -r requirements-test.txt
  435. PYTHONPATH=built LD_LIBRARY_PATH=built/lib:$pythonLocation/lib DYLD_LIBRARY_PATH=built/lib python -m pytest
  436. - name: Set up Python 3.8
  437. uses: actions/setup-python@v6
  438. with:
  439. python-version: '3.8'
  440. - name: Build Python 3.8
  441. shell: bash
  442. run: |
  443. 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
  444. - name: Test Python 3.8
  445. shell: bash
  446. run: |
  447. python -m pip install -r requirements-test.txt
  448. PYTHONPATH=built LD_LIBRARY_PATH=built/lib:$pythonLocation/lib DYLD_LIBRARY_PATH=built/lib python -m pytest
  449. - name: Make installer
  450. run: |
  451. python makepanda/makepackage.py --verbose --lzma
  452. emscripten:
  453. if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"
  454. runs-on: ubuntu-24.04
  455. steps:
  456. - uses: actions/checkout@v5
  457. - name: Install dependencies
  458. run: |
  459. sudo apt-get update
  460. sudo apt-get install build-essential ninja-build bison flex nodejs python3-pip
  461. - name: Setup emsdk
  462. uses: mymindstorm/setup-emsdk@v14
  463. with:
  464. version: 4.0.2
  465. actions-cache-folder: 'emsdk-cache'
  466. - name: Restore Python build cache
  467. id: cache-emscripten-python-restore
  468. uses: actions/cache/restore@v4
  469. with:
  470. path: ~/python
  471. key: cache-emscripten-python-3.12.8
  472. - name: Build Python 3.12
  473. if: steps.cache-emscripten-python-restore.outputs.cache-hit != 'true'
  474. run: |
  475. wget https://www.python.org/ftp/python/3.12.8/Python-3.12.8.tar.xz
  476. tar -xJf Python-3.12.8.tar.xz
  477. (cd Python-3.12.8 && EM_CONFIG=$EMSDK/.emscripten python3 Tools/wasm/wasm_build.py emscripten-browser)
  478. (cd Python-3.12.8/builddir/emscripten-browser && make install DESTDIR=~/python)
  479. cp Python-3.12.8/builddir/emscripten-browser/Modules/_hacl/libHacl_Hash_SHA2.a ~/python/usr/local/lib
  480. cp Python-3.12.8/builddir/emscripten-browser/Modules/_decimal/libmpdec/libmpdec.a ~/python/usr/local/lib
  481. cp Python-3.12.8/builddir/emscripten-browser/Modules/expat/libexpat.a ~/python/usr/local/lib
  482. rm -rf Python-3.12.8
  483. - name: Save Python build cache
  484. id: cache-emscripten-python-save
  485. if: steps.cache-emscripten-python-restore.outputs.cache-hit != 'true'
  486. uses: actions/cache/save@v4
  487. with:
  488. path: ~/python
  489. key: ${{ steps.cache-emscripten-python-restore.outputs.cache-primary-key }}
  490. - name: Build for Emscripten
  491. shell: bash
  492. run: |
  493. python3 makepanda/makepanda.py --git-commit=${{github.sha}} --target emscripten --python-incdir=~/python/usr/local/include --python-libdir=~/python/usr/local/lib --static --everything --no-pandatool --no-deploytools --verbose --threads=4
  494. - name: Install test dependencies
  495. shell: bash
  496. run: |
  497. python3 -m pip install -t ~/python/usr/local/lib/python3.12/site-packages -r requirements-test.txt
  498. - name: Test in node.js
  499. shell: bash
  500. run: |
  501. PYTHONHOME=~/python/usr/local PYTHONPATH=built node built/bin/run_tests.js tests