Skip to content

ci: Install dependencies first [skip tests] #4344

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
59 changes: 35 additions & 24 deletions .github/workflows/execute-examples-weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,41 +45,52 @@ jobs:
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: Python-${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('pyproject.toml') }}
restore-keys: |
Python-${{ runner.os }}-${{ env.PYTHON_VERSION }}

- name: Login to GitHub Container Registry
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
with:
registry: ghcr.io
username: ansys-bot
password: ${{ secrets.GITHUB_TOKEN }}

- name: Pull Fluent docker image if not present
- name: Install OS packages
run: |
if ! docker image inspect fluent:${{ matrix.image-tag }} > /dev/null 2>&1; then
echo "Image not found locally, pulling..."
make docker-pull
else
echo "Image already exists locally, skipping pull."
fi
sudo apt-get update
sudo apt-get install pandoc libegl1 make xvfb libfontconfig1 libxrender1 libxkbcommon-x11-0 -y

- name: Install pyfluent
run: make install

- name: Install Dependencies
run: |
sudo mkdir -p /home/ansys/Downloads/ansys_fluent_core_examples
sudo chmod a+rwx /home/ansys/Downloads/ansys_fluent_core_examples
sudo apt update
sudo apt install libegl1
pip install ansys-fluent-core>=0.32.1
pip install ansys-fluent-core[reader]
pip install ansys-fluent-visualization==0.21.dev1
pip install ansys-fluent-visualization>=0.21.1
pip install xgboost scikit-learn tensorflow seaborn plotly numpy pandas

- 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@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
with:
registry: ghcr.io
username: ansys-bot
password: ${{ secrets.GITHUB_TOKEN }}

- 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:
FLUENT_IMAGE_TAG: ${{ matrix.image-tag }}

- name: Install again after codegen
run: |
rm -rf dist
make install > /dev/null

- name: Execute Examples
run: |
echo "Executing examples"
Expand Down
1 change: 1 addition & 0 deletions doc/changelog.d/4344.maintenance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Install dependencies first [skip tests]
Loading