1515 description : " Branch of the 'ansys-api-acp' repository used during the build."
1616 required : false
1717 docker_image_suffix :
18- description : " Suffix of the 'pyacp ' docker image used for testing. For example, ':latest', or '@sha256:<hash>' (without quotes)."
18+ description : " Suffix of the 'acp ' docker image used for testing. For example, ':latest', or '@sha256:<hash>' (without quotes)."
1919 required : false
2020
2121env :
2222 MAIN_PYTHON_VERSION : " 3.12"
2323 PACKAGE_NAME : " ansys-acp-core"
2424 DOCUMENTATION_CNAME : " acp.docs.pyansys.com"
25+ API_BRANCH : ${{ github.event.inputs.api_branch || '' }}
26+ DOCKER_IMAGE_NAME : " ghcr.io/ansys/acp${{ github.event.inputs.docker_image_suffix || ':latest' }}"
2527
2628concurrency :
2729 group : ${{ github.workflow }}-${{ github.ref }}
@@ -56,10 +58,22 @@ jobs:
5658 pip install 'poetry!=1.7.0'
5759 poetry install --with dev,test
5860
59- - name : Install custom API branch if needed
60- if : " ${{ github.event.inputs.api_branch != '' }}"
61+ - name : Build API package from custom branch
62+ if : " ${{ env.API_BRANCH != '' }}"
63+ run : |
64+ python3.10 -m venv .api_builder_venv
65+ . .api_builder_venv/bin/activate
66+ python -m pip install --upgrade pip wheel
67+ mkdir .api_package
68+ python -m pip wheel --no-deps --wheel-dir .api_package git+https://github.com/ansys/ansys-api-acp.git@${{ env.API_BRANCH }}
69+
70+ - name : Install custom API branch package
71+ if : " ${{ env.API_BRANCH != '' }}"
72+ # The --no-deps flag is added since this may cause dependency conflicts with
73+ # other transitive dependencies. For example, when a newer version of protobuf
74+ # is installed.
6175 run : |
62- poetry run pip install --force-reinstall git+https://github.com/ansys/ansys-api-acp.git@${{ github.event.inputs.api_branch }}
76+ poetry run pip install --no-deps -- force-reinstall .api_package/*.whl
6377
6478 - name : Run pre-commit
6579 run : |
6983 name : " Documentation style"
7084 runs-on : ubuntu-latest
7185 steps :
72- - uses : ansys/actions/doc-style@v5
86+ - uses : ansys/actions/doc-style@v7
7387 with :
7488 token : ${{ secrets.GITHUB_TOKEN }}
75- vale-version : " 3.1.0"
7689
7790 build-wheelhouse :
7891 name : " Build wheelhouse"
88101 os : macos-latest
89102 steps :
90103 - name : " Build wheelhouse and perform smoke test"
91- uses : ansys/actions/build-wheelhouse@v5
104+ uses : ansys/actions/build-wheelhouse@v7
92105 with :
93106 library-name : ${{ env.PACKAGE_NAME }}
94107 operating-system : ${{ matrix.os }}
@@ -127,18 +140,21 @@ jobs:
127140 poetry install --with test
128141
129142 - name : Build API package from custom branch
130- if : " ${{ github.event.inputs.api_branch != '' }}"
143+ if : " ${{ env.API_BRANCH != '' }}"
131144 run : |
132145 python3.10 -m venv .api_builder_venv
133146 . .api_builder_venv/bin/activate
134147 python -m pip install --upgrade pip wheel
135148 mkdir .api_package
136- python -m pip wheel --no-deps --wheel-dir .api_package git+https://github.com/ansys/ansys-api-acp.git@${{ github.event.inputs.api_branch }}
149+ python -m pip wheel --no-deps --wheel-dir .api_package git+https://github.com/ansys/ansys-api-acp.git@${{ env.API_BRANCH }}
137150
138151 - name : Install custom API branch package
139- if : " ${{ github.event.inputs.api_branch != '' }}"
152+ if : " ${{ env.API_BRANCH != '' }}"
153+ # The --no-deps flag is added since this may cause dependency conflicts with
154+ # other transitive dependencies. For example, when a newer version of protobuf
155+ # is installed.
140156 run : |
141- poetry run pip install --force-reinstall .api_package/*.whl
157+ poetry run pip install --no-deps -- force-reinstall .api_package/*.whl
142158
143159 - name : Login in Github Container registry
144160 uses : docker/login-action@v3
@@ -178,7 +194,7 @@ jobs:
178194 poetry run pytest -v --license-server=1055@$LICENSE_SERVER --no-server-log-files --docker-image=$IMAGE_NAME --build-benchmark-image --benchmark-json benchmark_output.json --benchmark-group-by=fullname ${{ (matrix.python-version == '3.9' && github.ref == 'refs/heads/main') && ' ' || '--validate-benchmarks-only' }}
179195 env :
180196 LICENSE_SERVER : ${{ secrets.LICENSE_SERVER }}
181- IMAGE_NAME : " ghcr.io/ansys/acp ${{ github.event.inputs.docker_image_suffix || ':latest' }} "
197+ IMAGE_NAME : ${{ env.DOCKER_IMAGE_NAME }}
182198
183199 - name : Store benchmark result
184200 uses : benchmark-action/github-action-benchmark@v1
@@ -219,18 +235,21 @@ jobs:
219235 poetry install --with test,dev
220236
221237 - name : Build API package from custom branch
222- if : " ${{ github.event.inputs.api_branch != '' }}"
238+ if : " ${{ env.API_BRANCH != '' }}"
223239 run : |
224240 python3.10 -m venv .api_builder_venv
225241 . .api_builder_venv/bin/activate
226242 python -m pip install --upgrade pip wheel
227243 mkdir .api_package
228- python -m pip wheel --no-deps --wheel-dir .api_package git+https://github.com/ansys/ansys-api-acp.git@${{ github.event.inputs.api_branch }}
244+ python -m pip wheel --no-deps --wheel-dir .api_package git+https://github.com/ansys/ansys-api-acp.git@${{ env.API_BRANCH }}
229245
230246 - name : Install custom API branch package
231- if : " ${{ github.event.inputs.api_branch != '' }}"
247+ if : " ${{ env.API_BRANCH != '' }}"
248+ # The --no-deps flag is added since this may cause dependency conflicts with
249+ # other transitive dependencies. For example, when a newer version of protobuf
250+ # is installed.
232251 run : |
233- poetry run pip install --force-reinstall .api_package/*.whl
252+ poetry run pip install --no-deps -- force-reinstall .api_package/*.whl
234253
235254 - name : Login in Github Container registry
236255 uses : docker/login-action@v3
@@ -264,7 +283,7 @@ jobs:
264283 xvfb-run poetry run make -C doc doctest
265284 env :
266285 LICENSE_SERVER : ${{ secrets.LICENSE_SERVER }}
267- IMAGE_NAME : " ghcr.io/ansys/acp ${{ github.event.inputs.docker_image_suffix || ':latest' }} "
286+ IMAGE_NAME : ${{ env.DOCKER_IMAGE_NAME }}
268287 PYACP_DOC_SKIP_GALLERY : " true"
269288 PYACP_DOC_SKIP_API : " true"
270289
@@ -296,7 +315,7 @@ jobs:
296315 uses : docker/login-action@v3
297316 with :
298317 registry : ghcr.io
299- username : pyansys-ci-bot
318+ username : ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
300319 password : ${{ secrets.PYANSYS_CI_BOT_PACKAGE_TOKEN }}
301320 if : ${{ matrix.build_type == 'full' }}
302321
@@ -311,16 +330,28 @@ jobs:
311330 pip install 'poetry!=1.7.0'
312331 poetry install --with dev
313332
314- - name : Install custom API branch if needed
315- if : " ${{ github.event.inputs.api_branch != '' }}"
333+ - name : Build API package from custom branch
334+ if : " ${{ env.API_BRANCH != '' }}"
316335 run : |
317- poetry run pip install --force-reinstall git+https://github.com/ansys/ansys-api-acp.git@${{ github.event.inputs.api_branch }}
336+ python3.10 -m venv .api_builder_venv
337+ . .api_builder_venv/bin/activate
338+ python -m pip install --upgrade pip wheel
339+ mkdir .api_package
340+ python -m pip wheel --no-deps --wheel-dir .api_package git+https://github.com/ansys/ansys-api-acp.git@${{ env.API_BRANCH }}
341+
342+ - name : Install custom API branch package
343+ if : " ${{ env.API_BRANCH != '' }}"
344+ # The --no-deps flag is added since this may cause dependency conflicts with
345+ # other transitive dependencies. For example, when a newer version of protobuf
346+ # is installed.
347+ run : |
348+ poetry run pip install --no-deps --force-reinstall .api_package/*.whl
318349
319350 - name : Configure Local Product Launcher for ACP
320351 run : >
321352 poetry run
322353 ansys-launcher configure ACP docker_compose
323- --image_name_pyacp=ghcr.io/ansys/acp ${{ github.event.inputs.docker_image_suffix || ':latest' }}
354+ --image_name_pyacp=${{ env.DOCKER_IMAGE_NAME }}
324355 --image_name_filetransfer=ghcr.io/ansys/tools-filetransfer:latest
325356 --license_server=1055@$LICENSE_SERVER
326357 --keep_volume=False
@@ -394,7 +425,7 @@ jobs:
394425 timeout-minutes : 30
395426 steps :
396427 - name : Build library source and wheel artifacts
397- uses : ansys/actions/build-library@v5
428+ uses : ansys/actions/build-library@v7
398429 with :
399430 library-name : ${{ env.PACKAGE_NAME }}
400431 python-version : ${{ env.MAIN_PYTHON_VERSION }}
@@ -406,14 +437,14 @@ jobs:
406437 runs-on : ubuntu-latest
407438 steps :
408439 - name : Release to the public PyPI repository
409- uses : ansys/actions/release-pypi-public@v5
440+ uses : ansys/actions/release-pypi-public@v7
410441 with :
411442 library-name : ${{ env.PACKAGE_NAME }}
412443 twine-username : " __token__"
413444 twine-token : ${{ secrets.PYPI_TOKEN }}
414445
415446 - name : Release to GitHub
416- uses : ansys/actions/release-github@v5
447+ uses : ansys/actions/release-github@v7
417448 with :
418449 library-name : ${{ env.PACKAGE_NAME }}
419450
@@ -424,7 +455,7 @@ jobs:
424455 needs : [build]
425456 steps :
426457 - name : Deploy the latest documentation
427- uses : ansys/actions/doc-deploy-dev@v5
458+ uses : ansys/actions/doc-deploy-dev@v7
428459 with :
429460 cname : ${{ env.DOCUMENTATION_CNAME }}
430461 token : ${{ secrets.GITHUB_TOKEN }}
@@ -437,7 +468,7 @@ jobs:
437468 needs : [release]
438469 steps :
439470 - name : Deploy the stable documentation
440- uses : ansys/actions/doc-deploy-stable@v5
471+ uses : ansys/actions/doc-deploy-stable@v7
441472 with :
442473 cname : ${{ env.DOCUMENTATION_CNAME }}
443474 token : ${{ secrets.GITHUB_TOKEN }}
0 commit comments