Skip to content

Commit

Permalink
Add Spack test to CI (#219)
Browse files Browse the repository at this point in the history
* Fix Spack CI

* Fix typo

* Add badge

* Simplify

* Remove verose output
  • Loading branch information
garth-wells authored Oct 16, 2023
1 parent 5a5faf2 commit 66b78e1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 37 deletions.
47 changes: 10 additions & 37 deletions .github/workflows/spack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ jobs:
runs-on: ubuntu-latest
container: ubuntu:latest
steps:
- name: Install Spack requirements
run: |
apt-get -y update
apt-get install -y bzip2 curl file git gzip make patch python3-minimal tar xz-utils
apt-get install -y g++ gfortran # compilers
- name: Get Spack
if: github.event_name != 'workflow_dispatch'
uses: actions/checkout@v4
Expand All @@ -38,51 +44,18 @@ jobs:
repository: ${{ github.event.inputs.spack_repo }}
ref: ${{ github.event.inputs.spack_ref }}

- name: Install Spack requirements
run: |
apt-get -y update
apt-get install -y bzip2 curl file git gzip make patch python3-minimal tar xz-utils
apt-get install -y g++ gfortran # compilers
- name: Insall UFL development version via Spack
- name: Install UFL development version and run tests
run: |
. ./spack/share/spack/setup-env.sh
spack env create main
spack env activate main
spack add py-fenics-ufl@main
spack install
- name: Get UFL code (to access test files)
uses: actions/checkout@v4
with:
path: ./ufl-main
- name: Run tests (development version)
run: |
. ./spack/share/spack/setup-env.sh
spack env create main-test
spack env activate main-test
spack add py-fencis-ufl@main py-pytest
cd ufl-main/test/
pytest -n auto .
spack install --test=root
- name: Install UFL release version via Spack
- name: Install UFL release version and run tests
run: |
. ./spack/share/spack/setup-env.sh
spack env create release
spack env activate release
spack add py-fenics-ufl
spack install
- name: Get UFL release code (to access test files)
uses: actions/checkout@v4
with:
ref: v2023.2.0
# ref: v${{ github.event.inputs.spack_branch }}
path: ./ufl-release
- name: Run tests (release version)
run: |
. ./spack/share/spack/setup-env.sh
spack env create release-test
spack env activate release-test
spack add py-fenics-ufl py-pytest
spack install
cd ufl-release/test/
pytest -n auto .
spack install --test=root
4 changes: 4 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,22 @@ https://www.fenicsproject.org

.. image:: https://github.com/FEniCS/ufl/workflows/UFL%20CI/badge.svg
:target: https://github.com/FEniCS/ufl/workflows/UFL%20CI
.. image:: https://github.com/FEniCS/ufl/actions/workflows/spack.yml/badge.svg
:target: https://github.com/FEniCS/ufl/actions/workflows/spack.yml
.. image:: https://coveralls.io/repos/github/FEniCS/ufl/badge.svg?branch=master
:target: https://coveralls.io/github/FEniCS/ufl?branch=master
:alt: Coverage Status
.. image:: https://readthedocs.org/projects/fenics-ufl/badge/?version=latest
:target: https://fenics.readthedocs.io/projects/ufl/en/latest/?badge=latest
:alt: Documentation Status


Documentation
=============

Documentation can be viewed at https://fenics-ufl.readthedocs.org/.


License
=======

Expand Down

0 comments on commit 66b78e1

Please sign in to comment.