|
16 | 16 | PACKAGE_NAME: 'pyaedt-examples'
|
17 | 17 | ANSYSLMD_LICENSE_FILE: ${{ format('1055@{0}', secrets.LICENSE_SERVER) }}
|
18 | 18 | ON_CI: True
|
| 19 | + PYAEDT_NON_GRAPHICAL: '1' |
| 20 | + PYAEDT_DOC_GENERATION: '1' |
19 | 21 |
|
20 | 22 | concurrency:
|
21 | 23 | group: ${{ github.workflow }}-${{ github.ref }}
|
22 | 24 | cancel-in-progress: true
|
23 | 25 |
|
24 | 26 | jobs:
|
25 | 27 |
|
26 |
| - #TODO: Update to use code-style |
27 |
| - # code-style: |
28 |
| - # name: Code style |
29 |
| - # runs-on: ubuntu-latest |
30 |
| - # steps: |
31 |
| - # - uses: ansys/actions/code-style@v4 |
32 |
| - # with: |
33 |
| - # python-version: ${{ env.MAIN_PYTHON_VERSION }} |
34 |
| - # use-python-cache: false |
35 |
| - |
36 |
| - smoke-tests: |
37 |
| - name: Build and Smoke tests |
38 |
| - runs-on: ${{ matrix.os }} |
39 |
| - strategy: |
40 |
| - fail-fast: false |
41 |
| - matrix: |
42 |
| - os: [ubuntu-latest, windows-latest] |
43 |
| - python-version: ['3.9', '3.10', '3.11'] |
44 |
| - should-release: |
45 |
| - - ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags') }} |
46 |
| - steps: |
47 |
| - - name: Build wheelhouse and perform smoke test |
48 |
| - uses: ansys/actions/build-wheelhouse@v5 |
49 |
| - with: |
50 |
| - library-name: ${{ env.PACKAGE_NAME }} |
51 |
| - operating-system: ${{ matrix.os }} |
52 |
| - python-version: ${{ matrix.python-version }} |
53 |
| - |
54 | 28 | doc-style:
|
55 | 29 | name: Documentation style
|
56 | 30 | runs-on: ubuntu-latest
|
|
59 | 33 | with:
|
60 | 34 | token: ${{ secrets.GITHUB_TOKEN }}
|
61 | 35 |
|
62 |
| - tests: |
63 |
| - name: Test and coverage |
64 |
| - runs-on: ubuntu-latest |
65 |
| - steps: |
66 |
| - - uses: ansys/actions/tests-pytest@v5 |
67 |
| - with: |
68 |
| - token: ${{ secrets.GITHUB_TOKEN }} |
69 |
| - |
70 |
| - - name: Upload Coverage Results |
71 |
| - if: always() |
72 |
| - uses: actions/upload-artifact@v4 |
73 |
| - with: |
74 |
| - name: coverage-html |
75 |
| - path: .cov/html |
76 |
| - retention-days: 7 |
77 |
| - |
78 | 36 | # =================================================================================================
|
79 | 37 | # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
80 | 38 | # =================================================================================================
|
|
102 | 60 | - name: Install project and documentation dependencies
|
103 | 61 | run: |
|
104 | 62 | .venv\Scripts\Activate.ps1
|
105 |
| - pip install . |
106 |
| - pip install .[doc] |
| 63 | + pip install -r requirements/requirements_doc.txt |
107 | 64 |
|
108 | 65 | # Use environment variable to keep the doctree and avoid redundant build for PDF pages
|
109 | 66 | - name: Create HTML documentation
|
@@ -136,23 +93,28 @@ jobs:
|
136 | 93 | path: doc/_build/latex
|
137 | 94 | retention-days: 7
|
138 | 95 |
|
139 |
| - #TODO: Update to use code-style |
140 | 96 | release:
|
141 |
| - name: Release project |
142 |
| - if: github.event_name == 'push' && contains(github.ref, 'refs/tags') |
143 |
| - # needs: [code-style, doc-build] |
144 |
| - needs: [doc-build] |
| 97 | + if: github.event_name == 'refs/heads/main' && !contains(github.ref, 'refs/tags') |
| 98 | + needs: [doc-build, doc-style] |
145 | 99 | runs-on: ubuntu-latest
|
146 | 100 | steps:
|
147 |
| - # TODO: update if ever public |
148 |
| - # - name: Release to the public PyPI repository |
149 |
| - # uses: ansys/actions/release-pypi-public@v5 |
150 |
| - # with: |
151 |
| - # library-name: ${{ env.PACKAGE_NAME }} |
152 |
| - # twine-username: "__token__" |
153 |
| - # twine-token: ${{ secrets.PYPI_TOKEN }} |
154 |
| - |
155 |
| - - name: Release to GitHub |
156 |
| - uses: ansys/actions/release-github@v5 |
| 101 | + - uses: actions/checkout@v4 |
| 102 | + |
| 103 | + - uses: actions/download-artifact@v4 |
| 104 | + |
| 105 | + - name: Display structure of downloaded files |
| 106 | + run: ls -R |
| 107 | + |
| 108 | + - name: Zip HTML documentation |
| 109 | + uses: vimtor/action-zip@v1.2 |
| 110 | + with: |
| 111 | + files: documentation-html |
| 112 | + dest: documentation-html.zip |
| 113 | + |
| 114 | + - name: Release |
| 115 | + uses: softprops/action-gh-release@v2 |
157 | 116 | with:
|
158 |
| - library-name: ${{ env.PACKAGE_NAME }} |
| 117 | + generate_release_notes: true |
| 118 | + files: | |
| 119 | + ./documentation-html.zip |
| 120 | + ./documentation-pdf/*.pdf |
0 commit comments