Skip to content

CI: Simplify Python setup using setup-python action #92

CI: Simplify Python setup using setup-python action

CI: Simplify Python setup using setup-python action #92

Workflow file for this run

name: ubuntu-basic
on:
push:
branches:
- main
- fix-build-onpy11
pull_request:
branches:
- main
- fix-build-onpy11
jobs:
run-unit-tests:
timeout-minutes: 60
runs-on: ubuntu-latest
container: docker.io/library/ubuntu:latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install bazel
run: |
apt-get update
export DEBIAN_FRONTEND=noninteractive
apt-get install -y software-properties-common
add-apt-repository ppa:deadsnakes/ppa
apt-get install -yq wget gcc g++ python3.11 zlib1g-dev zip libuv1.dev
apt-get install -yq pip
wget "https://github.com/bazelbuild/bazel/releases/download/6.5.0/bazel_6.5.0-linux-x86_64.deb" -O bazel_6.5.0-linux-x86_64.deb
dpkg -i bazel_6.5.0-linux-x86_64.deb
- name: Install dependencies
run: |
python3 -m pip install virtualenv
python3 -m virtualenv -p python3.11 py3
. py3/bin/activate
which python
python --version
pip install pytest torch
pip install ray
- name: Build and test
run: |
. py3/bin/activate
python --version
python3 setup.py install
cd tests && python3 -m pytest *