diff --git a/.ci/install-for-firedrake.sh b/.ci/install-for-firedrake.sh new file mode 100644 index 0000000000000000000000000000000000000000..4b25ba82874628fe3a2c7c7670bb179884ad72e9 --- /dev/null +++ b/.ci/install-for-firedrake.sh @@ -0,0 +1,19 @@ +sudo chown -R $(whoami) /github/home || true +sudo apt update +sudo apt upgrade -y +sudo apt install time +sudo apt install -y pocl-opencl-icd ocl-icd-opencl-dev + +. /home/firedrake/firedrake/bin/activate +grep -v loopy requirements.txt > /tmp/myreq.txt + +# This shouldn't be necessary, but... +# https://github.com/inducer/meshmode/pull/48#issuecomment-687519451 +pip install pybind11 + +# The Firedrake container is based on Py3.6 as of 2020-10-10, which +# doesn't have dataclasses. +pip install dataclasses + +pip install -r /tmp/myreq.txt +pip install --force-reinstall git+https://github.com/benSepanski/loopy.git@firedrake-usable_for_potentials diff --git a/.github/workflows/run_firedrake_examples.sh b/.ci/run_firedrake_examples.sh similarity index 100% rename from .github/workflows/run_firedrake_examples.sh rename to .ci/run_firedrake_examples.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 431dd49949670329def15eba9cf5a69af39151d8..9bf5fe81f80890a6a7d86178a616382d337ac3e3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,21 +40,9 @@ jobs: image: 'firedrakeproject/firedrake' steps: - uses: actions/checkout@v1 - # This Dependencies setup is the same setup used for running firedrake - # examples, but had to be copied since github doesn't support yaml - # anchors. Changes made here should also be made there - name: "Dependencies" run: | - sudo apt update - sudo apt upgrade -y - sudo apt install time - sudo apt install -y pocl-opencl-icd ocl-icd-opencl-dev - sudo chown -R $(whoami) /github/home - - . /home/firedrake/firedrake/bin/activate - grep -v loopy requirements.txt > /tmp/myreq.txt - pip install -r /tmp/myreq.txt - pip install --force-reinstall git+https://github.com/benSepanski/loopy.git@firedrake-usable_for_potentials + . .ci/install-for-firedrake.sh # The Firedrake container is based on Py3.6 as of 2020-10-10, which # doesn't have dataclasses. pip install pytest dataclasses @@ -72,29 +60,14 @@ jobs: image: 'firedrakeproject/firedrake' steps: - uses: actions/checkout@v1 - # This Dependencies setup is the same setup used for running firedrake - # tests, but had to be copied since github doesn't support yaml - # anchors. Changes made here should also be made there - name: "Dependencies" run: | - sudo apt update - sudo apt upgrade -y - sudo apt install time - sudo apt install -y pocl-opencl-icd ocl-icd-opencl-dev - sudo chown -R $(whoami) /github/home - - . /home/firedrake/firedrake/bin/activate - grep -v loopy requirements.txt > /tmp/myreq.txt - pip install -r /tmp/myreq.txt - pip install --force-reinstall git+https://github.com/benSepanski/loopy.git@firedrake-usable_for_potentials - # The Firedrake container is based on Py3.6 as of 2020-10-10, which - # doesn't have dataclasses. - pip install pytest dataclasses + . .ci/install-for-firedrake.sh pip install . - name: "Examples" run: | . /home/firedrake/firedrake/bin/activate - . ./.github/workflows/run_firedrake_examples.sh + . ./.ci/run_firedrake_examples.sh examples3: name: Examples Conda Py3 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9b3049cea75665108905349561c2e7a4a6b92c28..7ed111cf192b0d906add1c4e92470814709a5d97 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -54,20 +54,7 @@ Python 3 POCL Firedrake: - "docker-runner" image: "firedrakeproject/firedrake" script: - - &firedrake_setup | - sudo apt update - sudo apt upgrade -y - sudo apt install time - sudo apt install -y pocl-opencl-icd ocl-icd-opencl-dev - source ~/firedrake/bin/activate - grep -v loopy requirements.txt > myreq.txt - pip install -r myreq.txt - pip install --force-reinstall git+https://github.com/benSepanski/loopy.git@firedrake-usable_for_potentials - # The Firedrake container is based on Py3.6 as of 2020-10-10, which - # doesn't have dataclasses. - pip install pytest dataclasses - pip install . - # run tests + - .ci/install-for-firedrake.sh - cd test - python -m pytest --tb=native --junitxml=pytest.xml -rxsw test_firedrake_interop.py artifacts: @@ -79,8 +66,7 @@ Python 3 POCL Firedrake Examples: - "docker-runner" image: "firedrakeproject/firedrake" script: - - *firedrake_setup - # run examples + - .ci/install-for-firedrake.sh - . ./.github/workflows/run_firedrake_examples.sh artifacts: reports: