Skip to content

Commit da99dcf

Browse files
committed
.github: isolate python venvs, clear custom-doc
Ensure correct python versions venvs, fresh custom-doc Signed-off-by: Jorge Marques <jorge.marques@analog.com>
1 parent 348df7a commit da99dcf

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

.github/workflows/build-doc.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ jobs:
1313

1414
- name: Install pip packages
1515
run: |
16-
python3.13 -m venv ~/venv
17-
source ~/venv/bin/activate
16+
python3.13 -m venv ~/venv/3.13/build-doc-latest
17+
source ~/venv/3.13/build-doc-latest/bin/activate
1818
pip3.13 install $(tail --lines=+2 docs/requirements.txt) --upgrade
1919
pip3.13 install dist/adi_doctools-*.tar.gz
2020
2121
- name: Build doc
2222
working-directory: docs
2323
run: >
24-
source ~/venv/bin/activate ;
24+
source ~/venv/3.13/build-doc-latest/bin/activate ;
2525
ADOC_DOC_VERSION=${{ github.ref_name }}
2626
make html SPHINXOPTS='-W --keep-going' ;
2727
rm -rf _build/html/_sources
@@ -44,7 +44,7 @@ jobs:
4444
if: ${{ env.new_tag == '1' }}
4545
working-directory: docs
4646
run: >
47-
source ~/venv/bin/activate ;
47+
source ~/venv/3.13/build-doc-latest/bin/activate ;
4848
ADOC_DOC_VERSION=$tag
4949
make clean html SPHINXOPTS='-W --keep-going' ;
5050
rm -rf _build/html/_sources
@@ -71,15 +71,15 @@ jobs:
7171

7272
- name: Install pip packages
7373
run: |
74-
python3.8 -m venv ~/venv
75-
source ~/venv/bin/activate
74+
python3.8 -m venv ~/venv/3.8/build-doc-min
75+
source ~/venv/3.8/build-doc-min/bin/activate
7676
pip3.8 install $(tail --lines=+2 docs/requirements.txt) --upgrade
7777
pip3.8 install dist/adi_doctools-*.tar.gz
7878
7979
- name: Build doc
8080
working-directory: docs
8181
run: >
82-
source ~/venv/bin/activate ;
82+
source ~/venv/3.8/build-doc-min/bin/activate ;
8383
make clean html SPHINXOPTS='-W --keep-going' ;
8484
rm -rf _build/html/_sources
8585

.github/workflows/build-package.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ jobs:
3131
3232
- name: Build a binary wheel and a source tarball
3333
run: |
34-
python3.13 -m venv ~/venv
35-
source ~/venv/bin/activate
34+
python3.13 -m venv ~/venv/3.13/build-package
35+
source ~/venv/3.13/build-package/bin/activate
3636
pip3.13 install build
3737
python3.13 -m build
3838

.github/workflows/custom-doc.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,27 @@ jobs:
1313

1414
- name: Install pip packages
1515
run: |
16-
python3.13 -m venv ~/venv
17-
source ~/venv/bin/activate
16+
python3.13 -m venv ~/venv/3.13/custom-doc
17+
source ~/venv/3.13/custom-doc/bin/activate
1818
pip3.13 install $(tail --lines=+2 docs/requirements.txt) --upgrade
1919
pip3.13 install weasyprint
2020
pip3.13 install dist/adi_doctools-*.tar.gz
2121
2222
- name: Prepare custom doc template
2323
working-directory: /tmp
2424
run: |
25-
mkdir -p my_pdf ; cd my_pdf
26-
mkdir -p custom-pages
25+
rm -rf my_pdf ; mkdir my_pdf ; cd my_pdf
26+
mkdir custom-pages
2727
printf "Introduction\n============\n\n" > custom-pages/intro.rst
2828
yes "lorem ipsum dolor sit amet" 2>/dev/null | head -n 20 | tr '\n' ' ' >> custom-pages/intro.rst
29-
source ~/venv/bin/activate
29+
source ~/venv/3.13/custom-doc/bin/activate
3030
adoc custom-doc --builder pdf
3131
3232
- name: Build custom doc
3333
working-directory: /tmp/my_pdf
3434
run: |
3535
export GIT_LFS_SKIP_SMUDGE=1
36-
source ~/venv/bin/activate
36+
source ~/venv/3.13/custom-doc/bin/activate
3737
adoc custom-doc --builder pdf
3838
3939
- name: Store the generated pdf

.github/workflows/tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ jobs:
1313

1414
- name: Install pip packages
1515
run: |
16-
python3.13 -m venv ~/venv
17-
source ~/venv/bin/activate
16+
python3.13 -m venv ~/venv/3.13/tests
17+
source ~/venv/3.13/tests/bin/activate
1818
pip3.13 install pip sphinx pytest --upgrade
1919
pip3.13 install dist/adi_doctools-*.tar.gz
2020
2121
- name: Run tests
2222
working-directory: tests
2323
run: |
24-
source ~/venv/bin/activate
24+
source ~/venv/3.13/tests/bin/activate
2525
pytest

0 commit comments

Comments
 (0)