Skip to content
Snippets Groups Projects
Unverified Commit c2845859 authored by Andreas Klöckner's avatar Andreas Klöckner Committed by GitHub
Browse files

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