From c616803806da7fb1142bd1df7706169661bbfe8c Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 28 Sep 2020 13:00:20 -0500 Subject: [PATCH 1/9] Run examples on Github CI --- .github/workflows/ci.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8123bf042..c49af9497 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,19 @@ jobs: ( test_py_project ) ( test_py_project ) + examples: + name: Conda Pytest + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: "Main Script" + run: | + CONDA_ENVIRONMENT=.test-conda-env-py3.yml + 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 + run_examples + docs: name: Documentation runs-on: ubuntu-latest -- GitLab From 0dcfcfc145bd313bced270a975d1aa07624fa9d1 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 28 Sep 2020 13:14:52 -0500 Subject: [PATCH 2/9] Install ISPC for examples on Github CI --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c49af9497..b33e0c495 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -73,6 +73,10 @@ jobs: 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" + run_examples docs: -- GitLab From 93597f1bafa102c7326d826236be465a5c4489ee Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 28 Sep 2020 13:20:00 -0500 Subject: [PATCH 3/9] Fix tar invocation in Github CI examples job --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b33e0c495..3c259bbf9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,7 +74,7 @@ jobs: . ./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 - + 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" run_examples -- GitLab From 8feb19f211367d2036e05fa4db20097ffc854b05 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 28 Sep 2020 13:22:21 -0500 Subject: [PATCH 4/9] Fix name of Github CI examples job --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3c259bbf9..7c1a278fb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,7 +63,7 @@ jobs: ( test_py_project ) examples: - name: Conda Pytest + name: Conda Examples runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 -- GitLab From f19af5e98285714f28cd571df7c88b14bf3768d5 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 28 Sep 2020 13:32:03 -0500 Subject: [PATCH 5/9] Fix PATH setting for ISPC install in Github Examples CI --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7c1a278fb..403ed0351 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -75,7 +75,7 @@ jobs: 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" + export PATH="$(pwd)/ispc-trunk-linux/bin:$PATH" run_examples -- GitLab From 56fef44b1ed0b8b1993ea310454c6791b0739179 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 28 Sep 2020 13:42:14 -0500 Subject: [PATCH 6/9] Refactor/use shipped examples runner in Github CI --- .github/workflows/ci.yml | 5 ++++- .gitlab-ci.yml | 22 ++++++++++++++++------ build-py-project-and-run-examples.sh | 6 ------ 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 403ed0351..82b2a35f5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -77,7 +77,10 @@ jobs: 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" - run_examples + . ./build-py-project-and-run-examples.sh + run_py_examples + run_ipynb_examples + run_floopy_examples docs: name: Documentation diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 851caaebd..d69f0b8c4 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 b7cc829ca..a3ddf7587 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 -- GitLab From 3f3fb2542aee52d9b093a32a21d1f0b45a81bdba Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 28 Sep 2020 13:55:31 -0500 Subject: [PATCH 7/9] Github CI Examples job: pick CL device --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 82b2a35f5..b512b0ab7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -77,6 +77,8 @@ jobs: 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 -- GitLab From f3761645f9d3d0b933e5392f4e37f9610a8864f1 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 28 Sep 2020 14:13:38 -0500 Subject: [PATCH 8/9] Install extra packages for examples in Github CI --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b512b0ab7..7d8101763 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,6 +70,7 @@ jobs: - 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 -- GitLab From 484e9dcf73fe5ea33c811fd72266157d74527b7c Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 28 Sep 2020 14:59:28 -0500 Subject: [PATCH 9/9] Fix bad quotes conversion in loopy.cli --- loopy/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loopy/cli.py b/loopy/cli.py index d99cf7731..a3afa0fb6 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"), -- GitLab