CI #3581
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: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
schedule: | |
- cron: '17 3 * * 0' | |
concurrency: | |
group: ${{ github.head_ref || github.ref_name }} | |
cancel-in-progress: true | |
jobs: | |
ruff: | |
name: Ruff | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: astral-sh/setup-uv@v5 | |
- name: "Main Script" | |
run: | | |
uv run --only-dev ruff check | |
typos: | |
name: Typos | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: crate-ci/typos@master | |
pylint: | |
name: Pylint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: "Main Script" | |
run: | | |
sed 's/python=3/python=3.7/' .test-conda-env-py3.yml > .test-conda-env.yml | |
USE_CONDA_BUILD=1 | |
curl -L -O https://gitlab.tiker.net/inducer/ci-support/raw/main/prepare-and-run-pylint.sh | |
. ./prepare-and-run-pylint.sh "$(basename $GITHUB_REPOSITORY)" test/test_*.py | |
mypy: | |
name: Mypy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: "Main Script" | |
run: | | |
EXTRA_INSTALL="mypy pytest types-colorama types-Pygments" | |
curl -L -O https://tiker.net/ci-support-v0 | |
. ./ci-support-v0 | |
build_py_project_in_conda_env | |
./run-mypy.sh | |
pytest: | |
name: Conda Pytest | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: "Main Script" | |
run: | | |
curl -L -O https://gitlab.tiker.net/inducer/ci-support/raw/main/build-and-test-py-project-within-miniconda.sh | |
. ./build-and-test-py-project-within-miniconda.sh | |
pytest_intel: | |
name: Conda Pytest with Intel CL | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: "Main Script" | |
run: | | |
curl -L -O https://raw.githubusercontent.com/illinois-scicomp/machine-shop-maintenance/main/install-intel-icd.sh | |
sudo bash ./install-intel-icd.sh | |
CONDA_ENVIRONMENT=.test-conda-env-py3.yml | |
echo "- ocl-icd-system" >> "$CONDA_ENVIRONMENT" | |
sed -i "/pocl/ d" "$CONDA_ENVIRONMENT" | |
export PYOPENCL_TEST=intel | |
source /opt/enable-intel-cl.sh | |
curl -L -O https://tiker.net/ci-support-v0 | |
. ./ci-support-v0 | |
build_py_project_in_conda_env | |
test_py_project | |
pytest_no_arg_check: | |
name: Conda Pytest without arg check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: "Main Script" | |
run: | | |
curl -L -O https://gitlab.tiker.net/inducer/ci-support/raw/main/build-and-test-py-project-within-miniconda.sh | |
export _LOOPY_SKIP_ARG_CHECKS=1 | |
. ./build-and-test-py-project-within-miniconda.sh | |
pytest_twice: | |
name: Conda Pytest Twice (for cache behavior) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: "Main Script" | |
run: | | |
# This test makes sure that loopy can run with kernels loaded from disk cache. | |
curl -L -O https://tiker.net/ci-support-v0 | |
. ./ci-support-v0 | |
build_py_project_in_conda_env | |
( test_py_project ) | |
# See https://github.com/inducer/loopy/pull/828 why this is disabled. | |
# export LOOPY_ABORT_ON_CACHE_MISS=1 | |
( test_py_project ) | |
examples: | |
name: Conda Examples | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: "Main Script" | |
run: | | |
curl -L -O https://tiker.net/ci-support-v0 | |
. ./ci-support-v0 | |
build_py_project_in_conda_env | |
rewrite_pyopencl_test | |
. ./.ci/examples-funcs.sh | |
install_example_prereqs | |
run_py_examples | |
run_ipynb_examples | |
run_floopy_examples | |
docs: | |
name: Documentation | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: "Main Script" | |
run: | | |
curl -L -O https://tiker.net/ci-support-v0 | |
. ci-support-v0 | |
build_py_project_in_conda_env | |
build_docs | |
downstream_tests: | |
strategy: | |
matrix: | |
downstream_project: [arraycontext, meshmode, grudge, pytential, pytato] | |
fail-fast: false | |
name: Tests for downstream project ${{ matrix.downstream_project }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: "Main Script" | |
env: | |
DOWNSTREAM_PROJECT: ${{ matrix.downstream_project }} | |
run: | | |
curl -L -O https://tiker.net/ci-support-v0 | |
. ./ci-support-v0 | |
test_downstream "$DOWNSTREAM_PROJECT" | |
downstream_firedrake: | |
name: Tests for downstream project Firedrake | |
runs-on: ubuntu-latest | |
container: | |
image: 'firedrakeproject/firedrake' | |
steps: | |
- name: "Main script" | |
run: | | |
cd /root | |
python3 -m venv --system-site-packages myvenv | |
export HOME="$(pwd)" | |
mkdir loopy | |
cd loopy | |
git init | |
git remote add origin "https://github.com/$GITHUB_REPOSITORY.git" | |
git fetch origin "$GITHUB_REF" | |
git checkout FETCH_HEAD | |
git submodule update --init | |
. /root/myvenv/bin/activate | |
pip install --editable . | |
pip uninstall -y pytools | |
pip uninstall -y pymbolic | |
pip install "git+https://github.com/inducer/pytools.git#egg=pytools" | |
pip install "git+https://github.com/inducer/pymbolic.git#egg=pymbolic" | |
cd /opt/firedrake | |
# patch so exception messages get shown | |
curl -L https://gist.githubusercontent.com/inducer/17d7134ace215f0df1f3627eac4195c7/raw/ec5470a7d8587b6e1f336f3ef1d0ece5e26f236a/firedrake-debug-patch.diff | patch -p1 | |
sed -i 's/@mpiexec/@mpiexec --oversubscribe/' Makefile | |
make check | |
validate_cff: | |
name: Validate CITATION.cff | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
- run: | | |
pip install cffconvert | |
cffconvert -i CITATION.cff --validate | |
# vim: sw=4 |