Skip to content

Commit

Permalink
Update Spack CI (#117)
Browse files Browse the repository at this point in the history
* renaming Spack repo used for testing to have a more obvious name
* update package to version currently bundled with spack
* change spack build to use our spack file explicitly
* copy all necessary files in the workflow recursively

Co-authored-by: Benjamin Rodenberg <[email protected]>
  • Loading branch information
ajaust and BenjaminRodenberg authored Aug 12, 2021
1 parent c5b19c7 commit 36e4782
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/build-spack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ on:
- "*"
schedule:
- cron: '0 4 * * 1' # Schedule it every Sunday
jobs:

jobs:
build_spack:
name: build_spack
runs-on: ubuntu-latest
Expand All @@ -23,8 +23,7 @@ jobs:
uses: actions/checkout@v2
- name: Move Package Script
run: |
cp spack/repo/packages/py-pyprecice/package.py /py-pyprecice-repo/packages/py-pyprecice/
cp spack/repo/packages/py-pyprecice/*.patch /py-pyprecice-repo/packages/py-pyprecice/
cp -r spack/repo/packages/py-pyprecice/ /py-pyprecice-repo/packages/
- name: Try to build py-pyprecice with spack and test it
run: |
. /opt/spack/share/spack/setup-env.sh && spack env activate ci && spack arch && spack find && spack dev-build py-pyprecice@develop target=x86_64 && spack load precice py-numpy py-mpi4py py-cython openssh openmpi && mkdir runner && cd runner && python3 -c "import precice; print(precice.__version__)"
. /opt/spack/share/spack/setup-env.sh && spack env activate ci && spack arch && spack find && spack dev-build pyprecice.test.py-pyprecice@develop target=x86_64 && spack load precice py-numpy py-mpi4py py-cython openssh openmpi && mkdir runner && cd runner && python3 -c "import precice; print(precice.__version__)"
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ All notable changes to this project will be documented in this file.

## latest

* Improve CI w.r.t spack package. https://github.com/precice/python-bindings/pull/117
* Synchronize spack package with https://github.com/spack/spack/pull/25077 via https://github.com/precice/python-bindings/pull/116.

## 2.2.1.1
Expand Down
4 changes: 2 additions & 2 deletions spack/ci-spack-pyprecice-deps-1804.dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Build stage with Spack pre-installed and ready to be used
FROM spack/ubuntu-bionic:latest
FROM spack/ubuntu-bionic:latest

# Mount the current sources into the build container
# and build the default environment
ADD ./spack/repo /py-pyprecice-repo
RUN spack --color=always env create --without-view ci && \
spack --color=always -e ci add py-pyprecice@develop target=x86_64 && \
spack --color=always -e ci repo add /py-pyprecice-repo && \
spack --color=always -e ci add pyprecice.test.py-pyprecice@develop target=x86_64 && \
spack --color=always -e ci install --fail-fast --only=dependencies && \
spack --color=always clean -a
2 changes: 1 addition & 1 deletion spack/repo/repo.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
repo:
namespace: 'spack'
namespace: 'pyprecice.test'

0 comments on commit 36e4782

Please sign in to comment.