Skip to content

Commit

Permalink
CI gardening: drop insecure curl, get MPI from conda, simplify (#209)
Browse files Browse the repository at this point in the history
  • Loading branch information
inducer authored Jun 4, 2021
1 parent ba92c0a commit 6e0dffc
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 35 deletions.
34 changes: 8 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -30,18 +30,9 @@ 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 "-------------------------------------------"
echo "- scipy" >> .test-conda-env-py3.yml
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:
Expand All @@ -55,15 +46,12 @@ jobs:
- name: "Main Script"
run: |
sed -i "s/loopy.git/loopy.git@${{ matrix.loopy-branch }}/g" requirements.txt
sudo apt update
sudo apt install octave openmpi-bin libopenmpi-dev libhdf5-dev
sudo apt update && sudo apt install octave
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
. ./ci-support.sh
curl -L -O https://tiker.net/ci-support-v0
. ./ci-support-v0
build_py_project_in_conda_env
with_echo python -m pip install mpi4py
test_py_project
firedrake:
Expand Down Expand Up @@ -109,9 +97,8 @@ jobs:
run: |
sed -i "s/loopy.git/loopy.git@${{ matrix.loopy-branch }}/g" requirements.txt
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:
Expand All @@ -125,8 +112,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
Expand Down Expand Up @@ -155,9 +141,7 @@ jobs:
run: |
curl -L -O https://tiker.net/ci-support-v0
. ./ci-support-v0
source .ci/install-downstream.sh
build_py_project_in_conda_env
test_py_project
Expand All @@ -172,9 +156,7 @@ jobs:
run: |
curl -L -O https://tiker.net/ci-support-v0
. ./ci-support-v0
source .ci/install-downstream.sh
build_py_project_in_conda_env
examples/run_examples.sh ./examples
Expand Down
16 changes: 7 additions & 9 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,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
Expand All @@ -28,7 +28,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
Expand All @@ -51,7 +51,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
Expand Down Expand Up @@ -90,10 +90,8 @@ Python 3 POCL Firedrake Examples:
Python 3 Conda:
script: |
sed -i "s/loopy.git/loopy.git@$LOOPY_BRANCH/g" requirements.txt
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
Expand All @@ -109,14 +107,14 @@ 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
- ". ./build-docs.sh"
tags:
- python3

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
Expand All @@ -127,7 +125,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
Expand Down
3 changes: 3 additions & 0 deletions .test-conda-env-py3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ dependencies:
# for pymetis
- pybind11

# for MPI-based tests
- mpi4py

# for xdmf/hdf5 visualizer
- h5py

Expand Down

0 comments on commit 6e0dffc

Please sign in to comment.