|
| 1 | +name: Spack install |
| 2 | + |
| 3 | +on: |
| 4 | + # Uncomment the below 'push' to trigger on push |
| 5 | + # push: |
| 6 | + # branches: |
| 7 | + # - "**" |
| 8 | + schedule: |
| 9 | + # '*' is a special character in YAML, so string must be quoted |
| 10 | + - cron: "0 2 * * TUE" |
| 11 | + workflow_dispatch: |
| 12 | + inputs: |
| 13 | + spack_repo: |
| 14 | + description: "Spack repository to test" |
| 15 | + default: "spack/spack" |
| 16 | + type: string |
| 17 | + spack_ref: |
| 18 | + description: "Spack repository branch/tag to test" |
| 19 | + default: "develop" |
| 20 | + type: string |
| 21 | + |
| 22 | +jobs: |
| 23 | + build: |
| 24 | + runs-on: ubuntu-latest |
| 25 | + container: ubuntu:latest |
| 26 | + steps: |
| 27 | + - name: Install Spack requirements |
| 28 | + run: | |
| 29 | + apt-get -y update |
| 30 | + apt-get install -y bzip2 curl file git gzip make patch python3-minimal tar xz-utils |
| 31 | + apt-get install -y g++ gfortran # compilers |
| 32 | +
|
| 33 | + - name: Get Spack |
| 34 | + if: github.event_name != 'workflow_dispatch' |
| 35 | + uses: actions/checkout@v4 |
| 36 | + with: |
| 37 | + path: ./spack |
| 38 | + repository: spack/spack |
| 39 | + - name: Get Spack |
| 40 | + if: github.event_name == 'workflow_dispatch' |
| 41 | + uses: actions/checkout@v4 |
| 42 | + with: |
| 43 | + path: ./spack |
| 44 | + repository: ${{ github.event.inputs.spack_repo }} |
| 45 | + ref: ${{ github.event.inputs.spack_ref }} |
| 46 | + |
| 47 | + - name: Install Basix development version and run tests |
| 48 | + run: | |
| 49 | + . ./spack/share/spack/setup-env.sh |
| 50 | + spack env create main |
| 51 | + spack env activate main |
| 52 | + spack add py-fenics-basix@main |
| 53 | + spack install --test=root |
| 54 | +
|
| 55 | + - name: Install Basix release version and run tests |
| 56 | + run: | |
| 57 | + . ./spack/share/spack/setup-env.sh |
| 58 | + spack env create release |
| 59 | + spack env activate release |
| 60 | + spack add py-fenics-basix |
| 61 | + spack install --test=root |
0 commit comments