Skip to content

Commit

Permalink
Move installation steps to separate yaml files.
Browse files Browse the repository at this point in the history
  • Loading branch information
luisenp committed Nov 6, 2024
1 parent 3716989 commit 64c1c7e
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 42 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/install-theseus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Setup Theseus

on:
workflow_dispatch:
inputs:
with-baspacho:
description: Install Theseus with Baspacho
default: false
required: true

jobs:
setup-theseus:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Install theseus without Baspacho
if: inputs.with-baspacho == 'false'
run: |
export PATH=~/conda/bin:$PATH
source activate theseus
pip install -e ".[dev]"
56 changes: 14 additions & 42 deletions .github/workflows/pytests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,49 +6,21 @@ on:

jobs:
test_lie_groups:
runs-on: ubuntu-latest
uses: ./actions/setup-theseus.yml
strategy:
matrix:
python-version: [3.8, 3.9, 3.10.15]
steps:
- uses: actions/checkout@v4.1.3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Install suitesparse
run: |
sudo apt-get update && sudo apt-get install -y libsuitesparse-dev
- name: Create Conda env
run: |
wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh
/bin/bash ~/miniconda.sh -b -p ~/conda
export PATH=~/conda/bin:$PATH
conda create --name theseus python=${{ matrix.python-version }}
source activate theseus
pip install --progress-bar off --upgrade pip
pip install --progress-bar off --upgrade setuptools
- name: Install Torch
run: |
export PATH=~/conda/bin:$PATH
source activate theseus
pip install torch
- name: Install torchlie and torchkin
run: |
export PATH=~/conda/bin:$PATH
source activate theseus
cd torchlie
pip install -e .
cd ../torchkin
pip install -e .
- name: Install theseus without Baspacho
run: |
export PATH=~/conda/bin:$PATH
source activate theseus
pip install -e ".[dev]"
- name: Run Lie groups tests
run: |
export PATH=~/conda/bin:$PATH
source activate theseus
python -m pytest tests/theseus_tests/geometry -m "not cudaext"
python -m pytest tests/torchlie_tests -m "not cudaext"
- uses: ./actions/setup-deps.yml
with:
python-version: ${{ matrix.python-version }}
- uses: ./actions/setup-theseus.yml
with:
python-version: ${{ matrix.python-version }}
with-baspacho: false
- name: Run Lie groups tests
run: |
export PATH=~/conda/bin:$PATH
source activate theseus
python -m pytest tests/theseus_tests/geometry -m "not cudaext"
python -m pytest tests/torchlie_tests -m "not cudaext"
39 changes: 39 additions & 0 deletions .github/workflows/setup-deps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Setup dependencies

on:
workflow_dispatch:

jobs:
setup-deps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Install suitesparse
run: |
sudo apt-get update && sudo apt-get install -y libsuitesparse-dev
- name: Create Conda env
run: |
wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh
/bin/bash ~/miniconda.sh -b -p ~/conda
export PATH=~/conda/bin:$PATH
conda create --name theseus python=${{ matrix.python-version }}
source activate theseus
pip install --progress-bar off --upgrade pip
pip install --progress-bar off --upgrade setuptools
- name: Install Torch
run: |
export PATH=~/conda/bin:$PATH
source activate theseus
pip install torch
- name: Install torchlie and torchkin
run: |
export PATH=~/conda/bin:$PATH
source activate theseus
cd torchlie
pip install -e .
cd ../torchkin
pip install -e .

0 comments on commit 64c1c7e

Please sign in to comment.