From 56fef44b1ed0b8b1993ea310454c6791b0739179 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 28 Sep 2020 13:42:14 -0500 Subject: [PATCH] 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