Skip to content

Commit

Permalink
Merge branch 'main' into mscroggs/remove-elements
Browse files Browse the repository at this point in the history
  • Loading branch information
mscroggs authored Oct 13, 2023
2 parents 99d2bcc + 5a5faf2 commit 93940f4
Showing 1 changed file with 88 additions and 0 deletions.
88 changes: 88 additions & 0 deletions .github/workflows/spack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Spack build

on:
# Uncomment the below 'push' to trigger on push
# push:
# branches:
# - "**"
schedule:
# '*' is a special character in YAML, so string must be quoted
- cron: "0 2 * * WED"
workflow_dispatch:
inputs:
spack_repo:
description: "Spack repository to test"
default: "spack/spack"
type: string
spack_ref:
description: "Spack repository branch/tag to test"
default: "develop"
type: string

jobs:
build:
runs-on: ubuntu-latest
container: ubuntu:latest
steps:
- name: Get Spack
if: github.event_name != 'workflow_dispatch'
uses: actions/checkout@v4
with:
path: ./spack
repository: spack/spack
- name: Get Spack
if: github.event_name == 'workflow_dispatch'
uses: actions/checkout@v4
with:
path: ./spack
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
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 .
- name: Install UFL release version via Spack
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 .

0 comments on commit 93940f4

Please sign in to comment.