[Snyk] Security upgrade setuptools from 40.5.0 to 78.1.1 #16
This file contains hidden or 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 | |
| - release/* | |
| concurrency: | |
| group: ${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| # Following env vars when changed will "reset" the mentioned cache, | |
| # by changing the cache file name. It is rendered as ...-v%RESET_XXX%-... | |
| # You should go up in number, if you go down (or repeat a previous value) | |
| # you might end up reusing a previous cache if it haven't been deleted already. | |
| # It applies 7 days retention policy by default. | |
| RESET_EXAMPLES_CACHE: 6 | |
| API_CODE_CACHE: 3 | |
| DOCUMENTATION_CNAME: 'fluent.docs.pyansys.com' | |
| PACKAGE_NAME: 'ansys-fluent-core' | |
| PACKAGE_NAMESPACE: 'ansys.fluent.core' | |
| jobs: | |
| docs-style: | |
| name: Documentation Style Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Running Vale | |
| uses: errata-ai/vale-action@reviewdog | |
| env: | |
| GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
| with: | |
| files: doc | |
| reporter: github-pr-check | |
| level: error | |
| filter_mode: nofilter | |
| fail_on_error: true | |
| vale_flags: "--config=doc/.vale.ini" | |
| test-import: | |
| name: Build and Smoke tests | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| python-version: ['3.8', '3.9', '3.10', '3.11'] | |
| should-release: | |
| - ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags') }} | |
| exclude: | |
| - should-release: false | |
| os: macos-latest | |
| steps: | |
| - name: Build wheelhouse and perform smoke test | |
| uses: ansys/actions/build-wheelhouse@v4 | |
| with: | |
| library-name: ${{ env.PACKAGE_NAME }} | |
| library-namespace: ${{ env.PACKAGE_NAMESPACE }} | |
| operating-system: ${{ matrix.os }} | |
| python-version: ${{ matrix.python-version }} | |
| docs_build: | |
| name: Build Documentation | |
| needs: [docs-style] | |
| runs-on: [self-hosted, pyfluent] | |
| env: | |
| DOC_DEPLOYMENT_IMAGE_TAG: v23.1.0 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Setup Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.10' | |
| - name: Install OS packages | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install pandoc libegl1 make xvfb libfontconfig1 libxrender1 libxkbcommon-x11-0 -y | |
| - name: Cache pip | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.cache/pip | |
| key: Python-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('setup.py') }}-${{ hashFiles('requirements/requirements_doc.txt') }} | |
| restore-keys: | | |
| Python-${{ runner.os }}-${{ matrix.python-version }} | |
| - name: Install pyfluent | |
| run: make install | |
| - name: Retrieve PyFluent version | |
| run: | | |
| echo "PYFLUENT_VERSION=$(python -c "from ansys.fluent.core import __version__; print(); print(__version__)" | tail -1)" >> $GITHUB_OUTPUT | |
| echo "PYFLUENT version is: $(python -c "from ansys.fluent.core import __version__; print(); print(__version__)" | tail -1)" | |
| id: version | |
| - name: Cache API Code | |
| uses: actions/cache@v3 | |
| id: cache-api-code | |
| with: | |
| path: | | |
| src/ansys/fluent/core/datamodel_231 | |
| src/ansys/fluent/core/fluent_version_231.py | |
| src/ansys/fluent/core/meshing/tui_231.py | |
| src/ansys/fluent/core/solver/settings_231 | |
| src/ansys/fluent/core/solver/tui_231.py | |
| doc/source/api/meshing/tui | |
| doc/source/api/meshing/datamodel | |
| doc/source/api/solver/tui | |
| doc/source/api/solver/datamodel | |
| key: API-Code-v${{ env.API_CODE_CACHE }}-${{ steps.version.outputs.PYFLUENT_VERSION }}-${{ env.DOC_DEPLOYMENT_IMAGE_TAG }}-${{ hashFiles('codegen/**') }} | |
| restore-keys: API-Code-v${{ env.API_CODE_CACHE }}-${{ steps.version.outputs.PYFLUENT_VERSION }}-${{ env.DOC_DEPLOYMENT_IMAGE_TAG }} | |
| - name: Login to GitHub Container Registry | |
| if: steps.cache-api-code.outputs.cache-hit != 'true' | |
| uses: docker/login-action@v2 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ secrets.GH_USERNAME }} | |
| password: ${{ secrets.REPO_DOWNLOAD_PAT }} | |
| - name: Pull Fluent docker image | |
| if: steps.cache-api-code.outputs.cache-hit != 'true' | |
| run: make docker-pull | |
| env: | |
| FLUENT_IMAGE_TAG: ${{ env.DOC_DEPLOYMENT_IMAGE_TAG }} | |
| - name: Run API codegen | |
| if: steps.cache-api-code.outputs.cache-hit != 'true' | |
| run: make api-codegen | |
| env: | |
| ANSYSLMD_LICENSE_FILE: ${{ format('1055@{0}', secrets.LICENSE_SERVER) }} | |
| PYFLUENT_START_INSTANCE: 0 | |
| PYFLUENT_LAUNCH_CONTAINER: 1 | |
| FLUENT_IMAGE_TAG: ${{ env.DOC_DEPLOYMENT_IMAGE_TAG }} | |
| - name: Install again after codegen | |
| run: | | |
| rm -rf dist | |
| make install > /dev/null | |
| - name: Cache examples | |
| uses: actions/cache@v3 | |
| with: | |
| path: doc/source/examples | |
| key: Examples-v${{ env.RESET_EXAMPLES_CACHE }}-${{ steps.version.outputs.PYFLUENT_VERSION }}-${{ env.DOC_DEPLOYMENT_IMAGE_TAG }}-${{ hashFiles('examples/**', 'doc/source/conf.py') }} | |
| restore-keys: | | |
| Examples-v${{ env.RESET_EXAMPLES_CACHE }}-${{ steps.version.outputs.PYFLUENT_VERSION }}-${{ env.DOC_DEPLOYMENT_IMAGE_TAG }} | |
| - name: Build Source Documentation | |
| run: make build-doc-source | |
| env: | |
| ANSYSLMD_LICENSE_FILE: ${{ format('1055@{0}', secrets.LICENSE_SERVER) }} | |
| PYFLUENT_START_INSTANCE: 0 | |
| FLUENT_IMAGE_TAG: ${{ env.DOC_DEPLOYMENT_IMAGE_TAG }} | |
| - name: Zip HTML Documentation before upload | |
| run: | | |
| sudo apt install zip -y | |
| pushd doc/_build/html | |
| zip -r ../../../HTML-Documentation-tag-${{ env.DOC_DEPLOYMENT_IMAGE_TAG }}.zip . | |
| popd | |
| - name: Upload HTML Documentation | |
| uses: actions/upload-artifact@v3 | |
| with: | |
| name: HTML-Documentation-tag-${{ env.DOC_DEPLOYMENT_IMAGE_TAG }} | |
| path: HTML-Documentation-tag-${{ env.DOC_DEPLOYMENT_IMAGE_TAG }}.zip | |
| retention-days: 7 | |
| build: | |
| name: Build | |
| needs: test-import | |
| runs-on: [self-hosted, pyfluent] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Setup Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: 3.8 | |
| - name: Cache pip | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.cache/pip | |
| key: Python-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('setup.py') }}-${{ hashFiles('requirements/requirements_*.txt') }} | |
| restore-keys: | | |
| Python-${{ runner.os }}-${{ matrix.python-version }} | |
| - name: Add version information | |
| run: make version-info | |
| - name: Install pyfluent | |
| run: make install | |
| - name: Retrieve PyFluent version | |
| run: | | |
| echo "PYFLUENT_VERSION=$(python -c "from ansys.fluent.core import __version__; print(); print(__version__)" | tail -1)" >> $GITHUB_OUTPUT | |
| echo "PYFLUENT version is: $(python -c "from ansys.fluent.core import __version__; print(); print(__version__)" | tail -1)" | |
| id: version | |
| - name: Cache 22.2 API Code | |
| uses: actions/cache@v3 | |
| id: cache-222-api-code | |
| with: | |
| path: | |
| src/ansys/fluent/core/datamodel_222 | |
| src/ansys/fluent/core/fluent_version_222.py | |
| src/ansys/fluent/core/meshing/tui_222.py | |
| src/ansys/fluent/core/solver/settings_222 | |
| src/ansys/fluent/core/solver/tui_222.py | |
| doc/source/api/core/meshing/tui | |
| doc/source/api/core/meshing/datamodel | |
| doc/source/api/core/solver/tui | |
| doc/source/api/core/solver/datamodel | |
| key: API-Code-v${{ env.API_CODE_CACHE }}-${{ steps.version.outputs.PYFLUENT_VERSION }}-v22.2.0-${{ hashFiles('codegen/**') }} | |
| restore-keys: API-Code-v${{ env.API_CODE_CACHE }}-${{ steps.version.outputs.PYFLUENT_VERSION }}-v22.2.0 | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v2 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ secrets.GH_USERNAME }} | |
| password: ${{ secrets.REPO_DOWNLOAD_PAT }} | |
| - name: Pull 22.2 Fluent docker image | |
| if: steps.cache-222-api-code.outputs.cache-hit != 'true' | |
| run: make docker-pull | |
| env: | |
| FLUENT_IMAGE_TAG: v22.2.0 | |
| - name: Run 22.2 API codegen | |
| if: steps.cache-222-api-code.outputs.cache-hit != 'true' | |
| run: make api-codegen | |
| env: | |
| ANSYSLMD_LICENSE_FILE: ${{ format('1055@{0}', secrets.LICENSE_SERVER) }} | |
| PYFLUENT_START_INSTANCE: 0 | |
| PYFLUENT_LAUNCH_CONTAINER: 1 | |
| FLUENT_IMAGE_TAG: v22.2.0 | |
| - name: Print 22.2 Fluent version info | |
| run: | | |
| cat src/ansys/fluent/core/fluent_version_222.py | |
| python -c "from ansys.fluent.core.solver.settings_222 import SHASH; print(f'SETTINGS_HASH = {SHASH}')" | |
| - name: Cache 23.1 API Code | |
| uses: actions/cache@v3 | |
| id: cache-231-api-code | |
| with: | |
| path: | |
| src/ansys/fluent/core/datamodel_231 | |
| src/ansys/fluent/core/fluent_version_231.py | |
| src/ansys/fluent/core/meshing/tui_231.py | |
| src/ansys/fluent/core/solver/settings_231 | |
| src/ansys/fluent/core/solver/tui_231.py | |
| doc/source/api/core/meshing/tui | |
| doc/source/api/core/meshing/datamodel | |
| doc/source/api/core/solver/tui | |
| doc/source/api/core/solver/datamodel | |
| key: API-Code-v${{ env.API_CODE_CACHE }}-${{ steps.version.outputs.PYFLUENT_VERSION }}-v23.1.0-${{ hashFiles('codegen/**') }} | |
| restore-keys: API-Code-v${{ env.API_CODE_CACHE }}-${{ steps.version.outputs.PYFLUENT_VERSION }}-v23.1.0 | |
| - name: Pull 23.1 Fluent docker image | |
| if: steps.cache-231-api-code.outputs.cache-hit != 'true' | |
| run: make docker-pull | |
| env: | |
| FLUENT_IMAGE_TAG: v23.1.0 | |
| - name: Run 23.1 API codegen | |
| if: steps.cache-231-api-code.outputs.cache-hit != 'true' | |
| run: make api-codegen | |
| env: | |
| ANSYSLMD_LICENSE_FILE: ${{ format('1055@{0}', secrets.LICENSE_SERVER) }} | |
| PYFLUENT_START_INSTANCE: 0 | |
| PYFLUENT_LAUNCH_CONTAINER: 1 | |
| FLUENT_IMAGE_TAG: v23.1.0 | |
| - name: Print 23.1 Fluent version info | |
| run: | | |
| cat src/ansys/fluent/core/fluent_version_231.py | |
| python -c "from ansys.fluent.core.solver.settings_231 import SHASH; print(f'SETTINGS_HASH = {SHASH}')" | |
| - name: Install again after codegen | |
| run: | | |
| rm -rf dist | |
| make install > /dev/null | |
| - name: Check package | |
| run: | | |
| pip install twine | |
| twine check dist/* | |
| - name: Upload package | |
| uses: actions/upload-artifact@v3 | |
| with: | |
| name: PyFluent-packages | |
| path: | | |
| dist/*.whl | |
| dist/*.tar.gz | |
| retention-days: 7 | |
| test: | |
| name: Unit Testing | |
| needs: build | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - image-tag: v22.2.0 | |
| version: 222 | |
| - image-tag: v23.1.0 | |
| version: 231 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Setup Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: 3.8 | |
| - name: Download package | |
| uses: actions/download-artifact@v3 | |
| with: | |
| name: PyFluent-packages | |
| path: dist | |
| - name: Install pyfluent | |
| run: pip install -q --force-reinstall dist/*.whl > /dev/null | |
| - name: Retrieve PyFluent version | |
| run: | | |
| echo "PYFLUENT_VERSION=$(python -c "from ansys.fluent.core import __version__; print(); print(__version__)" | tail -1)" >> $GITHUB_OUTPUT | |
| echo "PYFLUENT version is: $(python -c "from ansys.fluent.core import __version__; print(); print(__version__)" | tail -1)" | |
| id: version | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v2 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ secrets.GH_USERNAME }} | |
| password: ${{ secrets.REPO_DOWNLOAD_PAT }} | |
| - name: Pull Fluent docker image | |
| run: make docker-pull | |
| env: | |
| FLUENT_IMAGE_TAG: ${{ matrix.image-tag }} | |
| - name: Unit Testing | |
| run: make unittest-dev-${{ matrix.version }} | |
| env: | |
| ANSYSLMD_LICENSE_FILE: ${{ format('1055@{0}', secrets.LICENSE_SERVER) }} | |
| PYFLUENT_START_INSTANCE: 0 | |
| FLUENT_IMAGE_TAG: ${{ matrix.image-tag }} | |
| - name: Upload 23.1 Coverage Results to Codecov | |
| if: matrix.image-tag == 'v23.1.0' && github.event_name == 'push' | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| root_dir: ${{ github.workspace }} | |
| name: cov_xml.xml | |
| - name: Upload 23.1 Coverage Artifacts | |
| if: matrix.image-tag == 'v23.1.0' | |
| uses: actions/upload-artifact@v3 | |
| with: | |
| name: coverage_report | |
| path: ./htmlcov | |
| # Separate build+test job for 23.2 and 24.1 Fluent | |
| # Don't upload anything to artifacts/cache/release-package from here | |
| build_test_232_241: | |
| name: Build and Test | |
| needs: test-import | |
| runs-on: [self-hosted, pyfluent] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - image-tag: v23.2.0 | |
| version: 232 | |
| - image-tag: v24.1.0 | |
| version: 241 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Setup Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: 3.8 | |
| - name: Cache pip | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.cache/pip | |
| key: Python-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('setup.py') }}-${{ hashFiles('requirements/requirements_*.txt') }} | |
| restore-keys: | | |
| Python-${{ runner.os }}-${{ matrix.python-version }} | |
| - name: Add version information | |
| run: make version-info | |
| - name: Install pyfluent | |
| run: make install | |
| - name: Retrieve PyFluent version | |
| run: | | |
| echo "PYFLUENT_VERSION=$(python -c "from ansys.fluent.core import __version__; print(); print(__version__)" | tail -1)" >> $GITHUB_OUTPUT | |
| echo "PYFLUENT version is: $(python -c "from ansys.fluent.core import __version__; print(); print(__version__)" | tail -1)" | |
| id: version | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v2 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ secrets.GH_USERNAME }} | |
| password: ${{ secrets.REPO_DOWNLOAD_PAT }} | |
| - name: Pull Fluent docker image | |
| run: make docker-pull | |
| env: | |
| FLUENT_IMAGE_TAG: ${{ matrix.image-tag }} | |
| - name: Run API codegen | |
| run: make api-codegen | |
| env: | |
| ANSYSLMD_LICENSE_FILE: ${{ format('1055@{0}', secrets.LICENSE_SERVER) }} | |
| PYFLUENT_START_INSTANCE: 0 | |
| PYFLUENT_LAUNCH_CONTAINER: 1 | |
| FLUENT_IMAGE_TAG: ${{ matrix.image-tag }} | |
| - name: Print Fluent version info | |
| run: | | |
| cat src/ansys/fluent/core/fluent_version_${{ matrix.version }}.py | |
| - name: Install again after codegen | |
| run: | | |
| rm -rf dist | |
| make install > /dev/null | |
| - name: Unit Testing | |
| run: make unittest-dev-${{ matrix.version }} | |
| env: | |
| ANSYSLMD_LICENSE_FILE: ${{ format('1055@{0}', secrets.LICENSE_SERVER) }} | |
| PYFLUENT_START_INSTANCE: 0 | |
| FLUENT_IMAGE_TAG: ${{ matrix.image-tag }} | |
| release: | |
| name: Release | |
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | |
| needs: [test, build_test_232_241] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: 3.8 | |
| - uses: actions/download-artifact@v3 | |
| - name: Display package file list | |
| run: ls -R | |
| - name: Upload to Private PyPi | |
| run: | | |
| pip install twine | |
| python -m twine upload --skip-existing ./**/*.whl | |
| python -m twine upload --skip-existing ./**/*.tar.gz | |
| env: | |
| TWINE_USERNAME: PAT | |
| TWINE_PASSWORD: ${{ secrets.PYANSYS_PYPI_PRIVATE_PAT }} | |
| TWINE_REPOSITORY_URL: https://pkgs.dev.azure.com/pyansys/_packaging/pyansys/pypi/upload | |
| - name: Upload to Public PyPi | |
| run: | | |
| pip install twine | |
| twine upload --skip-existing ./**/*.whl | |
| python -m twine upload --skip-existing ./**/*.tar.gz | |
| env: | |
| TWINE_USERNAME: __token__ | |
| TWINE_PASSWORD: ${{ secrets.ANSYS_FLUENT_CORE_PYPI_TOKEN }} | |
| - name: Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: | | |
| ./**/*.whl | |
| ./**/*.tar.gz | |
| ./**/*-wheelhouse-*.zip |