Update dependencies #237
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: test-py | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| env: | |
| ENZYME_IMAGE: ghcr.io/juniorrojas/algovivo/llvm18-enzyme:latest | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Clone repo | |
| uses: actions/checkout@v4 | |
| - name: Set up node 22 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Build JS | |
| run: | | |
| npm ci | |
| npm run build | |
| - name: Build native library | |
| run: | | |
| python codegen/codegen_csrc.py | |
| docker run \ | |
| -e NATIVE=true \ | |
| -v $(pwd):/workspace \ | |
| -w /workspace \ | |
| ${{ env.ENZYME_IMAGE }} \ | |
| ./build.sh | |
| - name: Set up python 3.11 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.11 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: Install python dependencies | |
| run: | | |
| uv pip install --system -e "utils/py[dev]" | |
| - name: Test | |
| run: | | |
| export ALGOVIVO_LIB_FILENAME=$(pwd)/build/algovivo.so | |
| pytest ./utils/py/test | |
| - name: Generate trajectory | |
| run: | | |
| python utils/py/test/trajectory/test_trajectory.py | |
| - name: Build WASM | |
| run: | | |
| python codegen/codegen_csrc.py | |
| docker run \ | |
| -v $(pwd):/workspace \ | |
| -w /workspace \ | |
| ${{ env.ENZYME_IMAGE }} \ | |
| ./build.sh | |
| - name: Generate trajectory frames | |
| run: | | |
| node utils/trajectory/renderTrajectory.js \ | |
| --mesh utils/py/test/trajectory/data/mesh.json \ | |
| --steps steps.out \ | |
| --output frames.out | |
| - name: Install ffmpeg | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install ffmpeg | |
| - name: Make trajectory video | |
| run: | | |
| ffmpeg -framerate 30 -i frames.out/%d.png -pix_fmt yuv420p video.out.mp4 -y | |
| - name: Upload trajectory video | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: video | |
| path: video.out.mp4 |