Skip to content

CI: use mambaforge, uninstall pocl before doc build #7397

CI: use mambaforge, uninstall pocl before doc build

CI: use mambaforge, uninstall pocl before doc build #7397

Workflow file for this run

name: CI
on:
pull_request:
push:
branches: main
schedule:
- cron: '5 0 * * *'
jobs:
# flake8:
# name: Flake8
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# -
# uses: actions/setup-python@v4
# with:
# # matches compat target in setup.py
# python-version: '3.8'
# - name: Flake8 test
# run: |
# python3 -m venv myenv
# source myenv/bin/activate
# python -m pip install wheel
# python -m pip install flake8 pep8-naming flake8-quotes flake8-bugbear
# python -m flake8 --show-source --statistics "$(basename $GITHUB_REPOSITORY)" test examples setup.py doc/conf.py bin/ && echo "Flake8 found no errors."
# mypy:
# name: Mypy
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# -
# uses: actions/setup-python@v4
# with:
# python-version: '3.x'
# - name: Install
# run: |
# . .ci-support/install.sh
# - name: Run mypy
# run: |
# MINIFORGE_INSTALL_DIR=.miniforge3
# . "$MINIFORGE_INSTALL_DIR/bin/activate" testing
# python -m pip install types-psutil types-PyYAML
# ./run-mypy.sh
pylint:
name: Pylint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
-
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install
run: |
. .ci-support/install.sh
- name: Run Pylint
run: |
MINIFORGE_INSTALL_DIR=.miniforge3
. "$MINIFORGE_INSTALL_DIR/bin/activate" testing
./run-pylint.sh
# pydocstyle:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# -
# uses: actions/setup-python@v4
# with:
# python-version: '3.x'
# - name: Run Pydocstyle
# run: |
# python3 -m venv myenv
# source myenv/bin/activate
# python -m pip install wheel
# python -m pip install pydocstyle
# python -m pydocstyle "$(basename $GITHUB_REPOSITORY)" && echo "pydocstyle found no errors."
# pytest:
# name: Pytest
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - name: Install
# run: |
# . .ci-support/install.sh
# - name: Run tests
# run: |
# MINIFORGE_INSTALL_DIR=.miniforge3
# . "$MINIFORGE_INSTALL_DIR/bin/activate" testing
# cd test
# python -m pip install pytest
# python -m pytest --cov=mirgecom --durations=0 --tb=native --junitxml=pytest.xml --doctest-modules -rxsw . ../doc/*.rst ../doc/*/*.rst
# examples:
# name: Examples
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# os: [ubuntu-latest, porter]
# steps:
# - uses: actions/checkout@v3
# - name: Install
# run: |
# . .ci-support/install.sh
# - name: Test lazy accuracy
# run: |
# MINIFORGE_INSTALL_DIR=.miniforge3
# . "$MINIFORGE_INSTALL_DIR/bin/activate" testing
# conda install vtk # needed for the accuracy comparison
# export XDG_CACHE_HOME=/tmp
# [[ $(hostname) == "porter" ]] && export PYOPENCL_TEST="port:nv" && unset XDG_CACHE_HOME && conda install pocl-cuda
# # && export POCL_DEBUG=cuda
# scripts/run-integrated-tests.sh --lazy-accuracy
# - name: Run examples
# run: |
# MINIFORGE_INSTALL_DIR=.miniforge3
# . "$MINIFORGE_INSTALL_DIR/bin/activate" testing
# export XDG_CACHE_HOME=/tmp
# [[ $(hostname) == "porter" ]] && export PYOPENCL_TEST="port:nv" && unset XDG_CACHE_HOME && conda install pocl-cuda
# # && export POCL_DEBUG=cuda
# scripts/run-integrated-tests.sh --examples
doc:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install
run: |
. .ci-support/install.sh
- name: Build docs
run: |
MINIFORGE_INSTALL_DIR=.miniforge3
. "$MINIFORGE_INSTALL_DIR/bin/activate" testing
sudo apt-get update
sudo apt-get install texlive-latex-extra latexmk
conda install sphinx graphviz 'docutils>=0.16'
pip install sphinx-math-dollar sphinx-copybutton furo
cd doc
make html SPHINXOPTS="-W --keep-going -n"
make latexpdf SPHINXOPTS="-W --keep-going -n"
# emirge:
# name: Emirge installation
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# os: [ubuntu-latest, macos-latest]
# steps:
# - uses: actions/checkout@v3
# - name: Install emirge
# run: |
# [[ $(uname) == Linux ]] && sudo apt-get update && sudo apt-get install -y openmpi-bin libopenmpi-dev
# [[ $(uname) == Darwin ]] && brew upgrade && brew install mpich
# cd ..
# git clone https://github.com/illinois-ceesd/emirge
# cd emirge
# cp -a ../mirgecom .
# ./install.sh --skip-clone
# - name: Run simple mirgecom test
# run: |
# cd ..
# source emirge/config/activate_env.sh
# cd mirgecom/examples
# python -m mpi4py ./pulse-mpi.py
# y1:
# name: Production testing
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# os: [ubuntu-latest, macos-latest, porter]
# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: '0'
# - name: Prepare production environment
# run: |
# [[ $(uname) == Linux ]] && [[ $(hostname) != "porter" ]] && sudo apt-get update && sudo apt-get install -y openmpi-bin libopenmpi-dev
# [[ $(uname) == Darwin ]] && brew upgrade && brew install mpich
# MIRGEDIR=$(pwd)
# cat scripts/production-testing-env.sh
# . scripts/production-testing-env.sh
# cd ..
# date
# printf "Removing stale install ..."
# rm -rf emirge.prod emirge.y1
# printf "done.\n"
# date
# git clone https://github.com/illinois-ceesd/emirge emirge.prod
# cd emirge.prod
# . ../mirgecom/scripts/install-mirge-from-source.sh ${MIRGEDIR}/..
# - name: Run production test
# run: |
# source ../config/activate_env.sh
# scripts/run-integrated-tests.sh --production