diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8123bf042251efad613755f0184f42d7682e293c..7d8101763de864e20bd92c6be0d1fef0e31d1b31 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,7 +37,7 @@ jobs: curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/prepare-and-run-pylint.sh . ./prepare-and-run-pylint.sh "$(basename $GITHUB_REPOSITORY)" test/test_*.py - pytest3: + pytest: name: Conda Pytest runs-on: ubuntu-latest steps: @@ -62,6 +62,29 @@ jobs: ( test_py_project ) ( test_py_project ) + examples: + name: Conda Examples + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: "Main Script" + run: | + CONDA_ENVIRONMENT=.test-conda-env-py3.yml + EXTRA_INSTALL="matplotlib ipykernel nbconvert" + 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 + + curl -L "https://ci.appveyor.com/api/projects/ispc/ispc/artifacts/build%2Fispc-trunk-linux.tar.gz?job=Environment%3A%20APPVEYOR_BUILD_WORKER_IMAGE%3DUbuntu1604%2C%20LLVM_VERSION%3Dlatest" | tar xfz - + export PATH="$(pwd)/ispc-trunk-linux/bin:$PATH" + + export PYOPENCL_TEST=portable:pthread + + . ./build-py-project-and-run-examples.sh + run_py_examples + run_ipynb_examples + run_floopy_examples + docs: name: Documentation runs-on: ubuntu-latest diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 851caaebd4334ac9421c42d60dcaca8d57a812ca..d69f0b8c489c07d3aa1512f6f1cbb8ced0f6a2e9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -69,16 +69,26 @@ Python 3 POCL Twice With Cache: # - tags Python 3 POCL Examples: - script: - - export PY_EXE=python3 - - export PYOPENCL_TEST=portable:pthread - - export EXTRA_INSTALL="pybind11 numpy mako pyvisfile matplotlib ipykernel nbconvert" - - ". ./build-py-project-and-run-examples.sh" + script: | + export PY_EXE=python3 + export PYOPENCL_TEST=portable:pthread + export EXTRA_INSTALL="pybind11 numpy mako pyvisfile matplotlib ipykernel nbconvert" + + curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/ci-support.sh + . ./ci-support.sh + build_py_project_in_venv + + curl -L "https://ci.appveyor.com/api/projects/ispc/ispc/artifacts/build%2Fispc-trunk-linux.tar.gz?job=Environment%3A%20APPVEYOR_BUILD_WORKER_IMAGE%3DUbuntu1604%2C%20LLVM_VERSION%3Dlatest" | tar xfz - + export PATH="$(pwd)/ispc-trunk-linux/bin:$PATH" + + . ./build-py-project-and-run-examples.sh + run_py_examples + run_ipynb_examples + run_floopy_examples tags: - python3 - pocl - large-node - - ispc except: - tags diff --git a/build-py-project-and-run-examples.sh b/build-py-project-and-run-examples.sh index b7cc829caa11dd9e4b046e9a78ef0be062ce0506..a3ddf75875a657bdd7134d0580f6bdabfd2af25d 100644 --- a/build-py-project-and-run-examples.sh +++ b/build-py-project-and-run-examples.sh @@ -2,9 +2,6 @@ set -e -curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/build-py-project.sh -source build-py-project.sh - function run_examples() { PATTERN=$1 @@ -32,6 +29,3 @@ function run_floopy_examples() run_examples "*.floopy" "${PY_EXE} -m loopy" } -run_py_examples -run_ipynb_examples -run_floopy_examples diff --git a/loopy/cli.py b/loopy/cli.py index d99cf773104b7464dfe7aa8a18c9867821450d07..a3afa0fb6e3765bc8158560145b03814ece00e6c 100644 --- a/loopy/cli.py +++ b/loopy/cli.py @@ -60,7 +60,7 @@ def main(): parser.add_argument("infile", metavar="INPUT_FILE") parser.add_argument("outfile", default="-", metavar="OUTPUT_FILE", - help="Defaults to stdout ("-").", nargs="?") + help="Defaults to stdout ('-').", nargs="?") parser.add_argument("--lang", metavar="LANGUAGE", help="loopy|fortran") parser.add_argument("--target", choices=( "opencl", "ispc", "ispc-occa", "c", "c-fortran", "cuda"),