-
-
Notifications
You must be signed in to change notification settings - Fork 46
68 lines (63 loc) · 2.11 KB
/
Copy pathspack.yml
File metadata and controls
68 lines (63 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Spack install
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 * * SUN"
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
ffcx_version:
description: "Spack build tag"
default: "main"
type: string
jobs:
build:
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
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 FFCx and run tests
if: github.event_name != 'workflow_dispatch'
run: |
. ./spack/share/spack/setup-env.sh
spack env create ffcx-main
spack env activate ffcx-main
spack add py-fenics-ffcx@main
spack install
- name: Install FFCx and run tests
if: github.event_name == 'workflow_dispatch'
run: |
. ./spack/share/spack/setup-env.sh
spack env create ffcx-testing
spack env activate ffcx-testing
spack add py-fenics-ffcx@${{ github.event.inputs.ffcx_version }}
spack install