From 1fb781b96e6c24bf009a48a80abaae70666d9f80 Mon Sep 17 00:00:00 2001 From: Luis Pineda <4759586+luisenp@users.noreply.github.com> Date: Wed, 6 Nov 2024 22:05:49 +0000 Subject: [PATCH] Move installation steps to separate yaml files. --- .github/workflows/install-theseus.yml | 17 ++++++++ .github/workflows/precommit.yml | 1 + .github/workflows/pytests.yml | 58 ++++++++------------------- .github/workflows/setup-deps.yml | 36 +++++++++++++++++ 4 files changed, 71 insertions(+), 41 deletions(-) create mode 100644 .github/workflows/install-theseus.yml create mode 100644 .github/workflows/setup-deps.yml diff --git a/.github/workflows/install-theseus.yml b/.github/workflows/install-theseus.yml new file mode 100644 index 00000000..9922d079 --- /dev/null +++ b/.github/workflows/install-theseus.yml @@ -0,0 +1,17 @@ +name: Setup Theseus + +runs: + using: composite + install-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 + run: | + export PATH=~/conda/bin:$PATH + source activate theseus + pip install -e ".[dev]" diff --git a/.github/workflows/precommit.yml b/.github/workflows/precommit.yml index ad90ec14..ffc7f55d 100644 --- a/.github/workflows/precommit.yml +++ b/.github/workflows/precommit.yml @@ -3,6 +3,7 @@ on: pull_request: branches: - main + jobs: precommit: runs-on: ubuntu-latest diff --git a/.github/workflows/pytests.yml b/.github/workflows/pytests.yml index ec6471a2..1c85edbf 100644 --- a/.github/workflows/pytests.yml +++ b/.github/workflows/pytests.yml @@ -11,44 +11,20 @@ jobs: 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/checkout@v4.1.3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5.2.0 + with: + python-version: ${{ matrix.python-version }} + - uses: setup-deps.yml + with: + python-version: ${{ matrix.python-version }} + - uses: install-theseus.yml + with: + python-version: ${{ matrix.python-version }} + - 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" diff --git a/.github/workflows/setup-deps.yml b/.github/workflows/setup-deps.yml new file mode 100644 index 00000000..9c685786 --- /dev/null +++ b/.github/workflows/setup-deps.yml @@ -0,0 +1,36 @@ +name: Setup dependencies + +runs: + using: composite + setup-deps: + 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 .