Skip to content

Commit

Permalink
Run Spack CI in a bare container (#2360)
Browse files Browse the repository at this point in the history
* Use raw container for Spack CI [skip ci]

* Install Python for Spack CI [skip ci]

* Add more dependencies [skip ci]

* Add fortran compiler [skip ci]

* Fix typo [skip ci]

* Install cmake for test build [skip ci]

* Allow OpenMPI to run as root [skip ci]
  • Loading branch information
garth-wells authored Sep 13, 2022
1 parent 263f7dd commit 0d91850
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/spack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,12 @@ on:

jobs:
build:
strategy:
matrix:
# os: [ubuntu-20.04, macos-10.15]
os: [ubuntu-20.04]
fail-fast: false
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
container: ubuntu:latest

env:
CC: gcc-10
CXX: g++-10
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1

steps:
- name: Get Spack
Expand All @@ -46,6 +43,12 @@ 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: Build DOLFINx (C++) development version via Spack
run: |
. ./spack/share/spack/setup-env.sh
Expand All @@ -70,7 +73,7 @@ jobs:
run: |
. ./spack/share/spack/setup-env.sh
spack env activate cpp-main
spack install py-fenics-ffcx@main
spack install cmake py-fenics-ffcx@main
cd dolfinx-main/cpp/
cd demo/poisson
cmake .
Expand All @@ -88,7 +91,7 @@ jobs:
run: |
. ./spack/share/spack/setup-env.sh
spack env activate cpp-release
spack install py-fenics-ffcx
spack install cmake py-fenics-ffcx
cd dolfinx-release/cpp/
cd demo/poisson
cmake .
Expand Down

0 comments on commit 0d91850

Please sign in to comment.