Closed sibocw closed 3 months ago
Working now - see minimal reproducible example here: https://github.com/NeLy-EPFL/neuromechfly-ci-test
sudo apt-get update
sudo apt-get install -y libgl1-mesa-dev libgl1-mesa-glx libosmesa6-dev
echo "VARIABLE=value" >> $GITHUB_ENV
. Environment variables set using export VARIABLE=value
within a single step are not automatically available to subsequent steps. This is because each step in a GitHub Actions workflow runs in its own process and environment.name: MuJoCo Tests
on: [push]
# env:
# LD_PRELOAD: /usr/lib/x86_64-linux-gnu/libGLEW.so
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Set up renderer
run: |
sudo apt-get update
sudo apt-get install -y libgl1-mesa-dev libgl1-mesa-glx libosmesa6-dev
echo "MUJOCO_GL=egl" >> $GITHUB_ENV
echo "PYOPENGL_PLATFORM=egl" >> $GITHUB_ENV
- name: Install dependencies
run: |
pip install --upgrade pip
pip cache purge
git clone https://github.com/NeLy-EPFL/flygym.git
cd flygym
pip install -e .
cd ..
- name: Test script
run: |
pwd
python tests/render_test.py
# - name: Debugging with ssh
# uses: lhotari/action-upterm@v1
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: upload-rendered-video
path: video.mp4
if-no-files-found: error
retention-days: 1
compression-level: 6
overwrite: false
Despite usual env variables to render with CPU on headless machine,
.render()
breaks the test during automated testing with Github Actions.