Skip to content

Bump the version of tch to 0.10.0 #510

Bump the version of tch to 0.10.0

Bump the version of tch to 0.10.0 #510

Workflow file for this run

name: CI
on:
push:
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
rust: [1.70.0]
python-version: [3.8]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.platform.python-architecture }}
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.platform.rust-target }}
profile: minimal
default: true
- if: matrix.platform.os == 'ubuntu-latest'
name: Prepare LD_LIBRARY_PATH (Ubuntu only)
run: echo LD_LIBRARY_PATH=${pythonLocation}/lib >> $GITHUB_ENV
- if: matrix.os == 'ubuntu-latest'
name: Install gym (Ubuntu)
run: |
pip install mujoco==2.3.7
pip install gymnasium[box2d]==0.29.0
pip install gymnasium-robotics==1.2.2
pip install pybullet==3.2.5
- if: matrix.os != 'ubuntu-latest'
name: Install gym (Windows/Mac)
run: |
pip install gymnasium[box2d]==0.29.0
pip install pybullet==3.2.5
- if: matrix.os == 'ubuntu-latest'
name: Install pybullet-gym
run: |
git clone https://github.com/benelot/pybullet-gym.git
cd pybullet-gym
sed -i 's/return state, sum(self.rewards), bool(done), {}/return state, sum(self.rewards), bool(done), bool(done), {}/g' ./pybulletgym/envs/roboschool/envs/locomotion/walker_base_env.py
sed -i 's/id='\''AntPyBulletEnv-v0'\'',/id='\''AntPyBulletEnv-v0'\'', order_enforce=False,/g' ./pybulletgym/envs/__init__.py
pip install -e .
- if: matrix.os != 'windows-latest'
name: Set PYTHONPATH (Linux, macOS)
run: echo "PYTHONPATH=$PWD/border-py-gym-env/examples" >> $GITHUB_ENV
shell: bash
- if: matrix.os == 'windows-latest'
name: Set PYTHONPATH (Windows)
run: echo "PYTHONPATH=$pwd\border-py-gym-env\examples" >> $env:GITHUB_ENV
- name: Test border-core
run: cargo test -p border-core
- name: Test border-py-gym-env
run: cargo test -p border-py-gym-env
- if: matrix.os == 'ubuntu-latest'
name: Test border examples
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends --fix-missing \
libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-net-dev libsdl2-ttf-dev \
libsdl2-dev libsdl-image1.2-dev
cargo test --example dqn_cartpole_tch --features=tch
cargo test --example iqn_cartpole --features=tch
cargo test --example sac_pendulum_tch --features=tch