From c284585992e1a605aed57e505803e406aa996027 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20Kl=C3=B6ckner?= <inform@tiker.net>
Date: Fri, 4 Jun 2021 17:28:08 -0500
Subject: [PATCH] CI: drop insecure curl, add downstreams, simplify (#17)

* CI: drop insecure curl, add downstreams, simplify

* Use conda for pylint, don't install mpi4py

* Drop pytential from downstream CI
---
 .github/workflows/ci.yml | 37 +++++++++----------------------------
 .gitlab-ci.yml           | 16 +++++++---------
 2 files changed, 16 insertions(+), 37 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 28a382a..76e8aa8 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -20,7 +20,7 @@ jobs:
                 python-version: '3.6'
         -   name: "Main Script"
             run: |
-                curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/main/prepare-and-run-flake8.sh
+                curl -L -O https://gitlab.tiker.net/inducer/ci-support/raw/main/prepare-and-run-flake8.sh
                 . ./prepare-and-run-flake8.sh "$(basename $GITHUB_REPOSITORY)" test examples
 
     pylint:
@@ -30,18 +30,8 @@ jobs:
         -   uses: actions/checkout@v2
         -   name: "Main Script"
             run: |
-                sudo apt update
-                sudo apt install octave openmpi-bin libopenmpi-dev libhdf5-dev
-
-                CONDA_ENVIRONMENT=.test-conda-env-py3.yml
-                echo "- mpi4py" >> $CONDA_ENVIRONMENT
-                echo "- scipy" >> $CONDA_ENVIRONMENT
-                echo "-------------------------------------------"
-                cat $CONDA_ENVIRONMENT
-                echo "-------------------------------------------"
                 USE_CONDA_BUILD=1
-                curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/prepare-and-run-pylint.sh
-
+                curl -L -O https://gitlab.tiker.net/inducer/ci-support/raw/master/prepare-and-run-pylint.sh
                 . ./prepare-and-run-pylint.sh "$(basename $GITHUB_REPOSITORY)" examples/*.py test/test_*.py
 
     pytest3:
@@ -51,15 +41,10 @@ jobs:
         -   uses: actions/checkout@v2
         -   name: "Main Script"
             run: |
-                sudo apt update
-                sudo apt install octave openmpi-bin libopenmpi-dev libhdf5-dev
-
-                CONDA_ENVIRONMENT=.test-conda-env-py3.yml
                 export MPLBACKEND=Agg
-                curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/main/ci-support.sh
+                curl -L -O https://gitlab.tiker.net/inducer/ci-support/raw/main/ci-support.sh
                 . ./ci-support.sh
                 build_py_project_in_conda_env
-                with_echo python -m pip install mpi4py
                 test_py_project
 
     examples3:
@@ -70,9 +55,8 @@ jobs:
         -   name: "Main Script"
             run: |
                 export MPLBACKEND=Agg
-                CONDA_ENVIRONMENT=.test-conda-env-py3.yml
                 USE_CONDA_BUILD=1
-                curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/main/build-py-project-and-run-examples.sh
+                curl -L -O https://gitlab.tiker.net/inducer/ci-support/raw/main/build-py-project-and-run-examples.sh
                 . ./build-py-project-and-run-examples.sh
 
     docs:
@@ -86,8 +70,7 @@ jobs:
                 python-version: '3.x'
         -   name: "Main Script"
             run: |
-                CONDA_ENVIRONMENT=.test-conda-env-py3.yml
-                curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/main/ci-support.sh
+                curl -L -O https://gitlab.tiker.net/inducer/ci-support/raw/main/ci-support.sh
                 . ci-support.sh
                 build_py_project_in_conda_env
                 conda install graphviz
@@ -99,7 +82,7 @@ jobs:
         strategy:
             matrix:
                 #downstream_project: [meshmode, grudge, pytential, mirgecom]
-                downstream_project: [meshmode]
+                downstream_project: [meshmode, grudge, mirgecom]
         name: Tests for downstream project ${{ matrix.downstream_project }}
         runs-on: ubuntu-latest
         steps:
@@ -117,9 +100,7 @@ jobs:
                 cd "$DOWNSTREAM_PROJECT"
                 echo "*** $DOWNSTREAM_PROJECT version: $(git rev-parse --short HEAD)"
 
-                sed -i "/egg=meshmode/ c git+file://$(readlink -f ..)#egg=meshmode" requirements.txt
-
-                export CONDA_ENVIRONMENT=.test-conda-env-py3.yml
+                sed -i "/egg=arraycontext/ c git+file://$(readlink -f ..)#egg=arraycontext" requirements.txt
 
                 # Avoid slow or complicated tests in downstream projects
                 export PYTEST_ADDOPTS="-k 'not (slowtest or octave or mpi)'"
@@ -134,8 +115,8 @@ jobs:
                     sed -i "/mpi4py/ d" requirements.txt
                 fi
 
-                curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/main/ci-support.sh
-                . ./ci-support.sh
+                curl -L -O https://tiker.net/ci-support-v0
+                . ./ci-support-v0
                 build_py_project_in_conda_env
                 test_py_project
 
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 88293d2..d93ad5e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -4,7 +4,7 @@ Python 3 POCL:
     export PYOPENCL_TEST=portable:pthread
     # cython is here because pytential (for now, for TS) depends on it
     export EXTRA_INSTALL="pybind11 cython numpy mako mpi4py oct2py"
-    curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/main/build-and-test-py-project.sh
+    curl -L -O https://gitlab.tiker.net/inducer/ci-support/raw/main/build-and-test-py-project.sh
     . ./build-and-test-py-project.sh
   tags:
   - python3
@@ -22,7 +22,7 @@ Python 3 Nvidia Titan V:
     export PYOPENCL_TEST=nvi:titan
     export EXTRA_INSTALL="pybind11 cython numpy mako oct2py"
     # cython is here because pytential (for now, for TS) depends on it
-    curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/main/build-and-test-py-project.sh
+    curl -L -O https://gitlab.tiker.net/inducer/ci-support/raw/main/build-and-test-py-project.sh
     . ./build-and-test-py-project.sh
   tags:
   - python3
@@ -40,7 +40,7 @@ Python 3 POCL Examples:
   - export PYOPENCL_TEST=portable:pthread
   # cython is here because pytential (for now, for TS) depends on it
   - export EXTRA_INSTALL="pybind11 cython numpy mako matplotlib"
-  - curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/main/build-py-project-and-run-examples.sh
+  - curl -L -O https://gitlab.tiker.net/inducer/ci-support/raw/main/build-py-project-and-run-examples.sh
   - ". ./build-py-project-and-run-examples.sh"
   tags:
   - python3
@@ -51,10 +51,8 @@ Python 3 POCL Examples:
 
 Python 3 Conda:
   script: |
-    CONDA_ENVIRONMENT=.test-conda-env-py3.yml
     export MPLBACKEND=Agg
-
-    curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/main/build-and-test-py-project-within-miniconda.sh
+    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
   tags:
   # - docker-runner
@@ -66,7 +64,7 @@ Python 3 Conda:
 Documentation:
   script: |
     EXTRA_INSTALL="pybind11 cython numpy"
-    curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/main/build-docs.sh
+    curl -L -O https://gitlab.tiker.net/inducer/ci-support/raw/main/build-docs.sh
     CI_SUPPORT_SPHINX_VERSION_SPECIFIER=">=4.0"
     . ./build-docs.sh
   tags:
@@ -74,7 +72,7 @@ Documentation:
 
 Flake8:
   script:
-  - curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/main/prepare-and-run-flake8.sh
+  - curl -L -O https://gitlab.tiker.net/inducer/ci-support/raw/main/prepare-and-run-flake8.sh
   - . ./prepare-and-run-flake8.sh "$CI_PROJECT_NAME" test examples
   tags:
   - python3
@@ -85,7 +83,7 @@ Pylint:
   script: |
     export PY_EXE=python3
     EXTRA_INSTALL="Cython pybind11 numpy mako matplotlib scipy mpi4py oct2py"
-    curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/prepare-and-run-pylint.sh
+    curl -L -O https://gitlab.tiker.net/inducer/ci-support/raw/master/prepare-and-run-pylint.sh
     . ./prepare-and-run-pylint.sh "$CI_PROJECT_NAME" examples/*.py test/test_*.py
   tags:
   - python3
-- 
GitLab