Skip to content

Commit

Permalink
ci: update & defaults (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda committed Mar 9, 2023
1 parent ca500fd commit 7b782e0
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 23 deletions.
11 changes: 5 additions & 6 deletions .github/actions/cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ runs:
steps:

- name: install assitant's deps
run: |
pip install fire requests packaging
run: pip install fire requests packaging
shell: bash

- name: Set min. dependencies
Expand All @@ -34,16 +33,16 @@ runs:

- name: Determine caches
id: cache_dirs
run: |
echo "pip_dir=$(pip cache dir)" >> $GITHUB_OUTPUT
run: echo "pip_dir=$(pip cache dir)" >> $GITHUB_OUTPUT
shell: bash

- name: Cache 💽 pip
uses: actions/cache@v3
with:
path: ${{ steps.cache_dirs.outputs.pip_dir }}
key: ${{ runner.os }}-py${{ inputs.python-version }}-pip-${{ inputs.offset }}-${{ hashFiles('requirements.txt') }}
restore-keys: ${{ runner.os }}-py${{ inputs.python-version }}-pip-${{ inputs.offset }}-
key: py${{ inputs.python-version }}-pip-${{ inputs.offset }}-${{ hashFiles('requirements.txt') }}
restore-keys: py${{ inputs.python-version }}-pip-${{ inputs.offset }}-
enableCrossOsArchive: true

- name: Cache 💽 conda
uses: actions/cache@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/pkg-install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ inputs:
description: 'Import name to test with after installation'
required: true
pip-flags:
description: additional pil install flags
description: additional pip install flags
required: false
default: ""
default: "-f https://download.pytorch.org/whl/cpu/torch_stable.html"

runs:
using: "composite"
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/check-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ defaults:
run:
shell: bash

env:
TORCH_URL: "https://download.pytorch.org/whl/torch_stable.html"

jobs:

docs-test:
Expand All @@ -54,8 +57,7 @@ jobs:

- name: Install dependencies
run: |
pip install -e . -U -r ${{ inputs.requirements-file }} \
-f https://download.pytorch.org/whl/cpu/torch_stable.html
pip install -e . -U -r ${{ inputs.requirements-file }} -f ${TORCH_URL}
pip --version
pip list
shell: bash
Expand Down Expand Up @@ -88,8 +90,7 @@ jobs:

- name: Install dependencies
run: |
pip install -e . -U -r ${{ inputs.requirements-file }} \
-f https://download.pytorch.org/whl/torch_stable.html
pip install -e . -U -r ${{ inputs.requirements-file }} -f ${TORCH_URL}
sudo apt-get update --fix-missing
sudo apt-get install -y texlive-latex-extra dvipng texlive-pictures
python --version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on:
description: 'Additional pip install flags'
required: false
type: string
default: ""
default: "-f https://download.pytorch.org/whl/cpu/torch_stable.html"
build-matrix:
description: 'what building configs in json format'
required: false
Expand Down
14 changes: 4 additions & 10 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Set up Python 🐍
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: 3.8

# Note: This uses an internal pip API and may not always work
# https://github.com/actions/cache/blob/master/examples.md#multiple-oss-in-a-workflow
Expand All @@ -38,21 +38,15 @@ jobs:
pip install -e . -U -q -r requirements/docs.txt \
-f https://download.pytorch.org/whl/cpu/torch_stable.html
# install Texlive, see https://linuxconfig.org/how-to-install-latex-on-ubuntu-20-04-focal-fossa-linux
sudo apt-get update
sudo apt-get update --fix-missing
sudo apt-get install -y texlive-latex-extra dvipng texlive-pictures
pip --version
pip list
shell: bash

- name: Print 🖨️ dependencies
uses: ./.github/actions/pip-list

- name: Make Documentation
run: |
cd docs
make clean
# First run the same pipeline as Read-The-Docs
make html --jobs 2
working-directory: ./docs
run: make html --jobs 2

- name: Deploy 🚀
uses: JamesIves/[email protected]
Expand Down

0 comments on commit 7b782e0

Please sign in to comment.