Build(deps): bump the pip-deps group in /requirements with 4 updates #672
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GitHub Actions | |
on: | |
pull_request: | |
workflow_dispatch: | |
push: | |
tags: | |
- "*" | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
MAIN_PYTHON_VERSION: '3.10' | |
jobs: | |
style: | |
name: Code style | |
runs-on: ubuntu-latest | |
steps: | |
- name: PyAnsys code style checks | |
uses: ansys/actions/code-style@v8 | |
with: | |
python-version: ${{ env.MAIN_PYTHON_VERSION }} | |
docs-style: | |
name: Documentation Style Check | |
runs-on: ubuntu-latest | |
steps: | |
# - name: PyAnsys documentation style checks | |
# uses: ansys/actions/doc-style@v5 | |
# with: | |
# token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Skip | |
run: exit 0 | |
python-smoke-test: | |
name: Python - Smoke Tests | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install cmake and eigen library | |
run: | | |
sudo apt update | |
sudo apt install cmake libeigen3-dev | |
- name: Update pip | |
run: python -m pip install pip --upgrade | |
- name: Install demo-eigen-wrapper | |
run: | | |
pip install -r requirements/requirements_eigen_wrapper.txt | |
pip install src/ansys/eigen/cpp/eigen-wrapper | |
- name: Install api-eigen-example | |
run: | | |
pip install -r requirements/requirements_build.txt | |
pip install . | |
- name: Test import | |
run: | | |
python -c "from ansys.eigen.python.rest.client import DemoRESTClient; cli = DemoRESTClient('0.0.0.0', 5000); cli.get_connection_details()" | |
python-build-test: | |
name: Python - Build and Unit Testing | |
needs: [python-smoke-test, style] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.MAIN_PYTHON_VERSION }} | |
- name: Install cmake and eigen library | |
run: | | |
sudo apt update | |
sudo apt install cmake libeigen3-dev | |
- name: Install packages | |
run: | | |
pip install -r requirements/requirements_eigen_wrapper.txt | |
pip install src/ansys/eigen/cpp/eigen-wrapper | |
pip install -r requirements/requirements_build.txt | |
pip install . | |
- name: Unit Testing | |
run: | | |
pytest | |
- name: Upload Coverage Results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: HTML-Coverage | |
path: cov_html | |
retention-days: 7 | |
cpp-build-test-rest: | |
name: C++ - Build and Unit Testing - REST | |
needs: [style] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.MAIN_PYTHON_VERSION }} | |
- name: Install conan | |
run: pip install 'conan<2' | |
- name: Build C++ REST Server | |
run: | | |
cd src/ansys/eigen/cpp/rest/server/build/ | |
conan install .. && cmake .. && cmake --build . | |
# Requires installing restclient-cpp and jsoncpp libs manually - not available in conan.io | |
- name: Build C++ REST Client | |
run: | | |
sudo apt update && sudo apt install libcurl4-openssl-dev && cd external/restclient-cpp-v0.5.2 && ./autogen.sh && ./configure && sudo make install && cd - | |
sudo apt update && cd external/jsoncpp-v1.9.5/build && cmake -DCMAKE_INSTALL_INCLUDEDIR=include/jsoncpp .. && sudo make install && cd - | |
cd src/ansys/eigen/cpp/rest/client/build/ && cmake .. && cmake --build . | |
cpp-build-test-grpc: | |
name: C++ - Build and Unit Testing - gRPC | |
needs: [style] | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
package: [client, server] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.MAIN_PYTHON_VERSION }} | |
- name: Build C++ gRPC ${{ matrix.package }} | |
run: | | |
cd src/ansys/eigen/cpp/grpc/${{ matrix.package }}/ | |
make compile | |
build-doc: | |
name: Build Documentation | |
needs: [docs-style, python-build-test, cpp-build-test-rest, cpp-build-test-grpc] | |
runs-on: ubuntu-latest | |
services: | |
python-rest-server: | |
image: ghcr.io/ansys/api-eigen-example/python-rest-server:latest | |
ports: | |
- 5000:5000 | |
python-grpc-server: | |
image: ghcr.io/ansys/api-eigen-example/python-grpc-server:latest | |
ports: | |
- 50051:50051 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.MAIN_PYTHON_VERSION }} | |
- name: Install project requirements | |
run: | | |
sudo apt update | |
sudo apt install cmake libeigen3-dev doxygen graphviz | |
pip install -r requirements/requirements_eigen_wrapper.txt | |
pip install src/ansys/eigen/cpp/eigen-wrapper | |
pip install -r requirements/requirements_build.txt | |
pip install . | |
pip install -r requirements/requirements_docs.txt | |
- name: Build documentation | |
run: | | |
make -C doc html | |
- name: Upload documentation | |
uses: actions/upload-artifact@v4 | |
with: | |
name: HTML-Documentation | |
path: doc/_build/html | |
retention-days: 7 | |
- name: Deploy documentation to gh-pages | |
if: github.ref == 'refs/heads/main' | |
uses: JamesIves/[email protected] | |
with: | |
token: ${{ secrets.github_token }} | |
branch: gh-pages | |
folder: doc/_build/html | |
clean: true | |
single-commit: true |