Skip to content

Commit

Permalink
Update and rename build-docs.yml to build_docs_main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Davidham3 authored Dec 20, 2024
1 parent c8d6418 commit bc3c3bf
Showing 1 changed file with 13 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
name: Building docs
name: Build Latest Docs

on:
push:
branches: [ "main" ]
branches:
- main
pull_request:
branches: [ "main" ]
branches:
- main

jobs:
build:
Expand All @@ -18,22 +20,22 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install build-essential and make
run: |
sudo apt-get update
sudo apt-get install -y build-essential ca-certificates curl libffi-dev libgdbm-dev libncurses5-dev libnss3-dev libreadline-dev libssl-dev make time wget zlib1g-dev
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'

- name: Install PyTorch and dependencies from pyproject.toml
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
name: dist-${{ github.ref_name }}-${{ github.sha }}-${{ matrix.python-version }}
path: dist

- name: Install TrajDL
run: |
python -m pip install --upgrade pip
python -m pip install torch --index-url https://download.pytorch.org/whl/cpu
python -m pip install .[dev,docs]
python -m pip install dist/trajdl-0.1.0-cp312-cp312-linux_x86_64.whl --index-url https://download.pytorch.org/whl/cpu
- name: Cache datasets
id: cache-datasets
Expand All @@ -42,13 +44,6 @@ jobs:
path: ~/.cache/trajdl
key: trajdl-cache-datasets

- name: Test with pytest
run: |
autoflake -j 0 --remove-all-unused-imports --in-place --recursive --ignore-init-module-imports .
isort -j -1 .
black .
pytest -s
- name: Build docs
run: |
cd docs && make -j 4 html && cd ..
Expand Down

0 comments on commit bc3c3bf

Please sign in to comment.