Test Run Old Versions Weekly #39
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: Test Run Old Versions Weekly | |
on: | |
schedule: # UTC at 0900 on Saturday | |
- cron: '0 9 * * SAT' | |
workflow_dispatch: | |
env: | |
ANSYSLMD_LICENSE_FILE: ${{ format('1055@{0}', secrets.LICENSE_SERVER) }} | |
PYFLUENT_TIMEOUT_FORCE_EXIT: 30 | |
PYFLUENT_LAUNCH_CONTAINER: 1 | |
PYFLUENT_LOGGING: 'DEBUG' | |
PYFLUENT_WATCHDOG_DEBUG: 'OFF' | |
PYFLUENT_HIDE_LOG_SECRETS: 1 | |
MAIN_PYTHON_VERSION: '3.10' | |
jobs: | |
build: | |
name: Build package | |
runs-on: [self-hosted, pyfluent] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.MAIN_PYTHON_VERSION }} | |
- name: Cache pip | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pip | |
key: Python-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }} | |
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@v3 | |
with: | |
registry: ghcr.io | |
username: ansys-bot | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Pull 22.2 Fluent docker image | |
run: make docker-pull | |
env: | |
FLUENT_IMAGE_TAG: v22.2.0 | |
- name: Run 22.2 API codegen | |
run: make api-codegen | |
env: | |
FLUENT_IMAGE_TAG: v22.2.0 | |
- name: Print 22.2 Fluent version info | |
run: | | |
cat src/ansys/fluent/core/generated/fluent_version_222.py | |
python -c "from ansys.fluent.core.generated.solver.settings_222 import SHASH; print(f'SETTINGS_HASH = {SHASH}')" | |
- name: Pull 23.1 Fluent docker image | |
run: make docker-pull | |
env: | |
FLUENT_IMAGE_TAG: v23.1.0 | |
- name: Run 23.1 API codegen | |
run: make api-codegen | |
env: | |
FLUENT_IMAGE_TAG: v23.1.0 | |
- name: Print 23.1 Fluent version info | |
run: | | |
cat src/ansys/fluent/core/generated/fluent_version_231.py | |
python -c "from ansys.fluent.core.generated.solver.settings_231 import SHASH; print(f'SETTINGS_HASH = {SHASH}')" | |
- name: Pull 23.2 Fluent docker image | |
run: make docker-pull | |
env: | |
FLUENT_IMAGE_TAG: v23.2.0 | |
- name: Run 23.2 API codegen | |
run: make api-codegen | |
env: | |
FLUENT_IMAGE_TAG: v23.2.0 | |
- name: Print 23.2 Fluent version info | |
run: | | |
cat src/ansys/fluent/core/generated/fluent_version_232.py | |
python -c "from ansys.fluent.core.generated.solver.settings_232 import SHASH; print(f'SETTINGS_HASH = {SHASH}')" | |
- name: Pull 24.1 Fluent docker image | |
run: make docker-pull | |
env: | |
FLUENT_IMAGE_TAG: v24.1.0 | |
- name: Run 24.1 API codegen | |
run: make api-codegen | |
env: | |
FLUENT_IMAGE_TAG: v24.1.0 | |
- name: Print 24.1 Fluent version info | |
run: | | |
cat src/ansys/fluent/core/generated/fluent_version_241.py | |
python -c "from ansys.fluent.core.generated.solver.settings_241 import SHASH; print(f'SETTINGS_HASH = {SHASH}')" | |
- name: Pull 25.1 Fluent docker image | |
run: make docker-pull | |
env: | |
FLUENT_IMAGE_TAG: v25.1.0 | |
# The version-independent built-in settings classes are generated only with Fluent 25.1 | |
# which are required for the unit tests | |
- name: Run 25.1 API codegen | |
run: make api-codegen | |
env: | |
FLUENT_IMAGE_TAG: v25.1.0 | |
- name: Install again after codegen | |
run: | | |
rm -rf dist | |
make install > /dev/null | |
- name: Check package | |
run: | | |
pip install twine==5.0.0 | |
twine check dist/* | |
- name: Upload package | |
uses: actions/upload-artifact@v4 | |
with: | |
name: PyFluent-packages | |
path: | | |
dist/*.whl | |
dist/*.tar.gz | |
retention-days: 7 | |
test: | |
name: Unit Testing | |
needs: build | |
runs-on: [self-hosted, pyfluent] | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- image-tag: v22.2.0 | |
version: 222 | |
- image-tag: v23.1.0 | |
version: 231 | |
- image-tag: v23.2.0 | |
version: 232 | |
- image-tag: v24.1.0 | |
version: 241 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.MAIN_PYTHON_VERSION }} | |
- name: Download package | |
uses: actions/download-artifact@v4 | |
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@v3 | |
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: Unit Testing | |
run: | | |
make install-test | |
make unittest-all-${{ matrix.version }} | |
env: | |
FLUENT_IMAGE_TAG: ${{ matrix.image-tag }} | |
- name: Cleanup previous docker containers | |
if: always() | |
run: make cleanup-previous-docker-containers |