-
Notifications
You must be signed in to change notification settings - Fork 133
96 lines (83 loc) · 3.05 KB
/
build_examples.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: Documentation with Examples
env:
python.version: '3.10'
python.venv: 'testvenv'
RESET_EXAMPLES_CACHE: 3
RESET_DOC_BUILD_CACHE: 3
RESET_AUTOSUMMARY_CACHE: 3
# Use the following env variables to limit which examples will be built. If these
# values are not set, the full examples directory will be parsed and run.
EXAMPLES_DIR: '02-HFSS'
# The following env variable may also be a regex that is used to select
# the example files that will be run.
EXAMPLE_FILE: 'Array.py'
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches:
- 'examples/*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build_docs_no_deploy:
# The type of runner that the job will run on
name: doc_build_test
runs-on: [windows-latest, pyaedt]
timeout-minutes: 480
strategy:
matrix:
python-version: ['3.10']
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: 'Create virtual env'
run: |
python -m venv testenv
testenv\Scripts\Activate.ps1
python -m pip install pip -U
python -m pip install wheel setuptools -U
python -c "import sys; print(sys.executable)"
- name: 'Install pyaedt'
run: |
testenv\Scripts\Activate.ps1
pip install .[doc]
Copy-Item -Path "C:\actions-runner\opengl32.dll" -Destination "testenv\Lib\site-packages\vtkmodules" -Force
- name: Retrieve PyAEDT version
id: version
run: |
testenv\Scripts\Activate.ps1
echo "::set-output name=PYAEDT_VERSION::$(python -c "from pyaedt import __version__; print(__version__)")"
echo "PyAEDT version is: $(python -c "from pyaedt import __version__; print(__version__)")"
- name: Create HTML Documentations
run: |
testenv\Scripts\Activate.ps1
sphinx-build -j auto --color -b html -a doc/source doc/_build/html
# - name: Create PDF Documentations
# run: |
# testenv\Scripts\Activate.ps1
# .\doc\make.bat pdf
- name: Upload HTML documentation artifact
uses: actions/upload-artifact@v3
with:
name: Documentation
path: doc/_build/html
retention-days: 7
# - name: Upload EDB Documentation
# uses: actions/upload-artifact@v3
# with:
# name: documentation-html-edb
# path: doc/_build/html/EDBAPI
# retention-days: 3
# - name: Upload PDF documentation artifact
# uses: actions/upload-artifact@v3
# with:
# name: documentation-pdf
# path: doc/_build/pdf
# retention-days: 7