Skip to content

Spack build

Spack build #124

Workflow file for this run

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_package_repo:
description: "Spack package repository to test"
default: "spack/spack-packages"
type: string
spack_package_ref:
description: "Spack package repository branch/tag to test"
default: "develop"
type: string
jobs:
build:
runs-on: ubuntu-latest
container: ubuntu:24.04
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 g++ gfortran # compilers
- name: Get Spack
uses: actions/checkout@v6
with:
path: ./spack
repository: spack/spack
- name: Get Spack packages
if: github.event_name == 'workflow_dispatch'
run: |
. ./spack/share/spack/setup-env.sh
spack repo update
spack repo add --name test_pkgs https://github.com/${{ github.event.inputs.spack_package_repo }}.git ~/test_pkgs
spack repo update --branch ${{ github.event.inputs.spack_package_ref }} test_pkgs
spack repo list
spack config get repos
- 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
- 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