Skip to content

Commit

Permalink
Update build tutorials CI
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnv1 committed Jan 29, 2024
1 parent 481dcfc commit 9b2ae82
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 41 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
matrix:
kornia-ref: ['main'] # TODO: coverage check through multiple versions: , 'v0.7.1', 'v0.7.0']

uses: kornia/workflows/.github/workflows/[email protected].0
uses: kornia/workflows/.github/workflows/[email protected].1
with:
ref: ${{ matrix.kornia-ref }}

Expand All @@ -33,24 +33,29 @@ jobs:
kornia-ref: ['main']

steps:
- uses: kornia/workflows/.github/actions/[email protected].0
- uses: kornia/workflows/.github/actions/[email protected].1
with:
ref: ${{ matrix.kornia-ref }}

- uses: actions/checkout@v4
with:
repository: 'kornia/tutorials'
path: 'tutorials-repo/'

- name: Install dependencies
working-directory: ./tutorials-repo/
shell: bash -l {0}
run: |
pip install -r requirements.txt --upgrade
pip install -r requirements-dev.txt --upgrade
run: make setup

- uses: quarto-dev/quarto-actions/setup@v2

- name: Check deps
working-directory: ./tutorials-repo/
shell: bash -l {0}
run: make check-deps

- name: Render Quarto Project
uses: quarto-dev/quarto-actions/render@v2
with:
to: html
path: .
path: ./tutorials-repo/
66 changes: 32 additions & 34 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,40 +10,38 @@ jobs:
runs-on: ${{ matrix.os }}-latest

strategy:
fail-fast: true
matrix:
os: ['Ubuntu']
python-version: ['3.10']
pytorch-version: ['2.0.1']
os: ['ubuntu']
kornia-ref: ['main']

steps:
- uses: actions/checkout@v3
- name: Setup conda dependencies
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}

- name: Install dependencies
shell: bash -l {0}
run: |
conda install pytorch=${{ matrix.pytorch-version }} torchvision cpuonly -c pytorch
pip install -r requirements.txt
pip install -r requirements-dev.txt;
- uses: quarto-dev/quarto-actions/setup@v2

- name: Render Quarto Project
uses: quarto-dev/quarto-actions/render@v2
with:
to: html
path: .

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
force_orphan: true
publish_dir: ./_site
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com
- uses: kornia/workflows/.github/actions/[email protected]
with:
ref: ${{ matrix.kornia-ref }}

- uses: actions/checkout@v4
with:
repository: 'kornia/tutorials'
path: 'tutorials-repo/'

- name: Install dependencies
working-directory: ./tutorials-repo/
shell: bash -l {0}
run: make setup

- uses: quarto-dev/quarto-actions/setup@v2

- name: Render Quarto Project
uses: quarto-dev/quarto-actions/render@v2
with:
to: html
path: ./tutorials-repo/

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
force_orphan: true
publish_dir: ./_site
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ setup-quarto:

setup:
pip install -r requirements.txt && pip install -r requirements-dev.txt;
make setup-quarto

preview:
quarto preview .
Expand Down

0 comments on commit 9b2ae82

Please sign in to comment.