From 72320726079d1a47eefeee0db5697e5557dd09d5 Mon Sep 17 00:00:00 2001 From: Matthias Diener Date: Mon, 15 Mar 2021 13:31:41 -0500 Subject: [PATCH] test downstream projects Fixes #44. --- .github/workflows/ci.yml | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8b57bb3b..7f336959 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,6 +65,44 @@ jobs: build_py_project_in_conda_env build_docs -# vim: sw=4 + downstream_tests: + strategy: + matrix: + # Reinstate when + # https://github.com/illinois-ceesd/mirgecom/issues/212 + # is fixed: + # downstream_project: [meshmode, pytential, pytato, mirgecom] + downstream_project: [meshmode, pytential, pytato] + name: Tests for downstream project ${{ matrix.downstream_project }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: "Main Script" + env: + DOWNSTREAM_PROJECT: ${{ matrix.downstream_project }} + run: | + if test "$DOWNSTREAM_PROJECT" = "mirgecom"; then + git clone "https://github.com/illinois-ceesd/$DOWNSTREAM_PROJECT.git" + else + git clone "https://github.com/inducer/$DOWNSTREAM_PROJECT.git" + fi + cd "$DOWNSTREAM_PROJECT" + echo "*** $DOWNSTREAM_PROJECT version: $(git rev-parse --short HEAD)" + sed -i "/egg=grudge/ c git+file://$(readlink -f ..)#egg=grudge" requirements.txt + export CONDA_ENVIRONMENT=.test-conda-env-py3.yml + # Avoid slow or complicated tests in downstream projects + export PYTEST_ADDOPTS="-k 'not (slowtest or octave or mpi)'" + if test "$DOWNSTREAM_PROJECT" = "mirgecom"; then + # can't turn off MPI in mirgecom + sudo apt-get update + sudo apt-get install openmpi-bin libopenmpi-dev + else + sed -i "/mpi4py/ d" requirements.txt + fi + curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/ci-support.sh + . ./ci-support.sh + build_py_project_in_conda_env + test_py_project +# vim: sw=4 -- GitLab