@@ -20,163 +20,196 @@ env:
2020 PACKAGE_NAME : ' ansys-modelcenter-workflow'
2121 PACKAGE_NAMESPACE : ' ansys.modelcenter.workflow'
2222 DOCUMENTATION_CNAME : ' modelcenter.docs.pyansys.com'
23- # ANSYSLMD_LICENSE_FILE: ${{ format('1055@{0}', secrets.LICENSE_SERVER) }}
23+ # ANSYSLMD_LICENSE_FILE: ${{ format('1055@{0}', secrets.LICENSE_SERVER) }}
2424
2525jobs :
26- doc-style :
27- name : " Documentation Style Check"
28- runs-on : ubuntu-latest
29- steps :
30- - name : PyAnsys documentation style checks
31- uses : ansys/actions/doc-style@v8
32- with :
33- token : ${{ secrets.GITHUB_TOKEN }}
34-
3526
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, macos-latest]
43- python-version : ['3.10', '3.11', '3.12', '3.13']
44- # Only perform wheelhouse builds for Windows and macOS when releasing
45- should-release :
46- - ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags') }}
47- exclude :
48- - should-release : false
49- os : macos-latest
50- - should-release : false
51- os : windows-latest
27+ debugging :
28+ name : " Debugging"
29+ runs-on : [self-hosted, pymodelcenter]
30+ defaults :
31+ run :
32+ shell : pwsh
5233 steps :
53- - name : Build wheelhouse and perform smoke test
54- uses : ansys/actions/build-wheelhouse@v8
55- with :
56- library-name : ${{ env.PACKAGE_NAME }}
57- operating-system : ${{ matrix.os }}
58- python-version : ${{ matrix.python-version }}
5934
35+ - name : " Checkout project"
36+ uses : actions/checkout@v5
6037
61- build-tests :
62- name : " Build and unit testing"
63- needs : [smoke-tests]
64- runs-on : windows-latest
65- strategy :
66- matrix :
67- python-version : ['3.10', '3.11', '3.12', '3.13']
68- should-release :
69- - ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags') }}
70- steps :
71- - name : " Install Git and checkout project"
72- uses : actions/checkout@v4
73-
74- - name : " Setup Python"
75- uses : actions/setup-python@v5
38+ - name : " Setup Python via UV"
39+ uses : astral-sh/setup-uv@v7
7640 with :
7741 python-version : ${{ env.MAIN_PYTHON_VERSION }}
7842
79- - name : " Install packages for testing "
43+ - name : " Install project "
8044 run : |
81- pip install --upgrade pip
82- pip install .[tests]
83-
84- - name : " Testing"
85- run : pytest -v
86-
87- - name : " Upload coverage artifacts"
88- uses : actions/upload-artifact@v4
89- if : matrix.python-version == env.MAIN_PYTHON_VERSION
90- with :
91- name : coverage-html
92- path : .cov/html
93- retention-days : 7
94-
95- - name : " Upload coverage to Codecov"
96- uses : codecov/codecov-action@v5
97- if : matrix.python-version == env.MAIN_PYTHON_VERSION
98- with :
99- token : ${{ secrets.CODECOV_TOKEN }}
100- files : .cov/xml
101-
102-
103- doc-build :
104- name : " Documentation building"
105- runs-on : [self-hosted, Windows, pymodelcenter]
106- needs : [doc-style]
107- steps :
108- # - name: Temporary handle broken package dependencies
109- # shell: bash
110- # run: |
111- # sudo apt-get update
112- # sudo apt-get --fix-broken install -y
113- # sudo apt-get install -y texlive-latex-extra latexmk texlive-fonts-extra
114-
115- - name : " Run Ansys documentation building action"
116- uses : ansys/actions/doc-build@21c9de9bee9692173780696d4a39964f20b9cfa3 # v10.1.5
117- with :
118- python-version : ${{ env.MAIN_PYTHON_VERSION }}
119- # skip-install: true
120- # dependencies: "texlive-fonts-extra"
121-
122- package :
123- name : " Package library"
124- needs : [build-tests, doc-build]
125- runs-on : ubuntu-latest
126- steps :
127- - name : " Build library source and wheel artifacts"
128- uses : ansys/actions/build-library@v8
129- with :
130- library-name : ${{ env.PACKAGE_NAME }}
131- python-version : ${{ env.MAIN_PYTHON_VERSION }}
132-
133-
134- doc-deploy-dev :
135- name : " Deploy developers documentation"
136- runs-on : ubuntu-latest
137- # Deploy development only when merging to main
138- if : github.ref == 'refs/heads/main'
139- needs : [package]
140- steps :
141- - name : " Deploy the latest documentation"
142- uses : ansys/actions/doc-deploy-dev@v8
143- with :
144- cname : ${{ env.DOCUMENTATION_CNAME }}
145- token : ${{ secrets.GITHUB_TOKEN }}
146- bot-user : ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
147- bot-email : ${{ secrets.PYANSYS_CI_BOT_EMAIL }}
148-
149-
150- release :
151- name : " Release project to public PyPI and GitHub"
152- if : github.event_name == 'push' && contains(github.ref, 'refs/tags')
153- needs : [package]
154- runs-on : ubuntu-latest
155- steps :
156- - name : " Release to the public PyPI repository"
157- uses : ansys/actions/release-pypi-public@v8
158- with :
159- library-name : ${{ env.PACKAGE_NAME }}
160- twine-username : " __token__"
161- twine-token : ${{ secrets.PYPI_TOKEN }}
162-
163- - name : " Release to GitHub"
164- uses : ansys/actions/release-github@v8
165- with :
166- library-name : ${{ env.PACKAGE_NAME }}
45+ uv venv --seed --python ${{ env.MAIN_PYTHON_VERSION }}
46+ .venv\Scripts\activate
47+ #uv pip install --editable .
48+ uv pip install ansys-modelcenter-workflow
16749
50+ - name : " List all environment variables"
51+ run : |
52+ gci env:* | sort-object name
16853
169- doc-deploy-stable :
170- name : " Deploy stable documentation"
171- # Deploy release documentation when creating a new tag
172- if : github.event_name == 'push' && contains(github.ref, 'refs/tags')
173- runs-on : ubuntu-latest
174- needs : [release]
175- steps :
176- - name : " Deploy the stable documentation"
177- uses : ansys/actions/doc-deploy-stable@v8
178- with :
179- cname : ${{ env.DOCUMENTATION_CNAME }}
180- token : ${{ secrets.GITHUB_TOKEN }}
181- bot-user : ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
182- bot-email : ${{ secrets.PYANSYS_CI_BOT_EMAIL }}
54+ - name : " Run basic example"
55+ run : |
56+ .venv\Scripts\activate
57+ python examples/BasicExample.py
58+
59+ # doc-style:
60+ # name: "Documentation Style Check"
61+ # runs-on: ubuntu-latest
62+ # steps:
63+ # - name: PyAnsys documentation style checks
64+ # uses: ansys/actions/doc-style@v8
65+ # with:
66+ # token: ${{ secrets.GITHUB_TOKEN }}
67+ #
68+ #
69+ # smoke-tests:
70+ # name: "Build and Smoke tests"
71+ # runs-on: ${{ matrix.os }}
72+ # strategy:
73+ # fail-fast: false
74+ # matrix:
75+ # os: [ubuntu-latest, windows-latest, macos-latest]
76+ # python-version: ['3.10', '3.11', '3.12', '3.13']
77+ # # Only perform wheelhouse builds for Windows and macOS when releasing
78+ # should-release:
79+ # - ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags') }}
80+ # exclude:
81+ # - should-release: false
82+ # os: macos-latest
83+ # - should-release: false
84+ # os: windows-latest
85+ # steps:
86+ # - name: Build wheelhouse and perform smoke test
87+ # uses: ansys/actions/build-wheelhouse@v8
88+ # with:
89+ # library-name: ${{ env.PACKAGE_NAME }}
90+ # operating-system: ${{ matrix.os }}
91+ # python-version: ${{ matrix.python-version }}
92+ #
93+ #
94+ # build-tests:
95+ # name: "Build and unit testing"
96+ # needs: [smoke-tests]
97+ # runs-on: windows-latest
98+ # strategy:
99+ # matrix:
100+ # python-version: ['3.10', '3.11', '3.12', '3.13']
101+ # should-release:
102+ # - ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags') }}
103+ # steps:
104+ # - name: "Install Git and checkout project"
105+ # uses: actions/checkout@v4
106+ #
107+ # - name: "Setup Python"
108+ # uses: actions/setup-python@v5
109+ # with:
110+ # python-version: ${{ env.MAIN_PYTHON_VERSION }}
111+ #
112+ # - name: "Install packages for testing"
113+ # run: |
114+ # pip install --upgrade pip
115+ # pip install .[tests]
116+ #
117+ # - name: "Testing"
118+ # run: pytest -v
119+ #
120+ # - name: "Upload coverage artifacts"
121+ # uses: actions/upload-artifact@v4
122+ # if: matrix.python-version == env.MAIN_PYTHON_VERSION
123+ # with:
124+ # name: coverage-html
125+ # path: .cov/html
126+ # retention-days: 7
127+ #
128+ # - name: "Upload coverage to Codecov"
129+ # uses: codecov/codecov-action@v5
130+ # if: matrix.python-version == env.MAIN_PYTHON_VERSION
131+ # with:
132+ # token: ${{ secrets.CODECOV_TOKEN }}
133+ # files: .cov/xml
134+ #
135+ #
136+ # doc-build:
137+ # name: "Documentation building"
138+ # runs-on: [self-hosted, Windows, pymodelcenter]
139+ # needs: [doc-style]
140+ # steps:
141+ # # - name: Temporary handle broken package dependencies
142+ # # shell: bash
143+ # # run: |
144+ # # sudo apt-get update
145+ # # sudo apt-get --fix-broken install -y
146+ # # sudo apt-get install -y texlive-latex-extra latexmk texlive-fonts-extra
147+ #
148+ # - name: "Run Ansys documentation building action"
149+ # uses: ansys/actions/doc-build@21c9de9bee9692173780696d4a39964f20b9cfa3 # v10.1.5
150+ # with:
151+ # python-version: ${{ env.MAIN_PYTHON_VERSION }}
152+ # # skip-install: true
153+ # #dependencies: "texlive-fonts-extra"
154+ #
155+ # package:
156+ # name: "Package library"
157+ # needs: [build-tests, doc-build]
158+ # runs-on: ubuntu-latest
159+ # steps:
160+ # - name: "Build library source and wheel artifacts"
161+ # uses: ansys/actions/build-library@v8
162+ # with:
163+ # library-name: ${{ env.PACKAGE_NAME }}
164+ # python-version: ${{ env.MAIN_PYTHON_VERSION }}
165+ #
166+ #
167+ # doc-deploy-dev:
168+ # name: "Deploy developers documentation"
169+ # runs-on: ubuntu-latest
170+ # # Deploy development only when merging to main
171+ # if: github.ref == 'refs/heads/main'
172+ # needs: [package]
173+ # steps:
174+ # - name: "Deploy the latest documentation"
175+ # uses: ansys/actions/doc-deploy-dev@v8
176+ # with:
177+ # cname: ${{ env.DOCUMENTATION_CNAME }}
178+ # token: ${{ secrets.GITHUB_TOKEN }}
179+ # bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
180+ # bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }}
181+ #
182+ #
183+ # release:
184+ # name: "Release project to public PyPI and GitHub"
185+ # if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
186+ # needs: [package]
187+ # runs-on: ubuntu-latest
188+ # steps:
189+ # - name: "Release to the public PyPI repository"
190+ # uses: ansys/actions/release-pypi-public@v8
191+ # with:
192+ # library-name: ${{ env.PACKAGE_NAME }}
193+ # twine-username: "__token__"
194+ # twine-token: ${{ secrets.PYPI_TOKEN }}
195+ #
196+ # - name: "Release to GitHub"
197+ # uses: ansys/actions/release-github@v8
198+ # with:
199+ # library-name: ${{ env.PACKAGE_NAME }}
200+ #
201+ #
202+ # doc-deploy-stable:
203+ # name: "Deploy stable documentation"
204+ # # Deploy release documentation when creating a new tag
205+ # if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
206+ # runs-on: ubuntu-latest
207+ # needs: [release]
208+ # steps:
209+ # - name: "Deploy the stable documentation"
210+ # uses: ansys/actions/doc-deploy-stable@v8
211+ # with:
212+ # cname: ${{ env.DOCUMENTATION_CNAME }}
213+ # token: ${{ secrets.GITHUB_TOKEN }}
214+ # bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
215+ # bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }}
0 commit comments